Skip to content

Commit 8707a0e

Browse files
TarekkMAlibrelois
authored andcommitted
Merge pull request #4 from moonbeam-foundation/aleks-add-log-event-emission
+ Fix Log event
1 parent 72281e2 commit 8707a0e

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "1.69.0"
2+
channel = "1.77.0"
33
profile = "minimal"
44
components = [ "rustfmt", "clippy" ]

src/executor/stack/executor.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,6 +1224,11 @@ impl<'config, 'precompiles, S: StackState<'config>, P: PrecompileSet> Handler
12241224
}
12251225

12261226
fn log(&mut self, address: H160, topics: Vec<H256>, data: Vec<u8>) -> Result<(), ExitError> {
1227+
event!(Log {
1228+
address,
1229+
topics: &topics,
1230+
data: &data
1231+
});
12271232
self.state.log(address, topics, data);
12281233
Ok(())
12291234
}

src/tracing.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ pub enum Event<'a> {
6767
is_static: bool,
6868
context: &'a Context,
6969
},
70+
Log {
71+
address: H160,
72+
topics: &'a [H256],
73+
data: &'a [u8],
74+
},
7075
}
7176

7277
// Expose `listener::with` to the crate only.

0 commit comments

Comments
 (0)