Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/interpreter/src/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ impl Interpreter {
None,
crate::primitives::Address::default(),
crate::primitives::Address::default(),
crate::primitives::Address::default(),
U256::ZERO,
),
0,
Expand Down
7 changes: 7 additions & 0 deletions crates/interpreter/src/interpreter/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ pub struct Contract {
pub hash: Option<B256>,
/// Target address of the account. Storage of this address is going to be modified.
pub target_address: Address,
/// Address of the account the bytecode was loaded from. This can be different from target_address
/// in the case of DELEGATECALL or CALLCODE
pub bytecode_address: Address,
/// Caller of the EVM.
pub caller: Address,
/// Value send to contract from transaction or from CALL opcodes.
Expand All @@ -33,6 +36,7 @@ impl Contract {
bytecode: Bytecode,
hash: Option<B256>,
target_address: Address,
bytecode_address: Address,
caller: Address,
call_value: U256,
) -> Self {
Expand All @@ -43,6 +47,7 @@ impl Contract {
bytecode,
hash,
target_address,
bytecode_address,
caller,
call_value,
}
Expand All @@ -60,6 +65,7 @@ impl Contract {
bytecode,
hash,
contract_address,
contract_address,
env.tx.caller,
env.tx.value,
)
Expand All @@ -78,6 +84,7 @@ impl Contract {
bytecode,
hash,
call_context.target_address,
call_context.bytecode_address,
call_context.caller,
call_context.call_value(),
)
Expand Down
2 changes: 2 additions & 0 deletions crates/revm/src/context/inner_evm_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ impl<DB: Database> InnerEvmContext<DB> {
Bytecode::Eof(Arc::new(initcode.clone())),
None,
created_address,
created_address,
inputs.caller,
inputs.value,
);
Expand Down Expand Up @@ -477,6 +478,7 @@ impl<DB: Database> InnerEvmContext<DB> {
bytecode,
Some(init_code_hash),
created_address,
created_address,
inputs.caller,
inputs.value,
);
Expand Down