-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from akjong/feat/log
Add log convert
- Loading branch information
Showing
3 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use alloy::{ | ||
primitives::{Log, LogData}, | ||
rpc::types::trace::geth::CallLogFrame, | ||
}; | ||
|
||
pub fn call_log_frame_to_log(log_frame: CallLogFrame) -> Option<Log> { | ||
let address = log_frame.address?; | ||
let topics = log_frame.topics?; | ||
let data = log_frame.data?; | ||
|
||
LogData::new(topics, data).map(|data| Log { address, data }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pub mod block; | ||
pub mod evm; | ||
pub mod time; | ||
pub mod transaction; |