Skip to content

Commit

Permalink
chore: eip7702 chainid u256 change (#1950)
Browse files Browse the repository at this point in the history
  • Loading branch information
rakita authored Dec 25, 2024
1 parent e30fe19 commit 0c69ccd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
16 changes: 14 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ all = "warn"
[dependencies]
# alloy
alloy-eip2930 = { version = "0.1", default-features = false }
alloy-eip7702 = { version = "0.4", default-features = false, features = [
alloy-eip7702 = { version = "0.5", default-features = false, features = [
"k256",
] }
alloy-primitives = { version = "0.8", default-features = false, features = [
Expand Down
2 changes: 1 addition & 1 deletion crates/revm/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ mod tests {
tx.authorization_list = Some(
vec![RecoveredAuthorization::new_unchecked(
Authorization {
chain_id: 1,
chain_id: U256::from(1),
address: delegate,
nonce: 0,
},
Expand Down
4 changes: 2 additions & 2 deletions crates/revm/src/handler/mainnet/pre_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ pub fn apply_eip7702_auth_list<SPEC: Spec, EXT, DB: Database>(
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.
let chain_id = authorization.chain_id();
if chain_id != 0 && chain_id != context.evm.inner.env.cfg.chain_id {
let chain_id = *authorization.chain_id();
if !chain_id.is_zero() && chain_id != U256::from(context.evm.inner.env.cfg.chain_id) {
continue;
}

Expand Down

0 comments on commit 0c69ccd

Please sign in to comment.