feat: add convenience impl From Log (#2087)
This commit is contained in:
parent
60e1779626
commit
71c6fd4928
|
@ -1,3 +1,4 @@
|
|||
use ethabi::RawLog;
|
||||
// Adapted from https://github.com/tomusdrw/rust-web3/blob/master/src/types/log.rs
|
||||
use crate::types::{Address, Bytes, H256, U256, U64};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
@ -68,4 +69,10 @@ impl rlp::Encodable for Log {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<Log> for RawLog {
|
||||
fn from(val: Log) -> Self {
|
||||
(val.topics, val.data.to_vec()).into()
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Implement more common types - or adjust this to work with all Tokenizable items
|
||||
|
|
Loading…
Reference in New Issue