Struct ethers_rs::Transaction
source · pub struct Transaction {Show 17 fields
pub type: Option<TransactionType>,
pub nonce: Option<Uint<256>>,
pub to: Address,
pub gas: Option<Uint<256>>,
pub block_hash: Option<BytesM<32>>,
pub block_number: Option<Uint<256>>,
pub gas_price: Option<Uint<256>>,
pub hash: Option<BytesM<32>>,
pub value: Option<Uint<256>>,
pub input: Bytes,
pub max_priority_fee_per_gas: Option<Uint<256>>,
pub max_fee_per_gas: Option<Uint<256>>,
pub access_list: Option<AccessList>,
pub chain_id: Option<Uint<256>>,
pub v: Option<Uint<256>>,
pub r: Option<Uint<256>>,
pub s: Option<Uint<256>>,
/* private fields */
}Fields§
§type: Option<TransactionType>transaction type
- Legacy (pre-EIP2718)
0x00 - EIP2930 (state access lists)
0x01 - EIP1559 0x02
nonce: Option<Uint<256>>transaction nonce
to: AddressTo address
gas: Option<Uint<256>>Gas limit
block_hash: Option<BytesM<32>>Block hash
block_number: Option<Uint<256>>Block number
gas_price: Option<Uint<256>>Gas limit
hash: Option<BytesM<32>>Transaction hash
value: Option<Uint<256>>Transfer eth value
input: BytesInput data to call contract.
max_priority_fee_per_gas: Option<Uint<256>>Maximum fee per gas the sender is willing to pay to miners in wei
max_fee_per_gas: Option<Uint<256>>Maximum total fee per gas the sender is willing to pay(includes the network/base fee and miner/ priority fee) in wei
access_list: Option<AccessList>EIP-2930 access list
chain_id: Option<Uint<256>>Chain ID tha this transaction is valid on
v: Option<Uint<256>>The parity(0 for even, 1 for odd) of the y-value of the secp256k1 signature.
r: Option<Uint<256>>r-value of the secp256k1
s: Option<Uint<256>>s-value of the secp256k1
Trait Implementations§
source§impl Clone for Transaction
impl Clone for Transaction
source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a copy 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 Transaction
impl Debug for Transaction
source§impl<'de> Deserialize<'de> for Transaction
impl<'de> Deserialize<'de> for Transaction
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Transaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Transaction, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for Transaction
impl Serialize for Transaction
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more