diff --git a/Cargo.lock b/Cargo.lock index fd4e2e0c62fb..7308606c9e3c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7029,9 +7029,9 @@ checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" [[package]] name = "redox_syscall" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355ae415ccd3a04315d3f8246e86d67689ea74d88d915576e1589a351062a13b" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] @@ -7622,9 +7622,9 @@ dependencies = [ [[package]] name = "scc" -version = "2.1.17" +version = "2.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c947adb109a8afce5fc9c7bf951f87f146e9147b3a6a58413105628fb1d1e66" +checksum = "215b1103f73e23e9cb6883072c1fb26ae55c09d42054654955c739e5418a7c96" dependencies = [ "sdd", ] diff --git a/Cargo.toml b/Cargo.toml index 228bac2909fc..ae6ee18250fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -172,7 +172,7 @@ foundry-fork-db = "0.3.2" solang-parser = "=0.3.3" ## revm -revm = { version = "14.0.2", default-features = false } +revm = { version = "14.0.3", default-features = false } revm-primitives = { version = "10.0.0", default-features = false } revm-inspectors = { version = "0.7.7", features = ["serde"] } @@ -203,17 +203,17 @@ alloy-transport-ipc = { version = "0.3.6", default-features = false } alloy-transport-ws = { version = "0.3.6", default-features = false } ## alloy-core -alloy-dyn-abi = "0.8.1" -alloy-json-abi = "0.8.1" -alloy-primitives = { version = "0.8.1", features = [ +alloy-dyn-abi = "0.8.5" +alloy-json-abi = "0.8.5" +alloy-primitives = { version = "0.8.5", features = [ "getrandom", "rand", "map-fxhash", ] } -alloy-sol-macro-expander = "0.8.1" -alloy-sol-macro-input = "0.8.1" -alloy-sol-types = "0.8.1" -syn-solidity = "0.8.1" +alloy-sol-macro-expander = "0.8.5" +alloy-sol-macro-input = "0.8.5" +alloy-sol-types = "0.8.5" +syn-solidity = "0.8.5" alloy-chains = "0.1" alloy-rlp = "0.3" diff --git a/crates/anvil/src/config.rs b/crates/anvil/src/config.rs index d907fc200f53..f3dbf21f6013 100644 --- a/crates/anvil/src/config.rs +++ b/crates/anvil/src/config.rs @@ -17,7 +17,7 @@ use crate::{ }; use alloy_genesis::Genesis; use alloy_network::AnyNetwork; -use alloy_primitives::{hex, utils::Unit, BlockNumber, TxHash, U256}; +use alloy_primitives::{hex, map::HashMap, utils::Unit, BlockNumber, TxHash, U256}; use alloy_provider::Provider; use alloy_rpc_types::{Block, BlockNumberOrTag, Transaction}; use alloy_serde::WithOtherFields; @@ -46,7 +46,6 @@ use rand::thread_rng; use revm::primitives::BlobExcessGasAndPrice; use serde_json::{json, to_writer, Value}; use std::{ - collections::HashMap, fmt::Write as FmtWrite, fs::File, net::{IpAddr, Ipv4Addr}, diff --git a/crates/anvil/src/eth/backend/cheats.rs b/crates/anvil/src/eth/backend/cheats.rs index 5e941d004643..32115cf41c13 100644 --- a/crates/anvil/src/eth/backend/cheats.rs +++ b/crates/anvil/src/eth/backend/cheats.rs @@ -1,8 +1,8 @@ //! Support for "cheat codes" / bypass functions -use alloy_primitives::Address; +use alloy_primitives::{map::AddressHashSet, Address}; use parking_lot::RwLock; -use std::{collections::HashSet, sync::Arc}; +use std::sync::Arc; /// Manages user modifications that may affect the node's behavior /// @@ -55,7 +55,7 @@ impl CheatsManager { } /// Returns all accounts that are currently being impersonated. - pub fn impersonated_accounts(&self) -> HashSet
{ + pub fn impersonated_accounts(&self) -> AddressHashSet { self.state.read().impersonated_accounts.clone() } } @@ -64,7 +64,7 @@ impl CheatsManager { #[derive(Clone, Debug, Default)] pub struct CheatsState { /// All accounts that are currently impersonated - pub impersonated_accounts: HashSet, + pub impersonated_accounts: AddressHashSet, /// If set to true will make the `is_impersonated` function always return true pub auto_impersonate_accounts: bool, } diff --git a/crates/anvil/src/eth/backend/fork.rs b/crates/anvil/src/eth/backend/fork.rs index c661eeaa89b8..ea41b85a954c 100644 --- a/crates/anvil/src/eth/backend/fork.rs +++ b/crates/anvil/src/eth/backend/fork.rs @@ -4,7 +4,10 @@ use crate::eth::{backend::db::Db, error::BlockchainError, pool::transactions::Po use alloy_consensus::Account; use alloy_eips::eip2930::AccessListResult; use alloy_network::BlockResponse; -use alloy_primitives::{Address, Bytes, StorageValue, B256, U256}; +use alloy_primitives::{ + map::{FbHashMap, HashMap}, + Address, Bytes, StorageValue, B256, U256, +}; use alloy_provider::{ ext::{DebugApi, TraceApi}, Provider, @@ -27,7 +30,7 @@ use parking_lot::{ RawRwLock, RwLock, }; use revm::primitives::BlobExcessGasAndPrice; -use std::{collections::HashMap, sync::Arc, time::Duration}; +use std::{sync::Arc, time::Duration}; use tokio::sync::RwLock as AsyncRwLock; /// Represents a fork of a remote client @@ -675,14 +678,14 @@ impl ClientForkConfig { /// This is used as a cache so repeated requests to the same data are not sent to the remote client #[derive(Clone, Debug, Default)] pub struct ForkedStorage { - pub uncles: HashMap(
tx: &mut WithOtherFields