-
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
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.
Can you add a bit more docs comments to this contract to make it more clear what the purpose of each part is? Thank you!
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.
The public functions have docstrings, and the private functions are implementation details. I only ported the Go code over, I'm not an expert in the details of how the underlying code works.
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 |
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.