diff --git a/Cargo.lock b/Cargo.lock index 67c48847968b5..276ac2d0dcfe5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -79,7 +79,7 @@ dependencies = [ [[package]] name = "alloy-consensus" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-eips", "alloy-primitives", @@ -94,7 +94,7 @@ dependencies = [ [[package]] name = "alloy-contract" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -134,7 +134,7 @@ dependencies = [ [[package]] name = "alloy-eips" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -148,11 +148,12 @@ dependencies = [ [[package]] name = "alloy-genesis" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-primitives", "alloy-serde", "serde", + "serde_json", ] [[package]] @@ -170,7 +171,7 @@ dependencies = [ [[package]] name = "alloy-json-rpc" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-primitives", "serde", @@ -182,7 +183,7 @@ dependencies = [ [[package]] name = "alloy-network" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-consensus", "alloy-eips", @@ -226,7 +227,7 @@ dependencies = [ [[package]] name = "alloy-provider" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-eips", "alloy-json-rpc", @@ -257,7 +258,7 @@ dependencies = [ [[package]] name = "alloy-pubsub" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -297,7 +298,7 @@ dependencies = [ [[package]] name = "alloy-rpc-client" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -321,7 +322,7 @@ dependencies = [ [[package]] name = "alloy-rpc-types" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-consensus", "alloy-eips", @@ -339,7 +340,7 @@ dependencies = [ [[package]] name = "alloy-rpc-types-engine" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-consensus", "alloy-eips", @@ -356,7 +357,7 @@ dependencies = [ [[package]] name = "alloy-rpc-types-trace" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-primitives", "alloy-rpc-types", @@ -368,7 +369,7 @@ dependencies = [ [[package]] name = "alloy-serde" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-primitives", "serde", @@ -378,7 +379,7 @@ dependencies = [ [[package]] name = "alloy-signer" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-dyn-abi", "alloy-primitives", @@ -393,7 +394,7 @@ dependencies = [ [[package]] name = "alloy-signer-aws" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-consensus", "alloy-network", @@ -410,7 +411,7 @@ dependencies = [ [[package]] name = "alloy-signer-ledger" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-consensus", "alloy-network", @@ -427,7 +428,7 @@ dependencies = [ [[package]] name = "alloy-signer-trezor" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-consensus", "alloy-network", @@ -443,7 +444,7 @@ dependencies = [ [[package]] name = "alloy-signer-wallet" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-consensus", "alloy-network", @@ -520,7 +521,7 @@ dependencies = [ [[package]] name = "alloy-transport" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-json-rpc", "base64 0.22.0", @@ -538,7 +539,7 @@ dependencies = [ [[package]] name = "alloy-transport-http" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -551,7 +552,7 @@ dependencies = [ [[package]] name = "alloy-transport-ipc" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-json-rpc", "alloy-pubsub", @@ -571,7 +572,7 @@ dependencies = [ [[package]] name = "alloy-transport-ws" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=8808d21#8808d21677ed9a05ff04000ac7f4acdd2fde94e3" +source = "git+https://github.com/alloy-rs/alloy?rev=ca54552#ca54552075da02339f678e5b591877ff6c2939db" dependencies = [ "alloy-pubsub", "alloy-transport", @@ -7015,8 +7016,7 @@ dependencies = [ [[package]] name = "revm" version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a454c1c650b2b2e23f0c461af09e6c31e1d15e1cbebe905a701c46b8a50afc" +source = "git+https://github.com/wevm/revm?branch=jxom/eip-3074-v8#66a499fc281b493a34ee42069309cf7aed363052" dependencies = [ "auto_impl", "cfg-if", @@ -7030,7 +7030,7 @@ dependencies = [ [[package]] name = "revm-inspectors" version = "0.1.0" -source = "git+https://github.com/paradigmxyz/evm-inspectors?rev=813d7e7#813d7e73a090d426935e63d9308bdd2c945a58c4" +source = "git+https://github.com/jxom/evm-inspectors?branch=jxom/eip-3074#8cbdfe5e78381c4ac8d7e7fc050a11d2b5bddabb" dependencies = [ "alloy-primitives", "alloy-rpc-types", @@ -7047,8 +7047,7 @@ dependencies = [ [[package]] name = "revm-interpreter" version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d322f2730cd300e99d271a1704a2dfb8973d832428f5aa282aaa40e2473b5eec" +source = "git+https://github.com/wevm/revm?branch=jxom/eip-3074-v8#66a499fc281b493a34ee42069309cf7aed363052" dependencies = [ "revm-primitives", "serde", @@ -7057,16 +7056,13 @@ dependencies = [ [[package]] name = "revm-precompile" version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "931f692f3f4fc72ec39d5d270f8e9d208c4a6008de7590ee96cf948e3b6d3f8d" +source = "git+https://github.com/wevm/revm?branch=jxom/eip-3074-v8#66a499fc281b493a34ee42069309cf7aed363052" dependencies = [ "aurora-engine-modexp", "c-kzg", - "k256", "once_cell", "revm-primitives", "ripemd", - "secp256k1", "sha2", "substrate-bn", ] @@ -7074,8 +7070,7 @@ dependencies = [ [[package]] name = "revm-primitives" version = "3.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbbc9640790cebcb731289afb7a7d96d16ad94afeb64b5d0b66443bd151e79d6" +source = "git+https://github.com/wevm/revm?branch=jxom/eip-3074-v8#66a499fc281b493a34ee42069309cf7aed363052" dependencies = [ "alloy-primitives", "auto_impl", @@ -7088,7 +7083,9 @@ dependencies = [ "enumn", "hashbrown", "hex", + "k256", "once_cell", + "secp256k1", "serde", ] @@ -7556,7 +7553,6 @@ version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" dependencies = [ - "rand 0.8.5", "secp256k1-sys", ] diff --git a/Cargo.toml b/Cargo.toml index 3513cf6c18e5f..ec41b45bb35d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -142,9 +142,9 @@ foundry-compilers = { version = "0.3.18", default-features = false } ## revm # no default features to avoid c-kzg -revm = { version = "8", default-features = false } -revm-primitives = { version = "3", default-features = false } -revm-inspectors = { git = "https://github.com/paradigmxyz/evm-inspectors", rev = "813d7e7", features = [ +revm = { git = "https://github.com/wevm/revm", branch = "jxom/eip-3074-v8", default-features = false } +revm-primitives = { git = "https://github.com/wevm/revm", branch = "jxom/eip-3074-v8", default-features = false } +revm-inspectors = { git = "https://github.com/jxom/evm-inspectors", branch = "jxom/eip-3074", features = [ "serde", ] } @@ -157,28 +157,28 @@ ethers-providers = { version = "2.0.14", default-features = false } ethers-signers = { version = "2.0.14", default-features = false } ## alloy -alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-contract = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-json-rpc = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-pubsub = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-signer-wallet = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-signer-aws = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-signer-ledger = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-signer-trezor = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-transport = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-transport-ipc = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } -alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy", rev = "8808d21", default-features = false } +alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-contract = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-json-rpc = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-pubsub = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-signer-wallet = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-signer-aws = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-signer-ledger = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-signer-trezor = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-transport = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-transport-ipc = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } +alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy", rev = "ca54552", default-features = false } alloy-primitives = { version = "0.7.1", features = ["getrandom"] } alloy-dyn-abi = "0.7.1" alloy-json-abi = "0.7.1" diff --git a/crates/anvil/src/eth/api.rs b/crates/anvil/src/eth/api.rs index cc77746da7a75..5d8dfc1dc7a34 100644 --- a/crates/anvil/src/eth/api.rs +++ b/crates/anvil/src/eth/api.rs @@ -2652,6 +2652,7 @@ impl TryFrom, u128, State)>> for GasEs InstructionResult::CreateContractSizeLimit | InstructionResult::CreateContractStartingWithEF | InstructionResult::CreateInitCodeSizeLimit | + InstructionResult::ActiveAccountUnsetAuthCall | InstructionResult::FatalExternalError | InstructionResult::OutOfFunds | InstructionResult::CallTooDeep => Ok(Self::EvmError(exit)), diff --git a/crates/anvil/src/eth/backend/fork.rs b/crates/anvil/src/eth/backend/fork.rs index 0d456b3c613b2..df8c23d742397 100644 --- a/crates/anvil/src/eth/backend/fork.rs +++ b/crates/anvil/src/eth/backend/fork.rs @@ -2,7 +2,7 @@ use crate::eth::{backend::db::Db, error::BlockchainError}; use alloy_primitives::{Address, Bytes, StorageValue, B256, U256}; -use alloy_provider::{debug::DebugApi, Provider}; +use alloy_provider::{ext::DebugApi, Provider}; use alloy_rpc_types::{ request::TransactionRequest, AccessListWithGasUsed, Block, BlockId, BlockNumberOrTag as BlockNumber, BlockTransactions, EIP1186AccountProofResponse, FeeHistory, diff --git a/crates/anvil/src/hardfork.rs b/crates/anvil/src/hardfork.rs index 8fabace321be5..25042b1fdbb49 100644 --- a/crates/anvil/src/hardfork.rs +++ b/crates/anvil/src/hardfork.rs @@ -22,6 +22,7 @@ pub enum Hardfork { Paris, Shanghai, Cancun, + Prague, #[default] Latest, } @@ -46,6 +47,9 @@ impl Hardfork { Hardfork::Paris => 15537394, Hardfork::Shanghai => 17034870, Hardfork::Cancun | Hardfork::Latest => 19426587, + + // TODO: set fork block num once known + Hardfork::Prague => unreachable!(), } } @@ -98,6 +102,10 @@ impl Hardfork { // TODO: set fork hash once known ForkId { hash: ForkHash([0xc1, 0xfd, 0xf1, 0x81]), next: 0 } } + Hardfork::Prague => { + // TODO: set fork hash once known + ForkId { hash: ForkHash([0xc1, 0xfd, 0xf1, 0x81]), next: 0 } + } } } } @@ -125,6 +133,7 @@ impl FromStr for Hardfork { "paris" | "merge" | "15" => Hardfork::Paris, "shanghai" | "16" => Hardfork::Shanghai, "cancun" | "17" => Hardfork::Cancun, + "prague" | "18" => Hardfork::Prague, "latest" => Hardfork::Latest, _ => return Err(format!("Unknown hardfork {s}")), }; @@ -151,6 +160,7 @@ impl From for SpecId { Hardfork::GrayGlacier => SpecId::GRAY_GLACIER, Hardfork::Paris => SpecId::MERGE, Hardfork::Shanghai => SpecId::SHANGHAI, + Hardfork::Prague => SpecId::PRAGUE, Hardfork::Cancun | Hardfork::Latest => SpecId::CANCUN, } } diff --git a/crates/anvil/tests/it/anvil_api.rs b/crates/anvil/tests/it/anvil_api.rs index 01247fb280cc9..4f46d7525384e 100644 --- a/crates/anvil/tests/it/anvil_api.rs +++ b/crates/anvil/tests/it/anvil_api.rs @@ -7,7 +7,7 @@ use crate::{ }; use alloy_network::{EthereumSigner, TransactionBuilder}; use alloy_primitives::{address, fixed_bytes, Address, U256, U64}; -use alloy_provider::{txpool::TxPoolApi, Provider}; +use alloy_provider::{ext::TxPoolApi, Provider}; use alloy_rpc_types::{BlockId, BlockNumberOrTag, TransactionRequest, WithOtherFields}; use anvil::{eth::api::CLIENT_VERSION, spawn, Hardfork, NodeConfig}; use anvil_core::{ diff --git a/crates/anvil/tests/it/traces.rs b/crates/anvil/tests/it/traces.rs index 932e8e362f32a..2774f7e144528 100644 --- a/crates/anvil/tests/it/traces.rs +++ b/crates/anvil/tests/it/traces.rs @@ -1,7 +1,7 @@ use crate::{fork::fork_config, utils::http_provider_with_signer}; use alloy_network::{EthereumSigner, TransactionBuilder}; use alloy_primitives::{hex, Address, Bytes, U256}; -use alloy_provider::{debug::DebugApi, Provider}; +use alloy_provider::Provider; use alloy_rpc_types::{BlockNumberOrTag, TransactionRequest, WithOtherFields}; use alloy_rpc_types_trace::{ geth::{GethDebugTracingCallOptions, GethTrace}, diff --git a/crates/anvil/tests/it/txpool.rs b/crates/anvil/tests/it/txpool.rs index 40007447e5aa5..ed30e5acd0565 100644 --- a/crates/anvil/tests/it/txpool.rs +++ b/crates/anvil/tests/it/txpool.rs @@ -2,7 +2,7 @@ use alloy_network::TransactionBuilder; use alloy_primitives::U256; -use alloy_provider::{txpool::TxPoolApi, Provider}; +use alloy_provider::Provider; use alloy_rpc_types::{TransactionRequest, WithOtherFields}; use anvil::{spawn, NodeConfig}; diff --git a/crates/cast/bin/cmd/create2.rs b/crates/cast/bin/cmd/create2.rs index dae91c6422911..c841d171089e3 100644 --- a/crates/cast/bin/cmd/create2.rs +++ b/crates/cast/bin/cmd/create2.rs @@ -198,7 +198,7 @@ impl Create2Args { loop { // Stop if a result was found in another thread. if found.load(Ordering::Relaxed) { - break None; + break None } // Calculate the `CREATE2` address. diff --git a/crates/cast/src/rlp_converter.rs b/crates/cast/src/rlp_converter.rs index d0e94301ee658..417a7df672299 100644 --- a/crates/cast/src/rlp_converter.rs +++ b/crates/cast/src/rlp_converter.rs @@ -24,7 +24,7 @@ impl Decodable for Item { fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { let h = Header::decode(buf)?; if buf.len() < h.payload_length { - return Err(alloy_rlp::Error::InputTooShort); + return Err(alloy_rlp::Error::InputTooShort) } let mut d = &buf[..h.payload_length]; let r = if h.list { diff --git a/crates/cheatcodes/spec/src/vm.rs b/crates/cheatcodes/spec/src/vm.rs index 4bbf631690206..4ff0b3e9ff417 100644 --- a/crates/cheatcodes/spec/src/vm.rs +++ b/crates/cheatcodes/spec/src/vm.rs @@ -48,6 +48,8 @@ interface Vm { CallCode, /// The account was called via staticcall. StaticCall, + /// The account was called via authcall. + AuthCall, /// The account was created. Create, /// The account was selfdestructed. diff --git a/crates/cheatcodes/src/inspector.rs b/crates/cheatcodes/src/inspector.rs index b66d262e21dc8..ee418fd420433 100644 --- a/crates/cheatcodes/src/inspector.rs +++ b/crates/cheatcodes/src/inspector.rs @@ -968,6 +968,7 @@ impl Inspector for Cheatcodes { CallScheme::CallCode => crate::Vm::AccountAccessKind::CallCode, CallScheme::DelegateCall => crate::Vm::AccountAccessKind::DelegateCall, CallScheme::StaticCall => crate::Vm::AccountAccessKind::StaticCall, + CallScheme::AuthCall => crate::Vm::AccountAccessKind::AuthCall, }; // Record this call by pushing it to a new pending vector; all subsequent calls at // that depth will be pushed to the same vector. When the call ends, the diff --git a/crates/cheatcodes/src/string.rs b/crates/cheatcodes/src/string.rs index c98560a72f068..98fd1a792b7e5 100644 --- a/crates/cheatcodes/src/string.rs +++ b/crates/cheatcodes/src/string.rs @@ -190,7 +190,7 @@ fn parse_value_fallback(s: &str, ty: &DynSolType) -> Option write!(f, "{inner}"), DynSolValue::CustomStruct { name, prop_names, tuple } => { if self.raw { - return self.tuple(tuple, f); + return self.tuple(tuple, f) } f.write_str(name)?; diff --git a/crates/common/src/fmt/mod.rs b/crates/common/src/fmt/mod.rs index a43fe7dea0889..e6a4a73211ec0 100644 --- a/crates/common/src/fmt/mod.rs +++ b/crates/common/src/fmt/mod.rs @@ -68,7 +68,7 @@ pub fn format_uint_exp(num: U256) -> String { pub fn format_int_exp(num: I256) -> String { let (sign, abs) = num.into_sign_and_abs(); if abs < U256::from(10_000) { - return format!("{sign}{abs}"); + return format!("{sign}{abs}") } let exp = to_exp_notation(abs, 4, true, sign); diff --git a/crates/common/src/provider/mod.rs b/crates/common/src/provider/mod.rs index c8e9a0ba2733f..7c91575fed4f4 100644 --- a/crates/common/src/provider/mod.rs +++ b/crates/common/src/provider/mod.rs @@ -307,7 +307,7 @@ fn resolve_path(path: &Path) -> Result { fn resolve_path(path: &Path) -> Result { if let Some(s) = path.to_str() { if s.starts_with(r"\\.\pipe\") { - return Ok(path.to_path_buf()); + return Ok(path.to_path_buf()) } } Err(()) diff --git a/crates/config/src/lib.rs b/crates/config/src/lib.rs index 17d15a6b1da05..c59b478b143d5 100644 --- a/crates/config/src/lib.rs +++ b/crates/config/src/lib.rs @@ -376,6 +376,9 @@ pub struct Config { /// Should be removed once EvmVersion Cancun is supported by solc pub cancun: bool, + /// Temporary config to enable [SpecId::PRAGUE] + pub prague: bool, + /// Whether to enable call isolation. /// /// Useful for more correct gas accounting and EVM behavior in general. @@ -846,7 +849,9 @@ impl Config { /// Returns the [SpecId] derived from the configured [EvmVersion] #[inline] pub fn evm_spec_id(&self) -> SpecId { - if self.cancun { + if self.prague { + return SpecId::PRAGUE + } else if self.cancun { return SpecId::CANCUN } evm_spec_id(&self.evm_version) @@ -1912,6 +1917,7 @@ impl Default for Config { profile: Self::DEFAULT_PROFILE, fs_permissions: FsPermissions::new([PathPermission::read("out")]), cancun: false, + prague: false, isolate: false, __root: Default::default(), src: "src".into(), diff --git a/crates/debugger/src/tui/draw.rs b/crates/debugger/src/tui/draw.rs index b80a8a77a1079..a486ec220c19d 100644 --- a/crates/debugger/src/tui/draw.rs +++ b/crates/debugger/src/tui/draw.rs @@ -193,6 +193,7 @@ impl DebuggerContext<'_> { fn draw_src(&self, f: &mut Frame<'_>, area: Rect) { let text_output = self.src_text(area); let title = match self.call_kind() { + CallKind::AuthCall => "Auth call", CallKind::Create | CallKind::Create2 => "Contract creation", CallKind::Call => "Contract call", CallKind::StaticCall => "Contract staticcall", diff --git a/crates/doc/src/builder.rs b/crates/doc/src/builder.rs index ac54e97e21e22..e80393f4dff77 100644 --- a/crates/doc/src/builder.rs +++ b/crates/doc/src/builder.rs @@ -133,13 +133,13 @@ impl DocBuilder { Err(err) => { if from_library { // Ignore failures for library files - return Ok(Vec::new()); + return Ok(Vec::new()) } else { return Err(eyre::eyre!( "Failed to parse Solidity code for {}\nDebug info: {:?}", path.display(), err - )); + )) } } }; diff --git a/crates/doc/src/preprocessor/contract_inheritance.rs b/crates/doc/src/preprocessor/contract_inheritance.rs index 894f373e775ff..d0b5cd00bd010 100644 --- a/crates/doc/src/preprocessor/contract_inheritance.rs +++ b/crates/doc/src/preprocessor/contract_inheritance.rs @@ -54,7 +54,7 @@ impl ContractInheritance { fn try_link_base(&self, base: &str, documents: &Vec) -> Option { for candidate in documents { if candidate.from_library && !self.include_libraries { - continue; + continue } if let DocumentContent::Single(ref item) = candidate.content { if let ParseSource::Contract(ref contract) = item.source { diff --git a/crates/doc/src/preprocessor/git_source.rs b/crates/doc/src/preprocessor/git_source.rs index eaa53e6268d5e..a72764c65482a 100644 --- a/crates/doc/src/preprocessor/git_source.rs +++ b/crates/doc/src/preprocessor/git_source.rs @@ -29,7 +29,7 @@ impl Preprocessor for GitSource { let commit = self.commit.clone().unwrap_or("master".to_owned()); for document in documents.iter() { if document.from_library { - continue; + continue } let git_url = format!( "{repo}/blob/{commit}/{}", diff --git a/crates/evm/core/src/opts.rs b/crates/evm/core/src/opts.rs index 682e2444fd4d0..51e62b72c3e11 100644 --- a/crates/evm/core/src/opts.rs +++ b/crates/evm/core/src/opts.rs @@ -192,7 +192,7 @@ impl EvmOpts { if let Some(ref url) = self.fork_url { if url.contains("mainnet") { trace!(?url, "auto detected mainnet chain"); - return Some(Chain::mainnet()); + return Some(Chain::mainnet()) } trace!(?url, "retrieving chain via eth_chainId"); let provider = ProviderBuilder::new(url.as_str()) diff --git a/crates/evm/traces/src/decoder/mod.rs b/crates/evm/traces/src/decoder/mod.rs index 70720dc6c7085..4d677653a253f 100644 --- a/crates/evm/traces/src/decoder/mod.rs +++ b/crates/evm/traces/src/decoder/mod.rs @@ -592,7 +592,7 @@ impl CallTraceDecoder { fn apply_label(&self, value: &DynSolValue) -> String { if let DynSolValue::Address(addr) = value { if let Some(label) = self.labels.get(addr) { - return format!("{label}: [{addr}]"); + return format!("{label}: [{addr}]") } } format_token(value) diff --git a/crates/evm/traces/src/lib.rs b/crates/evm/traces/src/lib.rs index 16cadde109e7b..31d92ecd60c01 100644 --- a/crates/evm/traces/src/lib.rs +++ b/crates/evm/traces/src/lib.rs @@ -187,6 +187,7 @@ pub async fn render_trace( }; let action = match trace.kind { + CallKind::AuthCall => " [authcall]", CallKind::Call => "", CallKind::StaticCall => " [staticcall]", CallKind::CallCode => " [callcode]", diff --git a/crates/forge/tests/cli/config.rs b/crates/forge/tests/cli/config.rs index 8c69fcc4f84ea..f8fd6e3ef234c 100644 --- a/crates/forge/tests/cli/config.rs +++ b/crates/forge/tests/cli/config.rs @@ -125,6 +125,7 @@ forgetest!(can_extract_config_values, |prj, cmd| { fs_permissions: Default::default(), labels: Default::default(), cancun: true, + prague: true, isolate: true, unchecked_cheatcode_artifacts: false, __non_exhaustive: (),