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

Integrate symbolic storage generation script into a Kontrol command #905

Open
palinatolmach opened this issue Dec 6, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@palinatolmach
Copy link
Collaborator

We should integrate the symbolic storage generation functionality developed by @lucasmt into Kontrol as a separate command.

Specifically, this python script reads the storage layout of a contract in JSON format and automatically generates a Solidity file with constants indicating the storage slot and offset for each storage variable. The files it generates look like this, and this shell script exemplifies how to use it.

This is very useful when we need to setup the contract storage with symbolic variables and other cases where we need to use the load and store cheatcodes, because it means that instead of hardcoding the slots and offsets we can just use the constants, and if the storage layout changes and variables get moved around, we just need to re-run the script to update the values.

@palinatolmach palinatolmach added the enhancement New feature or request label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant