Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support latest ARC56 source mapping (including cblock offset) #333

Merged
merged 9 commits into from
Oct 24, 2024

Conversation

joe-p
Copy link
Contributor

@joe-p joe-p commented Oct 22, 2024

Proposed Changes

  • Support latest ARC56 spec

Note that there is more work that could be done here to reduce API calls, notably cahcing the program and/or constant offset if it is known

@joe-p joe-p marked this pull request as draft October 22, 2024 20:26
@joe-p
Copy link
Contributor Author

joe-p commented Oct 22, 2024

Moved to draft until I add a test for ARC56 constant block-offset errors

@joe-p joe-p marked this pull request as ready for review October 22, 2024 20:52
@HashMapsData2Value
Copy link

HashMapsData2Value commented Oct 24, 2024

I assume all the .md files automatically generated? Or should a review inspect each line?

@HashMapsData2Value
Copy link

Btw https://github.com/algorandfoundation/ARCs/pull/258/files is still not yet merged, why merge this in before then?

{
"teal": 11,
"source": "tests/contracts/general.algo.ts:24",
"pc": [

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is tests/contracts/general.algo.ts automatically generated? The path in the repo seems to be tests/example-contracts

Copy link
Contributor Author

@joe-p joe-p Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah I copied over the artifact from TEALScript repo, I need to bump the TEALScript version and re-generate it here in this repo so this path is correct

@joe-p
Copy link
Contributor Author

joe-p commented Oct 24, 2024

I assume all the .md files automatically generated? Or should a review inspect each line?

Yeah they are generated by TypeDoc so no need for manual review

@joe-p
Copy link
Contributor Author

joe-p commented Oct 24, 2024

Btw https://github.com/algorandfoundation/ARCs/pull/258/files is still not yet merged, why merge this in before then?

This will just be going into the beta release, which adds ARC56 suppport. Right now the main consumer of ARC56 is reti staking platform

let program: Uint8Array | undefined
if (pcOffsetMethod === 'cblocks') {
// TODO: Cache this if we deploy the app and it's not updateable
const appInfo = await this._algorand.app.getById(this.appId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely would be good to cache the program bytes. If the app factory has the bytes because it just created the app then it should pass them in to the ctor too.

Can we a separate PR though.

@joe-p joe-p merged commit cfa6518 into main Oct 24, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants