pub struct ContractDeployer<M, C> {
    pub deployer: Deployer<M>,
    /* private fields */
}
Expand description

Helper which manages the deployment transaction of a smart contract.

This is just a wrapper type for [Deployer] with an additional type to convert the Contract that the deployer returns when sending the transaction.

Fields§

§deployer: Deployer<M>

the actual deployer, exposed for overriding the defaults

Implementations§

Create a new instance of this ContractDeployer

Sets the number of confirmations to wait for the contract deployment transaction

Uses a Legacy transaction instead of an EIP-1559 one to do the deployment

Sets the from field in the deploy transaction to the provided value

Sets the to field in the deploy transaction to the provided value

Sets the gas field in the deploy transaction to the provided value

Sets the gas_price field in the deploy transaction to the provided value

Sets the value field in the deploy transaction to the provided value

Sets the data field in the deploy transaction to the provided value

Sets the nonce field in the deploy transaction to the provided value

Sets the chain_id field in the deploy transaction to the provided value

Dry runs the deployment of the contract

Note: this function does not send a transaction from your account

Returns a CallBuilder, which when awaited executes the deployment of this contract via eth_call. This call resolves to the returned data which would have been stored at the destination address had the deploy transaction been executed via send().

Note: this function does not send a transaction from your account

Broadcasts the contract deployment transaction and after waiting for it to be sufficiently confirmed (default: 1), it returns a new instance of the contract type at the deployed contract’s address.

Broadcasts the contract deployment transaction and after waiting for it to be sufficiently confirmed (default: 1), it returns a new instance of the contract type at the deployed contract’s address and the corresponding TransactionReceipt.

Returns a reference to the deployer’s ABI

Returns a pointer to the deployer’s client

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more