Struct client_traits::TransactionRequest[][src]

pub struct TransactionRequest {
    pub action: Action,
    pub data: Bytes,
    pub gas: Option<U256>,
    pub gas_price: Option<U256>,
    pub nonce: Option<U256>,
}

The data required for a Client to create a transaction.

Gas limit, gas price, or nonce can be set explicitly, e.g. to create service transactions with zero gas price, or sequences of transactions with consecutive nonces.

Fields

action: Actiondata: Bytesgas: Option<U256>gas_price: Option<U256>nonce: Option<U256>

Implementations

impl TransactionRequest[src]

pub fn call(address: Address, data: Bytes) -> TransactionRequest[src]

Creates a request to call a contract at address with the specified call data.

pub fn create(data: Bytes) -> TransactionRequest[src]

Creates a request to create a new contract, with the specified bytecode.

pub fn gas(self, gas: U256) -> TransactionRequest[src]

Sets a gas limit. If this is not specified, a sensible default is used.

pub fn gas_price(self, gas_price: U256) -> TransactionRequest[src]

Sets a gas price. If this is not specified, a sensible default is used.

pub fn nonce(self, nonce: U256) -> TransactionRequest[src]

Sets a nonce. If this is not specified, the appropriate latest nonce for the author is used.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,