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

Export storage slots and note type ids as part of the contract's artifacts #4518

Closed
nventuro opened this issue Feb 8, 2024 · 1 comment
Closed

Comments

@nventuro
Copy link
Contributor

nventuro commented Feb 8, 2024

#4200 added automatic storage slot allocation, #4500 introduced note type ids (soon to be autogenerated). These values are not currently available outside of the contract, but there's multiple applications that might require them. This is not unique to Aztec: as an example, Solidity exposes the storage layout to ease smart contract upgrades.

In our case, both of these values are required when manually adding notes to PXE, since these values are neede to call compute_note_hash_and_nullifier. Our guides (and tests) are currently forced to include these magic values, and this is only going to get worse once note type ids are autogenerated and become more obscure.

Since we typically care about note type ids in the context of the underlying note that corresponds to each state variable, a reasonable way to do it might be to expose the different state variable along with their storage slot and note type id. I don't think we'll care very much about which id corresponds to which note type, only the state variables.

@LHerskind
Copy link
Contributor

Replaced by #5079

@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants