refactor(log): use alloy_primitives::Log#975
refactor(log): use alloy_primitives::Log#975rakita merged 5 commits intobluealloy:mainfrom slordua:alloy_log
Conversation
|
should be ready now |
crates/revm/src/evm.rs
Outdated
| topics, | ||
| data, | ||
| data: LogData::new(topics, data) | ||
| .expect("Invalid LogData: Number of topics should be <= 4"), |
There was a problem hiding this comment.
Would refactor Host::log function input to a LogData .
in essence change this: https://github.com/bluealloy/revm/blob/main/crates/interpreter/src/instructions/host.rs#L214
There was a problem hiding this comment.
I didn't notice as the code was not changed but we could use Log directly in place of LogData. Other parts lgtm
There was a problem hiding this comment.
could you clarify that last comment? not clear on what you're meaning
crates/interpreter/src/host.rs
Outdated
| /// Emit a log owned by `address` with given `topics` and `data`. | ||
| fn log(&mut self, address: Address, topics: Vec<B256>, data: Bytes); | ||
| /// Emit a log owned by `address` with given `LogData`. | ||
| fn log(&mut self, address: Address, log_data: LogData); |
There was a problem hiding this comment.
| fn log(&mut self, address: Address, log_data: LogData); | |
| fn log(&mut self, log: Log); |
Log contains both Address and LogData.
@slordua i meant this
There was a problem hiding this comment.
ah ok i see it thx, will revise shortly
|
is .expect ok? topics shouldn't exceed 4 right? also wasn't sure if docs comment needed changing, still seemed appropriate to me perhaps tho... /// Emit a would be better... idk |
It is fine, lgtm |
No description provided.