diff --git a/ethers-contract/src/event.rs b/ethers-contract/src/event.rs index e013b461..38d8bb3d 100644 --- a/ethers-contract/src/event.rs +++ b/ethers-contract/src/event.rs @@ -9,7 +9,7 @@ use std::borrow::Cow; use std::marker::PhantomData; /// A trait for implementing event bindings -pub trait EthEvent: Detokenize { +pub trait EthEvent: Detokenize + Send + Sync { /// The name of the event this type represents fn name() -> Cow<'static, str>; diff --git a/ethers-contract/src/log.rs b/ethers-contract/src/log.rs index bfc54d53..cb538649 100644 --- a/ethers-contract/src/log.rs +++ b/ethers-contract/src/log.rs @@ -3,7 +3,7 @@ use ethers_core::abi::Error; use ethers_core::abi::RawLog; /// A trait for types (events) that can be decoded from a `RawLog` -pub trait EthLogDecode { +pub trait EthLogDecode: Send + Sync { /// decode from a `RawLog` fn decode_log(log: &RawLog) -> Result where diff --git a/ethers-contract/src/stream.rs b/ethers-contract/src/stream.rs index c8671902..b0385b0a 100644 --- a/ethers-contract/src/stream.rs +++ b/ethers-contract/src/stream.rs @@ -4,7 +4,7 @@ use pin_project::pin_project; use std::pin::Pin; use std::task::{Context, Poll}; -type MapEvent<'a, R, E> = Box Result + 'a>; +type MapEvent<'a, R, E> = Box Result + 'a + Send + Sync>; #[pin_project] /// Generic wrapper around Log streams, mapping their content to a specific