Skip to content

Commit

Permalink
fix(levm): fix logs address (#1554)
Browse files Browse the repository at this point in the history
**Motivation**

<!-- Why does this pull request exist? What are its goals? -->

**Description**
In [execution
specs](https://ethereum.github.io/execution-specs/src/ethereum/cancun/vm/instructions/log.py.html)
the address logged is the current executing account.
<!-- A clear and concise general description of the changes this PR
introduces -->

<!-- Link to issues: Resolves #111, Resolves #222 -->

Closes #issue_number
  • Loading branch information
JereSalo authored Dec 21, 2024
1 parent 2bb8fa9 commit 588e54f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/vm/levm/src/opcode_handlers/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl VM {
)?;

let log = Log {
address: current_call_frame.msg_sender, // Should change the addr if we are on a Call/Create transaction (Call should be the contract we are calling, Create should be the original caller)
address: current_call_frame.to,
topics,
data: Bytes::from(
memory::load_range(&mut current_call_frame.memory, offset, size)?.to_vec(),
Expand Down

0 comments on commit 588e54f

Please sign in to comment.