Type Alias ContractFactory

Source
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>

Source

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.

Source

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>

Source§

fn clone(&self) -> DeploymentTxFactory<P>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<P: Debug> Debug for DeploymentTxFactory<P>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more