Skip to content

Commit 3c44133

Browse files
committed
impl Address
1 parent 59be93c commit 3c44133

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bus-mapping/src/evm/opcodes/address.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::{
44
operation::CallContextField,
55
Error,
66
};
7-
use eth_types::GethExecStep;
7+
use eth_types::{GethExecStep, ToWord};
88

99
#[derive(Clone, Copy, Debug)]
1010
pub(crate) struct Address;
@@ -19,7 +19,8 @@ impl Opcode for Address {
1919

2020
// Get address result from next step.
2121
// TODO: get address from call context.
22-
let address = geth_steps[1].stack.last()?;
22+
let address = state.call()?.address.to_word();
23+
assert_eq!(address, geth_steps[1].stack.last()?);
2324

2425
// Read the callee address in call context.
2526
state.call_context_read(

0 commit comments

Comments
 (0)