-
Notifications
You must be signed in to change notification settings - Fork 236
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
feat(provider
): eth_getAccount
support
#760
Conversation
crates/rpc-types/src/eth/account.rs
Outdated
@@ -41,6 +41,20 @@ pub struct EIP1186AccountProofResponse { | |||
pub storage_proof: Vec<EIP1186StorageProof>, | |||
} | |||
|
|||
/// Response for `eth_getAccount` | |||
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] | |||
#[serde(rename_all = "camelCase")] |
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.
do we have an Account struct in alloy-consensus? if not i would prefer to push this down and ensure it has RLP encoding
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.
one note here, the eth api proposal for this was closed because this no longer makes sense post verkle, but rpc providers currently support this, so reasonable to add
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.
lgtm
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.
still needs struct pushed down
yeah, I realized we don't have eip1186 types in the eips crate yet, so I think we should move them separately. |
the account struct should be in consensus, as it's an member of the state trie, no? |
where do you want me to put this, consensus/account.rs ? |
that'd be great. I can get to it in a couple hours if you don't. if you want to merge this before adding the RLP impl, please open an issue to follow up 🫡 |
this would introduce alloy-consensus dep in provider, not sure if we want this |
don't we already have that indirectly via receipts and txenvelopes? |
ah we indeed have this already |
* feat: eth_getAccount on provider * chore: use rpc with block * move account to consensus --------- Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Motivation
See https://t.me/ethers_rs/37923.
Solution
Implement
eth_getAccount
.Haven't added a test, as Anvil doesn't implement the method—needs an anvil companion PR
PR Checklist