[−][src]Struct ethers_contract::builders::ContractCall
Helper for managing a transaction before submitting it to a node
Fields
tx: TransactionRequestThe raw transaction object
function: FunctionThe ABI of the function being called
block: Option<BlockNumber>Optional block number to be used when calculating the transaction's gas and nonce
Implementations
impl<'a, P, S, D: Detokenize> ContractCall<'a, P, S, D>[src]
pub fn from<T: Into<Address>>(self, from: T) -> Self[src]
Sets the from field in the transaction to the provided value
pub fn gas<T: Into<U256>>(self, gas: T) -> Self[src]
Sets the gas field in the transaction to the provided value
pub fn gas_price<T: Into<U256>>(self, gas_price: T) -> Self[src]
Sets the gas_price field in the transaction to the provided value
pub fn value<T: Into<U256>>(self, value: T) -> Self[src]
Sets the value field in the transaction to the provided value
pub fn block<T: Into<BlockNumber>>(self, block: T) -> Self[src]
Sets the block field for sending the tx to the chain
impl<'a, P, S, D> ContractCall<'a, P, S, D> where
S: Signer,
P: JsonRpcClient,
D: Detokenize, [src]
S: Signer,
P: JsonRpcClient,
D: Detokenize,
pub async fn call<'_>(&'_ self) -> Result<D, ContractError>[src]
Queries the blockchain via an eth_call for the provided transaction.
If executed on a non-state mutating smart contract function (i.e. view, pure)
then it will return the raw data from the chain.
If executed on a mutating smart contract function, it will do a "dry run" of the call and return the return type of the transaction without mutating the state
Note: this function does not send a transaction from your account
pub async fn send(self) -> Result<PendingTransaction<'a, P>, ContractError>[src]
Signs and broadcasts the provided transaction
Trait Implementations
impl<'a, P: Clone, S: Clone, D: Clone> Clone for ContractCall<'a, P, S, D>[src]
fn clone(&self) -> ContractCall<'a, P, S, D>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<'a, P: Debug, S: Debug, D: Debug> Debug for ContractCall<'a, P, S, D>[src]
Auto Trait Implementations
impl<'a, P, S, D> RefUnwindSafe for ContractCall<'a, P, S, D> where
D: RefUnwindSafe,
P: RefUnwindSafe,
S: RefUnwindSafe,
D: RefUnwindSafe,
P: RefUnwindSafe,
S: RefUnwindSafe,
impl<'a, P, S, D> Send for ContractCall<'a, P, S, D> where
D: Send,
P: Sync,
S: Sync,
D: Send,
P: Sync,
S: Sync,
impl<'a, P, S, D> Sync for ContractCall<'a, P, S, D> where
D: Sync,
P: Sync,
S: Sync,
D: Sync,
P: Sync,
S: Sync,
impl<'a, P, S, D> Unpin for ContractCall<'a, P, S, D> where
D: Unpin,
D: Unpin,
impl<'a, P, S, D> UnwindSafe for ContractCall<'a, P, S, D> where
D: UnwindSafe,
P: RefUnwindSafe,
S: RefUnwindSafe,
D: UnwindSafe,
P: RefUnwindSafe,
S: RefUnwindSafe,
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> Same<T> for T
type Output = T
Should always be Self
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,