pub struct Transaction {Show 19 fields
pub hash: B256,
pub kind: u8,
pub chain_id: Option<u64>,
pub nonce: u64,
pub block_hash: Option<B256>,
pub block_number: Option<u64>,
pub transaction_index: Option<u64>,
pub from: Address,
pub to: Option<Address>,
pub value: U256,
pub gas: u64,
pub gas_price: Option<U256>,
pub max_fee_per_gas: Option<U256>,
pub max_priority_fee_per_gas: Option<U256>,
pub access_list: Vec<AccessItem>,
pub input: Vec<u8>,
pub r: Option<U256>,
pub s: Option<U256>,
pub y_parity: Option<u64>,
}Expand description
What eth_getTransactionByHash answers, mined or still pending.
Fields§
§hash: B256§kind: u82 for EIP-1559; 0 for legacy.
chain_id: Option<u64>§nonce: u64§block_hash: Option<B256>§block_number: Option<u64>§transaction_index: Option<u64>§from: Address§to: Option<Address>None for a creation.
value: U256§gas: u64§gas_price: Option<U256>§max_fee_per_gas: Option<U256>§max_priority_fee_per_gas: Option<U256>§access_list: Vec<AccessItem>§input: Vec<u8>§r: Option<U256>§s: Option<U256>§y_parity: Option<u64>Implementations§
Source§impl Transaction
impl Transaction
Sourcepub fn to_eip1559(&self) -> Option<Eip1559>
pub fn to_eip1559(&self) -> Option<Eip1559>
The type 2 transaction this record is of: rebuilt, it hashes to
Transaction::hash once signed with Transaction::signature.
Trait Implementations§
Source§impl Clone for Transaction
impl Clone for Transaction
Source§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<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
impl Eq for Transaction
Source§impl PartialEq for Transaction
impl PartialEq for Transaction
impl StructuralPartialEq for Transaction
Auto Trait Implementations§
impl Freeze for Transaction
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnsafeUnpin for Transaction
impl UnwindSafe for Transaction
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.