Skip to content

Commit

Permalink
path to latest alloy-eips
Browse files Browse the repository at this point in the history
  • Loading branch information
rakita committed Aug 9, 2024
1 parent 05940a8 commit cab9bb1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
21 changes: 15 additions & 6 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ debug = true
[profile.ethtests]
inherits = "test"
opt-level = 3

[patch.crates-io]
alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "fd159f6" }
10 changes: 4 additions & 6 deletions crates/revm/src/handler/mainnet/pre_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ pub fn apply_eip7702_auth_list<SPEC: Spec, EXT, DB: Database>(
};

// 2. Verify the chain id is either 0 or the chain's current ID.
if authorization.chain_id() != 0
&& authorization.chain_id() != context.evm.inner.env.cfg.chain_id
if !authorization.chain_id().is_zero()
&& authorization.chain_id() != U256::from(context.evm.inner.env.cfg.chain_id)
{
continue;
}
Expand All @@ -146,10 +146,8 @@ pub fn apply_eip7702_auth_list<SPEC: Spec, EXT, DB: Database>(
// 4. If nonce list item is length one, verify the nonce of authority is equal to nonce.
//
// In case of signer setting its own delegation nonce will be bumped twice
if let Some(nonce) = authorization.nonce() {
if nonce != authority_acc.info.nonce {
continue;
}
if authorization.nonce() != authority_acc.info.nonce {
continue;
}

// 5. Refund the sender PER_EMPTY_ACCOUNT_COST - PER_AUTH_BASE_COST gas if authority exists in the trie.
Expand Down

0 comments on commit cab9bb1

Please sign in to comment.