Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
fix: derive serde Ser and De for log metadata (#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
roynalnaruto authored Jan 21, 2022
1 parent f9fadf0 commit af94479
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ethers-contract/src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use ethers_core::{
abi::{Error, RawLog},
types::{Address, Log, TxHash, H256, U256, U64},
};
use serde::{Deserialize, Serialize};

/// A trait for types (events) that can be decoded from a `RawLog`
pub trait EthLogDecode: Send + Sync {
Expand All @@ -18,7 +19,7 @@ pub fn decode_logs<T: EthLogDecode>(logs: &[RawLog]) -> Result<Vec<T>, Error> {
}

/// Metadata inside a log
#[derive(Clone, Debug, PartialEq)]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct LogMeta {
/// Address from which this log originated
pub address: Address,
Expand Down

0 comments on commit af94479

Please sign in to comment.