diff --git a/starknet-providers/src/jsonrpc/mod.rs b/starknet-providers/src/jsonrpc/mod.rs index 4817e3af..17b9d82b 100644 --- a/starknet-providers/src/jsonrpc/mod.rs +++ b/starknet-providers/src/jsonrpc/mod.rs @@ -30,7 +30,7 @@ pub struct JsonRpcClient { transport: T, } -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize)] pub enum JsonRpcMethod { #[serde(rename = "starknet_getBlockWithTxHashes")] GetBlockWithTxHashes, @@ -177,7 +177,7 @@ where { async fn send_request(&self, method: JsonRpcMethod, params: P) -> Result where - P: Serialize + Send, + P: Serialize + Send + Sync, R: DeserializeOwned, { match self diff --git a/starknet-providers/src/jsonrpc/transports/mod.rs b/starknet-providers/src/jsonrpc/transports/mod.rs index 723d3e4b..7b119f74 100644 --- a/starknet-providers/src/jsonrpc/transports/mod.rs +++ b/starknet-providers/src/jsonrpc/transports/mod.rs @@ -20,6 +20,6 @@ pub trait JsonRpcTransport { params: P, ) -> Result, Self::Error> where - P: Serialize + Send, + P: Serialize + Send + Sync, R: DeserializeOwned; }