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
getStorageAt()
rejects properly padded storage addresses starting with zeros
#2709
Comments
This issue is also being tracked on Linear. We use Linear to manage our development process, but we keep the conversations on Github. LINEAR-ID: 90203a2a-e723-4825-a069-2ee3a443d523 |
Facing the same issue, looks like ethers.js is actually trimming zeroes from the padded string. |
hardhat-ethers 2.0.6 strips the zeros in index.ts:hexValue(), and hardhat 2.9.5 changed the type of slot from quantity to Storageslot. The Storageslot validation function requires all the leading zeros so getStorageAt() always fails. |
I think this comes from ethers. See this issue. This was working before because both us and ethers were going together against the spec 😅 By the way, we recently released a new package (in beta) to help with things like these. If anyone is interested in trying it, check this doc. I'm going to close this issue now since there's not much we can do on our side. |
Og Hardhat 2.9.5 this code causes an error despite the storage address being correctly padded to 66 characters
As I understand it something like "0x6" should be rejected but a number with all the leading zeros should not cause this error. Currently both are rejected.
How to reproduce
Run this in the shell:
Output:
The text was updated successfully, but these errors were encountered: