diff --git a/crates/provider/src/fillers/nonce.rs b/crates/provider/src/fillers/nonce.rs index 273499bab72..ad81f83ac13 100644 --- a/crates/provider/src/fillers/nonce.rs +++ b/crates/provider/src/fillers/nonce.rs @@ -46,6 +46,8 @@ impl NonceManager for SimpleNonceManager { } } +/// Cached nonce manager +/// /// This [`NonceManager`] implementation will fetch the transaction count for any new account it /// sees, store it locally and increment the locally stored nonce as transactions are sent via /// [`Provider::send_transaction`]. diff --git a/crates/rpc-types-eth/src/simulate.rs b/crates/rpc-types-eth/src/simulate.rs index 3ffd395abe4..c27750449c1 100644 --- a/crates/rpc-types-eth/src/simulate.rs +++ b/crates/rpc-types-eth/src/simulate.rs @@ -1,9 +1,9 @@ //! 'eth_simulateV1' Request / Response types: -use alloy_primitives::{Bytes}; +use alloy_primitives::Bytes; use serde::{Deserialize, Serialize}; -use crate::{state::StateOverride, Block, Log, BlockOverrides, TransactionRequest}; +use crate::{state::StateOverride, Block, BlockOverrides, Log, TransactionRequest}; /// The maximum number of blocks that can be simulated in a single request, pub const MAX_SIMULATE_BLOCKS: u64 = 256; @@ -147,11 +147,21 @@ mod tests { assert_eq!(sim_opts.block_state_calls.len(), 2); let block_state_call_1 = &sim_opts.block_state_calls[0]; - assert!(block_state_call_1.state_overrides.contains_key(&address_1)); - assert_eq!(block_state_call_1.state_overrides.get(&address_1).unwrap().nonce.unwrap(), 5); + assert!(block_state_call_1.state_overrides.as_ref().unwrap().contains_key(&address_1)); + assert_eq!( + block_state_call_1 + .state_overrides + .as_ref() + .unwrap() + .get(&address_1) + .unwrap() + .nonce + .unwrap(), + 5 + ); let block_state_call_2 = &sim_opts.block_state_calls[1]; - assert!(block_state_call_2.state_overrides.contains_key(&address_1)); + assert!(block_state_call_2.state_overrides.as_ref().unwrap().contains_key(&address_1)); assert_eq!(block_state_call_2.calls.len(), 2); assert_eq!(block_state_call_2.calls[0].from.unwrap(), address_1);