-
Notifications
You must be signed in to change notification settings - Fork 237
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: use U256 for eth_getStorageAt #133
Conversation
crates/providers/src/provider.rs
Outdated
.await | ||
// Key is a QUANTITY according to the [spec](https://eth.wiki/json-rpc/API#eth_getstorageat). | ||
// See: https://github.com/gakonst/ethers-rs/blob/b60c7fe1fea41a902e3b62dc716d45b326520fd0/ethers-providers/src/rpc/provider.rs#L674 | ||
let key = U256::from_be_bytes(key.into()); |
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.
Should this be changed in the parameter?
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.
I think so, the user should do that, the storageKey type is intended for the server so the off spec format is also supported
we should use spec compliance here
crates/providers/src/provider.rs
Outdated
.await | ||
// Key is a QUANTITY according to the [spec](https://eth.wiki/json-rpc/API#eth_getstorageat). | ||
// See: https://github.com/gakonst/ethers-rs/blob/b60c7fe1fea41a902e3b62dc716d45b326520fd0/ethers-providers/src/rpc/provider.rs#L674 | ||
let key = U256::from_be_bytes(key.into()); |
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.
I think so, the user should do that, the storageKey type is intended for the server so the off spec format is also supported
we should use spec compliance here
ed0b73c
to
14ebfe6
Compare
Motivation
fix (maybe) foundry-rs/foundry#6855
See links in comments
Solution
PR Checklist