Skip to content

Commit

Permalink
chore(deps): bump alloy-core 0.8.6 (foundry-rs#9045)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Oct 7, 2024
1 parent d7d9b40 commit 3b2e999
Show file tree
Hide file tree
Showing 43 changed files with 110 additions and 162 deletions.
60 changes: 32 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ alloy-json-abi = "0.8.5"
alloy-primitives = { version = "0.8.5", features = [
"getrandom",
"rand",
"map-fxhash",
"map-foldhash",
] }
alloy-sol-macro-expander = "0.8.5"
alloy-sol-macro-input = "0.8.5"
Expand Down Expand Up @@ -249,7 +249,6 @@ k256 = "0.13"
parking_lot = "0.12"
mesc = "0.3"
rand = "0.8"
rustc-hash = "2.0"
semver = "1"
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["arbitrary_precision"] }
Expand Down
7 changes: 2 additions & 5 deletions crates/anvil/src/eth/backend/mem/in_memory_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ use crate::{
mem::state::state_root,
revm::{db::DbAccount, primitives::AccountInfo},
};
use alloy_primitives::{Address, B256, U256, U64};
use alloy_primitives::{map::HashMap, Address, B256, U256, U64};
use alloy_rpc_types::BlockId;
use foundry_evm::{
backend::{BlockchainDb, DatabaseResult, StateSnapshot},
hashbrown::HashMap,
};
use foundry_evm::backend::{BlockchainDb, DatabaseResult, StateSnapshot};

// reexport for convenience
pub use foundry_evm::{backend::MemDb, revm::db::DatabaseRef};
Expand Down
3 changes: 1 addition & 2 deletions crates/anvil/src/eth/backend/mem/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,8 @@ pub struct MinedTransactionReceipt {
}

