-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(cast/bin) ; correcting the offset of Storage #6370
Conversation
_paused | bool | 0 | 20 | 1 | 0 | 0x0000000000000000000000000000000000000000000000000000000000000000 | contracts/Create2Deployer.sol:Create2Deployer | Ty lot lot @mattsse you're a genius !!! |
@DaniPopes mind giving this a review, there's perhaps a better way to get the range (offset, num bytes)
@pcaversaccio we have value, hex value, I think we don't need an extra column with the raw hex value of the slot? but I guess value formatting could use some work? |
Agreed - having the slot value as a normal number is enough IMO. Re the second comment, fully agree. For example, the value of an |
pinging @DaniPopes @mattsse |
will prio this myself this week @pcaversaccio |
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.
on this—I think we could try and coerce the value to its corresponding type if it's not a complex type, but I feel this would cause more trouble than it's worth for the more complex cases.
I also believe that we should keep the hex value column coming from the above, as we want the hex representation for things like strings, addresses and etc.
I say let's merge and improve downstream in another PR
Adding an example for bool offset calculating values as not 0 or 1
isUserCancelEnabled, allowPublicKeeper, allowUserCloseOnly
|
is this an issue? |
ref #6319
i still didn't get how to make it 0 or 1, actually what i'm having running the command
cast storage --rpc-url https://mainnet.optimism.io --etherscan-api-key <YOUR_API_KEY> 0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2
is 253 for the _paused variable, which should return 0 in our case, i'am totally doing bad thing on how the bytes are being interpreted