pub struct TransactionParameters {
pub tx_type: U256,
pub nonce: U256,
pub to: Option<H160>,
pub gas: U256,
pub gas_price: U256,
pub value: U256,
pub data: Bytes,
pub chain_id: u64,
}Fields§
§tx_type: U256Transaction type
nonce: U256Transaction nonce (None for account transaction count)
to: Option<H160>To address
gas: U256Supplied gas
gas_price: U256Gas price (None for estimated gas price)
value: U256Transferred value
data: BytesData
chain_id: u64The chain ID (None for network ID)
Implementations§
Source§impl TransactionParameters
impl TransactionParameters
pub fn new( chain_id: u64, nonce: U256, to: Option<H160>, gas: U256, gas_price: U256, value: U256, data: Bytes, ) -> TransactionParameters
pub fn to_call_request(&self) -> CallRequest
pub fn sign(&self, sign: impl Key) -> SignedTransaction
Trait Implementations§
Source§impl Clone for TransactionParameters
impl Clone for TransactionParameters
Source§fn clone(&self) -> TransactionParameters
fn clone(&self) -> TransactionParameters
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransactionParameters
impl Debug for TransactionParameters
Source§impl<'de> Deserialize<'de> for TransactionParameters
impl<'de> Deserialize<'de> for TransactionParameters
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TransactionParameters
impl RefUnwindSafe for TransactionParameters
impl Send for TransactionParameters
impl Sync for TransactionParameters
impl Unpin for TransactionParameters
impl UnwindSafe for TransactionParameters
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more