Skip to content

Commit

Permalink
feat: Include EIP7702 address for extcodecopy (#2016)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
elijahhampton and Elijah Hampton authored Jan 27, 2025
1 parent aa0c9c5 commit 14c5cc1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions crates/revm/src/context/inner_evm_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -182,8 +182,6 @@ impl<DB: Database> InnerEvmContext<DB> {

let code = if code.is_eof() {
EOF_MAGIC_BYTES.clone()
} else if code.is_eip7702() {
EIP7702_MAGIC_BYTES.clone()
} else {
code.original_bytes()
};
Expand All @@ -206,8 +204,6 @@ impl<DB: Database> InnerEvmContext<DB> {

let hash = if code.is_eof() {
EOF_MAGIC_HASH
} else if code.is_eip7702() {
EIP7702_MAGIC_HASH
} else {
acc.info.code_hash
};
Expand Down

0 comments on commit 14c5cc1

Please sign in to comment.