-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add new LinearCodeAddressGenerator contract #467
base: master
Are you sure you want to change the base?
Conversation
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.
Left a couple clarifying questions. My main question is whether index
needs to be tracked in contract or some struct's state or if that's relegated to some lower-level state.
Approved but CI failing. Looks like the go assets need to be updated as well. |
I'm back from time off and looking at this today |
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.
Nice!
Nit: I think address(index: 0) should fail |
right thanks @bluesign. |
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.
Sweet! Thank you @turbolent, feel free to merge
okay. Can you add a little blurb about it in the README with intended import addresses also like there is for other contracts? Once that is added, I'm okay with you merging it |
@joshuahannan Added the contract to the README. I don't know where the code will be deployed, we can add a table once it is. I initially ported the code assuming it would be needed for some migration code in flow-go, but we don't need it anymore. Even though we don't need it for that purpose, I feel like the functionality is still useful. Maybe it can be deployed to the service account? WDYT? |
yeah, I think the service account makes sense. I'm fine with merging this and deploying it on testnet as soon as you think it is ready. |
Port the linear code address generator from https://github.com/onflow/flow-go/blob/master/model/flow/address.go to Cadence.
We'll likely need this for the migration code of onflow/cadence#3584, which will be implemented as a Cadence contract.