pub struct Builder<T: Transport> { /* private fields */ }
Expand description
A configuration builder for contract deployment.
Implementations§
Source§impl<T: Transport> Builder<T>
impl<T: Transport> Builder<T>
Sourcepub fn confirmations(self, confirmations: usize) -> Self
pub fn confirmations(self, confirmations: usize) -> Self
Number of confirmations required after code deployment.
Sourcepub fn poll_interval(self, interval: Duration) -> Self
pub fn poll_interval(self, interval: Duration) -> Self
Confirmations poll interval.
Sourcepub async fn execute<P, V>(
self,
code: V,
params: P,
from: Address,
) -> Result<Contract<T>, Error>
pub async fn execute<P, V>( self, code: V, params: P, from: Address, ) -> Result<Contract<T>, Error>
Execute deployment passing code and contructor parameters.
Sourcepub async fn sign_and_execute<P, V>(
self,
code: V,
params: P,
from: Address,
password: &str,
) -> Result<Contract<T>, Error>
pub async fn sign_and_execute<P, V>( self, code: V, params: P, from: Address, password: &str, ) -> Result<Contract<T>, Error>
Execute deployment passing code and constructor parameters.
Unlike the above execute
, this method uses
sign_raw_transaction_with_confirmation
instead of
sign_transaction_with_confirmation
, which requires the account from
which the transaction is sent to be unlocked.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Builder<T>where
T: Freeze,
impl<T> RefUnwindSafe for Builder<T>where
T: RefUnwindSafe,
impl<T> Send for Builder<T>where
T: Send,
impl<T> Sync for Builder<T>where
T: Sync,
impl<T> Unpin for Builder<T>where
T: Unpin,
impl<T> UnwindSafe for Builder<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more