From 774323418d327004a03ce4a242e301840d97efcf Mon Sep 17 00:00:00 2001 From: rakita Date: Thu, 17 Oct 2024 17:05:55 +0200 Subject: [PATCH] bump: alloy-eip7702 --- Cargo.lock | 15 +++++++++++++-- crates/primitives/Cargo.toml | 2 +- crates/revm/src/evm.rs | 2 +- crates/revm/src/handler/mainnet/pre_execution.rs | 4 ++-- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 86138c2daf..39fb3b250b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -97,6 +97,17 @@ name = "alloy-eip7702" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37d319bb544ca6caeab58c39cea8921c55d924d4f68f2c60f24f914673f9a74a" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeffd2590ce780ddfaa9d0ae340eb2b4e08627650c4676eef537cef0b4bf535d" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -113,7 +124,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "159eab0e4e15b88571f55673af37314f4b8f17630dc1b393c3d70f2128a1d494" dependencies = [ "alloy-eip2930", - "alloy-eip7702", + "alloy-eip7702 0.1.0", "alloy-primitives", "alloy-rlp", "alloy-serde", @@ -3211,7 +3222,7 @@ name = "revm-primitives" version = "11.0.0" dependencies = [ "alloy-eip2930", - "alloy-eip7702", + "alloy-eip7702 0.2.0", "alloy-primitives", "auto_impl", "bitflags 2.6.0", diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 944468fd00..d325d8df9d 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -24,7 +24,7 @@ all = "warn" [dependencies] # alloy alloy-eip2930 = { version = "0.1", default-features = false } -alloy-eip7702 = { version = "0.1", default-features = false, features = [ +alloy-eip7702 = { version = "0.2", default-features = false, features = [ "k256", ] } alloy-primitives = { version = "0.8.8", default-features = false, features = [ diff --git a/crates/revm/src/evm.rs b/crates/revm/src/evm.rs index 88ac100e01..ebbde1d764 100644 --- a/crates/revm/src/evm.rs +++ b/crates/revm/src/evm.rs @@ -415,7 +415,7 @@ mod tests { tx.authorization_list = Some( vec![RecoveredAuthorization::new_unchecked( Authorization { - chain_id: U256::from(1), + chain_id: 1, address: delegate, nonce: 0, } diff --git a/crates/revm/src/handler/mainnet/pre_execution.rs b/crates/revm/src/handler/mainnet/pre_execution.rs index bfb6d68a5b..361db03464 100644 --- a/crates/revm/src/handler/mainnet/pre_execution.rs +++ b/crates/revm/src/handler/mainnet/pre_execution.rs @@ -115,8 +115,8 @@ pub fn apply_eip7702_auth_list( let mut refunded_accounts = 0; for authorization in authorization_list.recovered_iter() { // 1. Verify the chain id is either 0 or the chain's current ID. - if !authorization.chain_id().is_zero() - && authorization.chain_id() != U256::from(context.evm.inner.env.cfg.chain_id) + if !authorization.chain_id() == 0 + && authorization.chain_id() != context.evm.inner.env.cfg.chain_id { continue; }