diff --git a/ethers-contract/src/contract.rs b/ethers-contract/src/contract.rs index 17443e5a..11ec62a3 100644 --- a/ethers-contract/src/contract.rs +++ b/ethers-contract/src/contract.rs @@ -185,9 +185,9 @@ impl Contract { &self.base_contract.abi } - /// Returns a reference to the contract's client - pub fn client(&self) -> &M { - &self.client + /// Returns a pointer to the contract's client + pub fn client(&self) -> Arc { + self.client.clone() } } diff --git a/ethers-contract/src/factory.rs b/ethers-contract/src/factory.rs index 7f51e8d3..bffb9045 100644 --- a/ethers-contract/src/factory.rs +++ b/ethers-contract/src/factory.rs @@ -147,8 +147,8 @@ impl>> ContractDeployer { self.deployer.abi() } - /// Returns a reference to the deployer's client - pub fn client(&self) -> &M { + /// Returns a pointer to the deployer's client + pub fn client(&self) -> Arc { self.deployer.client() } } @@ -261,9 +261,9 @@ impl Deployer { &self.abi } - /// Returns a reference to the deployer's client - pub fn client(&self) -> &M { - &self.client + /// Returns a pointer to the deployer's client + pub fn client(&self) -> Arc { + self.client.clone() } }