Closed
Description
Describe the feature
for evm fork testing we currently need to send 3 requests: balance,code,nonce
It would be more useful to have this info in a dedicated endpoint.
there is eth_getAccount
, but this returns the trie account, with codehash and storageroot which is not quite what we need for fork testing.
we basically need this info type as an rpc response
pub struct AccountInfo {
/// Account balance
pub balance: U256,
/// Account nonce
pub nonce: u64,
/// Account code
pub code: Bytes,
}
TODO
- we can first prototype this type in alloy-rpc-eth, replacing this type https://github.com/alloy-rs/alloy/blob/79e47906f8df58f2d0f69516374ea841c485bc39/crates/rpc-types-eth/src/account.rs#L9-L15
- then we can add provider function like https://github.com/alloy-rs/alloy/blob/79e47906f8df58f2d0f69516374ea841c485bc39/crates/provider/src/provider/trait.rs#L351-L355
Once we have that, we can add this to reth by
- adding support for this like
reth/crates/rpc/rpc-eth-api/src/core.rs
Lines 702 to 710 in 61a0345
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done