Skip to content
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(anvil): delegate eth_getproof in forking mode #2832

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

mattsse
Copy link
Member

@mattsse mattsse commented Aug 18, 2022

Motivation

Closes #2744

Solution

if in forking mode and no blocks mined yet, delegate the eth_getProof call to the provider

@mattsse mattsse added T-feature Type: feature C-anvil Command: anvil labels Aug 18, 2022
let keys = ethers::utils::serialize(&keys);
let block_number =
ethers::utils::serialize(&block_number.unwrap_or_else(|| BlockNumber::Latest.into()));
self.provider().request("eth_getProof", [address, keys, block_number]).await
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh nice, can unify the responses as well

@gakonst gakonst merged commit c418bfd into foundry-rs:master Aug 18, 2022
iFrostizz pushed a commit to iFrostizz/foundry that referenced this pull request Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-anvil Command: anvil T-feature Type: feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eth_getProof returns Required data unavailable when running anvil in forked mode
2 participants