pub struct TransactionReceipt<T = ReceiptEnvelope<Log>> {Show 13 fields
pub inner: T,
pub transaction_hash: FixedBytes<32>,
pub transaction_index: Option<u64>,
pub block_hash: Option<FixedBytes<32>>,
pub block_number: Option<u64>,
pub gas_used: u128,
pub effective_gas_price: u128,
pub blob_gas_used: Option<u128>,
pub blob_gas_price: Option<u128>,
pub from: Address,
pub to: Option<Address>,
pub contract_address: Option<Address>,
pub authorization_list: Option<Vec<SignedAuthorization>>,
}
eth
only.Expand description
Transaction receipt
This type is generic over an inner ReceiptEnvelope
which contains
consensus data and metadata.
Fields§
§inner: T
The receipt envelope, which contains the consensus receipt data..
transaction_hash: FixedBytes<32>
Transaction Hash.
transaction_index: Option<u64>
Index within the block.
block_hash: Option<FixedBytes<32>>
Hash of the block this transaction was included within.
block_number: Option<u64>
Number of the block this transaction was included within.
gas_used: u128
Gas used by this transaction alone.
effective_gas_price: u128
The price paid post-execution by the transaction (i.e. base fee + priority fee). Both fields in 1559-style transactions are maximums (max fee + max priority fee), the amount that’s actually paid by users can only be determined post-execution
blob_gas_used: Option<u128>
Blob gas used by the eip-4844 transaction
This is None for non eip-4844 transactions
blob_gas_price: Option<u128>
The price paid by the eip-4844 transaction per blob gas.
from: Address
Address of the sender
to: Option<Address>
Address of the receiver. None when its a contract creation transaction.
contract_address: Option<Address>
Contract address created, or None if not a deployment.
The authorization list is a list of tuples that store the address to code which the signer desires to execute in the context of their EOA.
Implementations§
source§impl TransactionReceipt
impl TransactionReceipt
sourcepub const fn transaction_type(&self) -> TxType
pub const fn transaction_type(&self) -> TxType
Returns the transaction type.
sourcepub fn calculate_create_address(&self, nonce: u64) -> Option<Address>
pub fn calculate_create_address(&self, nonce: u64) -> Option<Address>
Calculates the address that will be created by the transaction, if any.
Returns None
if the transaction is not a contract creation (the to
field is set), or if
the from
field is not set.
source§impl<T> TransactionReceipt<T>
impl<T> TransactionReceipt<T>
sourcepub fn map_inner<U, F>(self, f: F) -> TransactionReceipt<U>where
F: FnOnce(T) -> U,
pub fn map_inner<U, F>(self, f: F) -> TransactionReceipt<U>where
F: FnOnce(T) -> U,
Maps the inner receipt value of this receipt.
Trait Implementations§
source§impl<'arbitrary, T> Arbitrary<'arbitrary> for TransactionReceipt<T>where
T: Arbitrary<'arbitrary>,
impl<'arbitrary, T> Arbitrary<'arbitrary> for TransactionReceipt<T>where
T: Arbitrary<'arbitrary>,
source§fn arbitrary(
u: &mut Unstructured<'arbitrary>,
) -> Result<TransactionReceipt<T>, Error>
fn arbitrary( u: &mut Unstructured<'arbitrary>, ) -> Result<TransactionReceipt<T>, Error>
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(
u: Unstructured<'arbitrary>,
) -> Result<TransactionReceipt<T>, Error>
fn arbitrary_take_rest( u: Unstructured<'arbitrary>, ) -> Result<TransactionReceipt<T>, Error>
Self
from the entirety of the given
unstructured data. Read moresource§impl AsRef<ReceiptEnvelope<Log>> for TransactionReceipt
impl AsRef<ReceiptEnvelope<Log>> for TransactionReceipt
source§fn as_ref(&self) -> &ReceiptEnvelope<Log>
fn as_ref(&self) -> &ReceiptEnvelope<Log>
source§impl<T> Clone for TransactionReceipt<T>where
T: Clone,
impl<T> Clone for TransactionReceipt<T>where
T: Clone,
source§fn clone(&self) -> TransactionReceipt<T>
fn clone(&self) -> TransactionReceipt<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<T> Debug for TransactionReceipt<T>where
T: Debug,
impl<T> Debug for TransactionReceipt<T>where
T: Debug,
source§impl<'de, T> Deserialize<'de> for TransactionReceipt<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for TransactionReceipt<T>where
T: Deserialize<'de>,
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TransactionReceipt<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TransactionReceipt<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl<T> PartialEq for TransactionReceipt<T>where
T: PartialEq,
impl<T> PartialEq for TransactionReceipt<T>where
T: PartialEq,
source§impl<T> ReceiptResponse for TransactionReceipt<T>
impl<T> ReceiptResponse for TransactionReceipt<T>
source§fn contract_address(&self) -> Option<Address>
fn contract_address(&self) -> Option<Address>
None
if the transaction was not a deployment.source§fn block_hash(&self) -> Option<FixedBytes<32>>
fn block_hash(&self) -> Option<FixedBytes<32>>
source§fn block_number(&self) -> Option<u64>
fn block_number(&self) -> Option<u64>
source§fn transaction_hash(&self) -> FixedBytes<32>
fn transaction_hash(&self) -> FixedBytes<32>
source§fn transaction_index(&self) -> Option<u64>
fn transaction_index(&self) -> Option<u64>
source§fn effective_gas_price(&self) -> u128
fn effective_gas_price(&self) -> u128
source§fn blob_gas_used(&self) -> Option<u128>
fn blob_gas_used(&self) -> Option<u128>
source§fn blob_gas_price(&self) -> Option<u128>
fn blob_gas_price(&self) -> Option<u128>
source§fn cumulative_gas_used(&self) -> u128
fn cumulative_gas_used(&self) -> u128
source§fn state_root(&self) -> Option<FixedBytes<32>>
fn state_root(&self) -> Option<FixedBytes<32>>
source§impl<T> Serialize for TransactionReceipt<T>where
T: Serialize,
impl<T> Serialize for TransactionReceipt<T>where
T: Serialize,
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,
impl<T> Eq for TransactionReceipt<T>where
T: Eq,
impl<T> StructuralPartialEq for TransactionReceipt<T>
Auto Trait Implementations§
impl<T> Freeze for TransactionReceipt<T>where
T: Freeze,
impl<T> RefUnwindSafe for TransactionReceipt<T>where
T: RefUnwindSafe,
impl<T> Send for TransactionReceipt<T>where
T: Send,
impl<T> Sync for TransactionReceipt<T>where
T: Sync,
impl<T> Unpin for TransactionReceipt<T>where
T: Unpin,
impl<T> UnwindSafe for TransactionReceipt<T>where
T: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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