Struct ethcontract::contract::DeployBuilder
source · pub struct DeployBuilder<T, I>{ /* private fields */ }Expand description
Builder for specifying options for deploying a linked contract.
Implementations§
source§impl<T, I> DeployBuilder<T, I>
impl<T, I> DeployBuilder<T, I>
sourcepub fn new<P>(
web3: Web3<T>,
context: I::Context,
params: P
) -> Result<Self, DeployError>where
P: Tokenize,
pub fn new<P>(
web3: Web3<T>,
context: I::Context,
params: P
) -> Result<Self, DeployError>where
P: Tokenize,
Create a new deploy builder from a web3 provider, contract data and
deployment (constructor) parameters.
sourcepub fn from(self, value: Account) -> Self
pub fn from(self, value: Account) -> Self
Specify the signing method to use for the transaction, if not specified the the transaction will be locally signed with the default user.
sourcepub fn gas(self, value: U256) -> Self
pub fn gas(self, value: U256) -> Self
Secify amount of gas to use, if not specified then a gas estimate will be used.
sourcepub fn gas_price(self, value: GasPrice) -> Self
pub fn gas_price(self, value: GasPrice) -> Self
Specify the gas price to use, if not specified then the estimated gas price will be used.
sourcepub fn value(self, value: U256) -> Self
pub fn value(self, value: U256) -> Self
Specify what how much ETH to transfer with the transaction, if not specified then no ETH will be sent.
sourcepub fn nonce(self, value: U256) -> Self
pub fn nonce(self, value: U256) -> Self
Specify the nonce for the transation, if not specified will use the current transaction count for the signing account.
sourcepub fn confirmations(self, value: usize) -> Self
pub fn confirmations(self, value: usize) -> Self
Specify the number of confirmations to wait for when confirming the transaction, if not specified will wait for the transaction to be mined without any extra confirmations.
sourcepub fn into_inner(self) -> TransactionBuilder<T>
pub fn into_inner(self) -> TransactionBuilder<T>
Extract inner TransactionBuilder from this DeployBuilder. This
exposes TransactionBuilder only APIs.
sourcepub async fn deploy(self) -> Result<I, DeployError>
pub async fn deploy(self) -> Result<I, DeployError>
Sign (if required) and execute the transaction. Returns the transaction hash that can be used to retrieve transaction information.
Trait Implementations§
source§impl<T, I> Clone for DeployBuilder<T, I>
impl<T, I> Clone for DeployBuilder<T, I>
source§fn clone(&self) -> DeployBuilder<T, I>
fn clone(&self) -> DeployBuilder<T, I>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more