pub type ContractFactory<P> = DeploymentTxFactory<P>;
Expand description
ContractFactory
is a DeploymentTxFactory
object with an
Arc
middleware. This type alias exists to preserve backwards
compatibility with less-abstract Contracts.
For full usage docs, see DeploymentTxFactory
.
Aliased Type§
struct ContractFactory<P> {
client: P,
abi: JsonAbi,
bytecode: Bytes,
timeout: u64,
}
Fields§
§client: P
§abi: JsonAbi
§bytecode: Bytes
§timeout: u64
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.
Implementations
Source§impl<P: Provider<AnyNetwork> + Clone> DeploymentTxFactory<P>
impl<P: Provider<AnyNetwork> + Clone> DeploymentTxFactory<P>
Sourcepub fn new(abi: JsonAbi, bytecode: Bytes, client: P, timeout: u64) -> Self
pub fn new(abi: JsonAbi, bytecode: Bytes, client: P, timeout: u64) -> Self
Creates a factory for deployment of the Contract with bytecode, and the constructor defined in the abi. The client will be used to send any deployment transaction.
Sourcepub fn deploy_tokens(
self,
params: Vec<DynSolValue>,
) -> Result<Deployer<P>, ContractDeploymentError>
pub fn deploy_tokens( self, params: Vec<DynSolValue>, ) -> Result<Deployer<P>, ContractDeploymentError>
Create a deployment tx using the provided tokens as constructor arguments
Trait Implementations
Source§impl<P: Clone> Clone for DeploymentTxFactory<P>
impl<P: Clone> Clone for DeploymentTxFactory<P>
Source§fn clone(&self) -> DeploymentTxFactory<P>
fn clone(&self) -> DeploymentTxFactory<P>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more