diff --git a/ethers-contract/tests/it/abigen.rs b/ethers-contract/tests/it/abigen.rs index 0dacb25b2..7658a8416 100644 --- a/ethers-contract/tests/it/abigen.rs +++ b/ethers-contract/tests/it/abigen.rs @@ -752,6 +752,7 @@ fn can_handle_overloaded_function_with_array() { } #[test] +#[allow(clippy::disallowed_names)] fn convert_uses_correct_abi() { abigen!( Foo, r#"[function foo()]"#; diff --git a/ethers-providers/src/lib.rs b/ethers-providers/src/lib.rs index 98f598423..d5c34da7a 100644 --- a/ethers-providers/src/lib.rs +++ b/ethers-providers/src/lib.rs @@ -76,7 +76,7 @@ pub trait JsonRpcClient: Debug + Send + Sync { async fn request(&self, method: &str, params: T) -> Result where T: Debug + Serialize + Send + Sync, - R: DeserializeOwned; + R: DeserializeOwned + Send; } pub trait FromErr { diff --git a/ethers-providers/src/provider.rs b/ethers-providers/src/provider.rs index 54fd646ee..0ade5eb3e 100644 --- a/ethers-providers/src/provider.rs +++ b/ethers-providers/src/provider.rs @@ -199,7 +199,7 @@ impl Provider

{ pub async fn request(&self, method: &str, params: T) -> Result where T: Debug + Serialize + Send + Sync, - R: Serialize + DeserializeOwned + Debug, + R: Serialize + DeserializeOwned + Debug + Send, { let span = tracing::trace_span!("rpc", method = method, params = ?serde_json::to_string(¶ms)?); @@ -215,7 +215,7 @@ impl Provider

{ Ok(res) } - async fn get_block_gen( + async fn get_block_gen( &self, id: BlockId, include_txs: bool, diff --git a/ethers-providers/src/transports/retry.rs b/ethers-providers/src/transports/retry.rs index 005fe0b52..8b51573cc 100644 --- a/ethers-providers/src/transports/retry.rs +++ b/ethers-providers/src/transports/retry.rs @@ -238,7 +238,7 @@ where async fn request(&self, method: &str, params: A) -> Result where A: Debug + Serialize + Send + Sync, - R: DeserializeOwned, + R: DeserializeOwned + Send, { // Helper type that caches the `params` value across several retries // This is necessary because the wrapper provider is supposed to skip he `params` if it's of diff --git a/ethers-providers/src/transports/rw.rs b/ethers-providers/src/transports/rw.rs index f3c649d26..945c2c52d 100644 --- a/ethers-providers/src/transports/rw.rs +++ b/ethers-providers/src/transports/rw.rs @@ -105,14 +105,10 @@ where /// Sends a POST request with the provided method and the params serialized as JSON /// over HTTP - async fn request( - &self, - method: &str, - params: T, - ) -> Result + async fn request(&self, method: &str, params: T) -> Result where T: std::fmt::Debug + Serialize + Send + Sync, - R: DeserializeOwned, + R: DeserializeOwned + Send, { match method { "eth_sendTransaction" | "eth_sendRawTransaction" => {