-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix for Vyper immutables transformations #22
Conversation
Hmm right this is because we infer the immutables in Solidity from |
Right 👍 |
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.
Makes sense for me.
Just, please update the live DB schemas too
Plus, tests are failing
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.
Looks great for me! Just curious why did I put this 32 bytes condition in the first place :) Is it the case that Solidity immutable variables always are 32 bytes?
I assumed it as true looking at that constraint |
It seems so: "For these values, 32 bytes are reserved, even if they would fit in fewer bytes. Due to this, constant values can sometimes be cheaper than immutable values" https://docs.soliditylang.org/en/latest/contracts.html#constant-and-immutable-state-variables |
@marcocastignoli This also makes me realize, one condition the optimizer sometimes puts constants in bytecode is when it reaches 32 bytes. Only then it probably makes sense costwise. This seems necessary but does not always lead to being written in the bytecode |
Vyper
immutables
transformation value is not limited of 32 bytes length. We should drop that part of the constraint in order to support Vyper contracts.