#[cfg(test)]
#[allow(clippy::needless_return)]
mod tests {
#![allow(clippy::needless_return)]

use super::*;
use crate::eth::backend::db::Db;
use alloy_primitives::{hex, Address};
Expand Down
14 changes: 5 additions & 9 deletions crates/anvil/src/eth/pool/transactions.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
use crate::eth::{error::PoolError, util::hex_fmt_many};
use alloy_primitives::{Address, TxHash};
use alloy_primitives::{
map::{HashMap, HashSet},
Address, TxHash,
};
use alloy_rpc_types::Transaction as RpcTransaction;
use alloy_serde::WithOtherFields;
use anvil_core::eth::transaction::{PendingTransaction, TypedTransaction};
use parking_lot::RwLock;
use std::{
cmp::Ordering,
collections::{BTreeSet, HashMap, HashSet},
fmt,
str::FromStr,
sync::Arc,
time::Instant,
};
use std::{cmp::Ordering, collections::BTreeSet, fmt, str::FromStr, sync::Arc, time::Instant};

/// A unique identifying marker for a transaction
pub type TxMarker = Vec<u8>;
Expand Down
1 change: 0 additions & 1 deletion crates/cheatcodes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ p256 = "0.13.2"
ecdsa = "0.16"
rand = "0.8"
revm.workspace = true
rustc-hash.workspace = true
semver.workspace = true
serde_json.workspace = true
thiserror.workspace = true
Expand Down
7 changes: 2 additions & 5 deletions crates/cheatcodes/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{
};
use alloy_consensus::TxEnvelope;
use alloy_genesis::{Genesis, GenesisAccount};
use alloy_primitives::{Address, Bytes, B256, U256};
use alloy_primitives::{map::HashMap, Address, Bytes, B256, U256};
use alloy_rlp::Decodable;
use alloy_sol_types::SolValue;
use foundry_common::fs::{read_json_file, write_json_file};
Expand All @@ -16,10 +16,7 @@ use foundry_evm_core::{
};
use rand::Rng;
use revm::primitives::{Account, Bytecode, SpecId, KECCAK_EMPTY};
use std::{
collections::{BTreeMap, HashMap},
path::Path,
};
use std::{collections::BTreeMap, path::Path};

mod fork;
pub(crate) mod mapping;
Expand Down
3 changes: 1 addition & 2 deletions crates/cheatcodes/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ use super::string::parse;
use crate::{Cheatcode, Cheatcodes, CheatcodesExecutor, CheatsCtxt, Result, Vm::*};
use alloy_dyn_abi::DynSolType;
use alloy_json_abi::ContractObject;
use alloy_primitives::{hex, Bytes, U256};
use alloy_primitives::{hex, map::Entry, Bytes, U256};
use alloy_sol_types::SolValue;
use dialoguer::{Input, Password};
use foundry_common::fs;
use foundry_config::fs_permissions::FsAccessKind;
use revm::interpreter::CreateInputs;
use semver::Version;
use std::{
collections::hash_map::Entry,
io::{BufRead, BufReader, Write},
path::{Path, PathBuf},
process::Command,
Expand Down
3 changes: 1 addition & 2 deletions crates/cheatcodes/src/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ use revm::{
primitives::{BlockEnv, CreateScheme, EVMError, EvmStorageSlot, SpecId, EOF_MAGIC_BYTES},
EvmContext, InnerEvmContext, Inspector,
};
use rustc_hash::FxHashMap;
use serde_json::Value;
use std::{
collections::{BTreeMap, VecDeque},
Expand Down Expand Up @@ -413,7 +412,7 @@ pub struct Cheatcodes {
pub expected_emits: VecDeque<ExpectedEmit>,

/// Map of context depths to memory offset ranges that may be written to within the call depth.
pub allowed_mem_writes: FxHashMap<u64, Vec<Range<u64>>>,
pub allowed_mem_writes: HashMap<u64, Vec<Range<u64>>>,

/// Current broadcasting information
pub broadcast: Option<Broadcast>,
Expand Down
7 changes: 5 additions & 2 deletions crates/cheatcodes/src/test/expect.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
use crate::{Cheatcode, Cheatcodes, CheatsCtxt, Error, Result, Vm::*};
use alloy_primitives::{address, hex, Address, Bytes, LogData as RawLog, U256};
use alloy_primitives::{
address, hex,
map::{hash_map::Entry, HashMap},
Address, Bytes, LogData as RawLog, U256,
};
use alloy_sol_types::{SolError, SolValue};
use foundry_common::ContractsByArtifact;
use foundry_evm_core::decode::RevertDecoder;
use revm::interpreter::{
return_ok, InstructionResult, Interpreter, InterpreterAction, InterpreterResult,
};
use spec::Vm;
use std::collections::{hash_map::Entry, HashMap};

/// For some cheatcodes we may internally change the status of the call, i.e. in `expectRevert`.
/// Solidity will see a successful call and attempt to decode the return data. Therefore, we need
Expand Down
1 change: 0 additions & 1 deletion crates/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ dunce.workspace = true
eyre.workspace = true
num-format.workspace = true
reqwest.workspace = true
rustc-hash.workspace = true
semver.workspace = true
serde_json.workspace = true
serde.workspace = true
Expand Down
8 changes: 4 additions & 4 deletions crates/common/src/evm.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! cli arguments for configuring the evm settings
use alloy_primitives::{Address, B256, U256};
//! CLI arguments for configuring the EVM settings.
use alloy_primitives::{map::HashMap, Address, B256, U256};
use clap::{ArgAction, Parser};
use eyre::ContextCompat;
use foundry_config::{
Expand All @@ -11,11 +12,10 @@ use foundry_config::{
},
Chain, Config,
};
use rustc_hash::FxHashMap;
use serde::Serialize;

/// Map keyed by breakpoints char to their location (contract address, pc)
pub type Breakpoints = FxHashMap<char, (Address, usize)>;
pub type Breakpoints = HashMap<char, (Address, usize)>;

/// `EvmArgs` and `EnvArgs` take the highest precedence in the Config/Figment hierarchy.
///
Expand Down
3 changes: 1 addition & 2 deletions crates/common/src/selectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,8 @@ pub fn parse_signatures(tokens: Vec<String>) -> ParsedSignatures {
}

#[cfg(test)]
#[allow(clippy::needless_return)]
mod tests {
#![allow(clippy::needless_return)]

use super::*;

#[tokio::test(flavor = "multi_thread")]
Expand Down
Loading

0 comments on commit 3b2e999

Please sign in to comment.