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: B256The transaction hash: keccak256 of its signed bytes.
kind: u82 for EIP-1559; 0 for legacy.
chain_id: Option<u64>The chain it is signed for (chainId); None for a legacy transaction without one.
nonce: u64The sender’s nonce.
block_hash: Option<B256>The hash of the block it was mined in (blockHash); None while pending.
block_number: Option<u64>The number of the block it was mined in (blockNumber); None while pending.
transaction_index: Option<u64>Its position in the block (transactionIndex); None while pending.
from: AddressThe sender.
to: Option<Address>None for a creation.
value: U256Wei of the chain’s coin sent with it.
gas: u64The gas limit.
gas_price: Option<U256>Wei per unit of gas (gasPrice): the legacy price, or for type 2 what the node reports as paid.
max_fee_per_gas: Option<U256>The fee cap in wei per unit of gas (maxFeePerGas); None for a legacy transaction.
max_priority_fee_per_gas: Option<U256>The tip cap in wei per unit of gas (maxPriorityFeePerGas); None for a legacy transaction.
access_list: Vec<AccessItem>The contracts and storage slots it declares (accessList); empty when the node leaves it out.
input: Vec<u8>The calldata, or the init code of a creation.
r: Option<U256>The signature’s r; None when the node leaves it out.
s: Option<U256>The signature’s s; None when the node leaves it out.
y_parity: Option<u64>The signature’s parity, 0 or 1 (yParity); None when the node leaves it out.
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>,
impl Eq for Transaction
Source§impl PartialEq for Transaction
impl PartialEq for Transaction
impl StructuralPartialEq for Transaction
Auto Trait Implementations§
impl Forget for Transaction
impl Freeze for Transaction
impl Move 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
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
key and return true if they are equal.