From 14c5cc1d5958cc29d3865dffd96d680e19568b75 Mon Sep 17 00:00:00 2001 From: Elijah Hampton Date: Mon, 27 Jan 2025 21:10:33 +0000 Subject: [PATCH] feat: Include EIP7702 address for extcodecopy (#2016) * Includes address and version bytes for codecopy * fix cargo check, undeclared Vec type * simplify EXTCODECOPY to return original bytes including address, EXTCODEHASH as well * Remove added EIP7702_VERSION export. fmt, clippy, check --------- Co-authored-by: Elijah Hampton --- crates/revm/src/context/inner_evm_context.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/crates/revm/src/context/inner_evm_context.rs b/crates/revm/src/context/inner_evm_context.rs index cdeda759ae..d61e758f69 100644 --- a/crates/revm/src/context/inner_evm_context.rs +++ b/crates/revm/src/context/inner_evm_context.rs @@ -9,7 +9,7 @@ use crate::{ AccessListItem, Account, Address, AnalysisKind, Bytecode, Bytes, CfgEnv, EVMError, Env, Eof, HashSet, Spec, SpecId::{self, *}, - B256, EIP7702_MAGIC_BYTES, EIP7702_MAGIC_HASH, EOF_MAGIC_BYTES, EOF_MAGIC_HASH, U256, + B256, EOF_MAGIC_BYTES, EOF_MAGIC_HASH, U256, }, JournalCheckpoint, }; @@ -182,8 +182,6 @@ impl InnerEvmContext { let code = if code.is_eof() { EOF_MAGIC_BYTES.clone() - } else if code.is_eip7702() { - EIP7702_MAGIC_BYTES.clone() } else { code.original_bytes() }; @@ -206,8 +204,6 @@ impl InnerEvmContext { let hash = if code.is_eof() { EOF_MAGIC_HASH - } else if code.is_eip7702() { - EIP7702_MAGIC_HASH } else { acc.info.code_hash };