pub struct TransactionReceipt {
pub state_root: Vec<u8>,
pub cumulative_gas_used: u64,
pub logs_bloom: Vec<u8>,
pub logs: Vec<Log>,
pub blob_gas_used: Option<u64>,
pub blob_gas_price: Option<BigInt>,
}
Fields§
§state_root: Vec<u8>
State root is an intermediate state_root hash, computed in-between transactions to make
sure you could build a proof and point to state in the middle of a block. Geth client
uses PostState + root + PostStateOrStatus`` while Parity used
status_code, root…`` this piles
hard forks, see (read the EIPs first):
Moreover, the notion of Outcome`` in parity, which segregates the two concepts, which are stored in the same field
status_code`` can be computed based on such a hack of the state_root
field, following EIP-658
.
Before Byzantinium hard fork, this field is always empty.
cumulative_gas_used: u64
§logs_bloom: Vec<u8>
§logs: Vec<Log>
§blob_gas_used: Option<u64>
BlobGasUsed is the amount of blob gas that has been used within this transaction. At time
of writing, this is equal to self.blob_gas_fee_cap * len(self.blob_hashes)
.
This is specified by https://eips.ethereum.org/EIPS/eip-4844
This will is populated only if TransactionTrace.Type == TRX_TYPE_BLOB
which is possible only
if Cancun fork is active on the chain.
blob_gas_price: Option<BigInt>
BlobGasPrice is the amount to pay per blob item in the transaction.
This is specified by https://eips.ethereum.org/EIPS/eip-4844
This will is populated only if TransactionTrace.Type == TRX_TYPE_BLOB
which is possible only
if Cancun fork is active on the chain.
Implementations§
Source§impl TransactionReceipt
impl TransactionReceipt
Sourcepub fn blob_gas_used(&self) -> u64
pub fn blob_gas_used(&self) -> u64
Returns the value of blob_gas_used
, or the default value if blob_gas_used
is unset.
Trait Implementations§
Source§impl Clone for TransactionReceipt
impl Clone for TransactionReceipt
Source§fn clone(&self) -> TransactionReceipt
fn clone(&self) -> TransactionReceipt
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TransactionReceipt
impl Debug for TransactionReceipt
Source§impl Default for TransactionReceipt
impl Default for TransactionReceipt
Source§impl Message for TransactionReceipt
impl Message for TransactionReceipt
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.