-
-
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
storageAt Error: hex data is odd-length #1132
Comments
What backend is this? Can you send me an address and storage position and backend you used for this? This used to be a bug in old versions of ganache. I’ll fix it, but curious about who’s doing this. :) |
This was running in a test against hardhat : https://github.com/nomiclabs/hardhat |
It looks like this was fixed upstream. And I'm debating now whether it makes sense for ethers to try interpreting this sort of result. If treated as a bytes, it should pad on the right, if a value pad on the left. Since it is ambiguous, I think I'm going to recommend not handling invalid data in this case... I'm open to discussion though. |
Closing this now, but please feel free to re-open to continue discussions. Thanks! :) |
When calling provider.getStorageAt to a storage slot with zero data I get :
I guess this is because the raw data from the rpc is "0x0" and ethers does not try to sanitize that before passing to hexlify here :
ethers.js/packages/providers/src.ts/base-provider.ts
Line 973 in e0b1d0e
The text was updated successfully, but these errors were encountered: