Skip to content

Commit

Permalink
chore: unrelated fix from alloy upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Evalir committed Feb 14, 2024
1 parent 8ac95d1 commit 9291143
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/anvil/src/eth/backend/fork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ impl ClientFork {

let block_id = BlockId::Number(blocknumber.into());

let code = self.provider().get_code_at(address, block_id).await?;
let code = self.provider().get_code_at(address, Some(block_id)).await?;

let mut storage = self.storage_write();
storage.code_at.insert((address, blocknumber), code.clone().0.into());
Expand Down
5 changes: 2 additions & 3 deletions crates/evm/core/src/fork/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{
};
use alloy_primitives::{keccak256, Address, Bytes, B256, U256};
use alloy_providers::provider::TempProvider;
use alloy_rpc_types::{Block, BlockId, BlockNumberOrTag, Transaction};
use alloy_rpc_types::{Block, BlockId, Transaction};
use eyre::WrapErr;
use foundry_common::NON_ARCHIVE_NODE_WARNING;
use futures::{
Expand Down Expand Up @@ -196,8 +196,7 @@ where
let fut = Box::pin(async move {
let balance = provider.get_balance(address, block_id);
let nonce = provider.get_transaction_count(address, block_id);
let code =
provider.get_code_at(address, block_id.unwrap_or(BlockNumberOrTag::Latest.into()));
let code = provider.get_code_at(address, block_id);
let resp = tokio::try_join!(balance, nonce, code).map_err(Into::into);
(resp, address)
});
Expand Down

0 comments on commit 9291143

Please sign in to comment.