[−][src]Struct ethcontract::contract::MethodBuilder
Data used for building a contract method call or transaction. The method
builder can be demoted into a CallBuilder
to not allow sending of
transactions. This is useful when dealing with view functions.
Fields
tx: TransactionBuilder<T>
transaction parameters
Methods
impl<T: Transport> MethodBuilder<T, Void>
[src]
pub fn fallback(web3: Web3<T>, address: Address, data: Bytes) -> Self
[src]
Creates a new builder for a transaction invoking the fallback method.
impl<T: Transport, R: Detokenizable> MethodBuilder<T, R>
[src]
pub fn new(
web3: Web3<T>,
function: Function,
address: Address,
data: Bytes
) -> Self
[src]
web3: Web3<T>,
function: Function,
address: Address,
data: Bytes
) -> Self
Creates a new builder for a transaction.
pub fn with_defaults(self, defaults: &MethodDefaults) -> Self
[src]
Apply method defaults to this builder.
pub fn from(self, value: Account) -> Self
[src]
Specify the signing method to use for the transaction, if not specified the the transaction will be locally signed with the default user.
pub fn gas(self, value: U256) -> Self
[src]
Secify amount of gas to use, if not specified then a gas estimate will be used.
pub fn gas_price(self, value: GasPrice) -> Self
[src]
Specify the gas price to use, if not specified then the estimated gas price will be used.
pub fn value(self, value: U256) -> Self
[src]
Specify what how much ETH to transfer with the transaction, if not specified then no ETH will be sent.
pub fn nonce(self, value: U256) -> Self
[src]
Specify the nonce for the transation, if not specified will use the current transaction count for the signing account.
pub fn confirmations(self, value: usize) -> Self
[src]
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.
pub fn into_inner(self) -> TransactionBuilder<T>
[src]
Extract inner TransactionBuilder
from this SendBuilder
. This exposes
TransactionBuilder
only APIs.
pub fn send(self) -> MethodSendFuture<T>
[src]
Sign (if required) and send the method call transaction.
pub fn view(self) -> ViewMethodBuilder<T, R>
[src]
Demotes a MethodBuilder
into a ViewMethodBuilder
which has a more
restricted API and cannot actually send transactions.
pub fn call(self) -> CallFuture<T, R>
[src]
Call a contract method. Contract calls do not modify the blockchain and
as such do not require gas or signing. Note that doing a call with a
block number requires first demoting the MethodBuilder
into a
ViewMethodBuilder
and setting the block number for the call.
Trait Implementations
impl<T: Clone + Transport, R: Clone + Detokenizable> Clone for MethodBuilder<T, R>
[src]
fn clone(&self) -> MethodBuilder<T, R>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug + Transport, R: Debug + Detokenizable> Debug for MethodBuilder<T, R>
[src]
Auto Trait Implementations
impl<T, R> RefUnwindSafe for MethodBuilder<T, R> where
R: RefUnwindSafe,
T: RefUnwindSafe,
R: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, R> Send for MethodBuilder<T, R> where
R: Send,
T: Send,
R: Send,
T: Send,
impl<T, R> Sync for MethodBuilder<T, R> where
R: Sync,
T: Sync,
R: Sync,
T: Sync,
impl<T, R> Unpin for MethodBuilder<T, R> where
R: Unpin,
T: Unpin,
R: Unpin,
T: Unpin,
impl<T, R> UnwindSafe for MethodBuilder<T, R> where
R: UnwindSafe,
T: UnwindSafe,
R: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,