-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
eth_getStorageAt api can not work with go-etheruem/ethclient and umbracle/go-web3 #1822
Comments
Hey, I don't think your description is correct. How geth represents these types internally doesn't necessary match the json rpc spec. Take a look at this: https://eth.wiki/json-rpc/API#eth_getstorageat |
@alcuadrado thanks for the link. what I paste above is geth's client side code, not server side code. so it will send the key as hash with leading zeros. And I tried and found the geth server node will accept two forms of data. But the eips also have some inconsistencies , like the eth_getproof api take the keys as 32bytes hash. It is up to you to remove the restriction or just close this. |
I think this is a duplicate of #1585. Tentatively closing this, but please re-open if you think it's a different issue. |
@fvictorio while the linked issue is correct about not accepting leading zeros for |
@meetmangukiya you are right. In fact, I think the storage slot must always have 64 characters. We have a new issue about this: #2230 |
@fvictorio right, the regex certainly looks like it |
#1700 (comment)
The storage‘s key/value in ethereum is fixed 20 bytes, and should be encoded as Hash. But it seems hardhat take it as integer and only accept data without leading zeros.
Here is the signature from ethereuem's go code :
and hardhat node will report error:
The text was updated successfully, but these errors were encountered: