From af94479d810d84f8bc6cbb42cc23b0731667d89c Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 21 Jan 2022 13:30:57 +0100 Subject: [PATCH] fix: derive serde Ser and De for log metadata (#823) --- ethers-contract/src/log.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ethers-contract/src/log.rs b/ethers-contract/src/log.rs index f7a3e413..6e54e381 100644 --- a/ethers-contract/src/log.rs +++ b/ethers-contract/src/log.rs @@ -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 { @@ -18,7 +19,7 @@ pub fn decode_logs(logs: &[RawLog]) -> Result, 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,