[−][src]Struct web3::types::TransactionParameters
Transaction data for signing.
The Accounts::sign_transaction
method will fill optional fields with sane
defaults when they are omitted. Specifically the signing account's current
transaction count will be used for the nonce
, the estimated recommended
gas price will be used for gas_price
, and the current network ID will be
used for the chain_id
.
It is worth noting that the chain ID is not equivalent to the network ID. They happen to be the same much of the time but it is recommended to set this for signing transactions.
TransactionParameters
implements Default
and uses 100_000
as the
default gas
to use for the transaction. This is more than enough for
simple transactions sending ETH between accounts but may not be enough when
interacting with complex contracts. It is recommended when interacting
with contracts to use Eth::estimate_gas
to estimate the required gas for
the transaction.
Fields
nonce: Option<U256>
Transaction nonce (None for account transaction count)
to: Option<Address>
To address
gas: U256
Supplied gas
gas_price: Option<U256>
Gas price (None for estimated gas price)
value: U256
Transferred value
data: Bytes
Data
chain_id: Option<u64>
The chain ID (None for network ID)
Trait Implementations
impl Clone for TransactionParameters
[src]
fn clone(&self) -> TransactionParameters
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TransactionParameters
[src]
impl Default for TransactionParameters
[src]
impl From<CallRequest> for TransactionParameters
[src]
fn from(call: CallRequest) -> Self
[src]
impl Into<CallRequest> for TransactionParameters
[src]
fn into(self) -> CallRequest
[src]
impl PartialEq<TransactionParameters> for TransactionParameters
[src]
fn eq(&self, other: &TransactionParameters) -> bool
[src]
fn ne(&self, other: &TransactionParameters) -> bool
[src]
impl StructuralPartialEq for TransactionParameters
[src]
Auto Trait Implementations
impl RefUnwindSafe for TransactionParameters
impl Send for TransactionParameters
impl Sync for TransactionParameters
impl Unpin for TransactionParameters
impl UnwindSafe for TransactionParameters
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> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[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>,