-
Notifications
You must be signed in to change notification settings - Fork 8
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
Conversation
Moved to draft until I add a test for ARC56 constant block-offset errors |
I assume all the .md files automatically generated? Or should a review inspect each line? |
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": [ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Yeah they are generated by TypeDoc so no need for manual review |
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) |
There was a problem hiding this comment.
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.
Proposed Changes
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