pub enum ReceiptEnvelope<T = Log> {
Legacy(ReceiptWithBloom<Receipt<T>>),
Eip2930(ReceiptWithBloom<Receipt<T>>),
Eip1559(ReceiptWithBloom<Receipt<T>>),
Eip4844(ReceiptWithBloom<Receipt<T>>),
Eip7702(ReceiptWithBloom<Receipt<T>>),
}
Expand description
Receipt envelope, as defined in EIP-2718.
This enum distinguishes between tagged and untagged legacy receipts, as the
in-protocol Merkle tree may commit to EITHER 0-prefixed or raw. Therefore
we must ensure that encoding returns the precise byte-array that was
decoded, preserving the presence or absence of the TransactionType
flag.
Transaction receipt payloads are specified in their respective EIPs.
Variants§
Legacy(ReceiptWithBloom<Receipt<T>>)
Receipt envelope with no type flag.
Eip2930(ReceiptWithBloom<Receipt<T>>)
Receipt envelope with type flag 1, containing a EIP-2930 receipt.
Eip1559(ReceiptWithBloom<Receipt<T>>)
Receipt envelope with type flag 2, containing a EIP-1559 receipt.
Eip4844(ReceiptWithBloom<Receipt<T>>)
Receipt envelope with type flag 2, containing a EIP-4844 receipt.
Eip7702(ReceiptWithBloom<Receipt<T>>)
Receipt envelope with type flag 4, containing a EIP-7702 receipt.
Implementations§
source§impl<T> ReceiptEnvelope<T>
impl<T> ReceiptEnvelope<T>
sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Return true if the transaction was successful.
sourcepub fn cumulative_gas_used(&self) -> u64
pub fn cumulative_gas_used(&self) -> u64
Returns the cumulative gas used at this receipt.
sourcepub fn logs_bloom(&self) -> &Bloom
pub fn logs_bloom(&self) -> &Bloom
Return the receipt’s bloom.
sourcepub const fn as_receipt_with_bloom(
&self,
) -> Option<&ReceiptWithBloom<Receipt<T>>>
pub const fn as_receipt_with_bloom( &self, ) -> Option<&ReceiptWithBloom<Receipt<T>>>
Return the inner receipt with bloom. Currently this is infallible, however, future receipt types may be added.
sourcepub const fn as_receipt(&self) -> Option<&Receipt<T>>
pub const fn as_receipt(&self) -> Option<&Receipt<T>>
Return the inner receipt. Currently this is infallible, however, future receipt types may be added.
source§impl ReceiptEnvelope
impl ReceiptEnvelope
sourcepub fn inner_length(&self) -> usize
pub fn inner_length(&self) -> usize
Get the length of the inner receipt in the 2718 encoding.
sourcepub fn rlp_payload_length(&self) -> usize
pub fn rlp_payload_length(&self) -> usize
Calculate the length of the rlp payload of the network encoded receipt.
Trait Implementations§
source§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 ReceiptEnvelope<T>where
T: Clone,
impl<T> Clone for ReceiptEnvelope<T>where
T: Clone,
source§fn clone(&self) -> ReceiptEnvelope<T>
fn clone(&self) -> ReceiptEnvelope<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 ReceiptEnvelope<T>where
T: Debug,
impl<T> Debug for ReceiptEnvelope<T>where
T: Debug,
source§impl Decodable for ReceiptEnvelope
impl Decodable for ReceiptEnvelope
source§impl Decodable2718 for ReceiptEnvelope
impl Decodable2718 for ReceiptEnvelope
source§fn typed_decode(
ty: u8,
buf: &mut &[u8],
) -> Result<ReceiptEnvelope, Eip2718Error>
fn typed_decode( ty: u8, buf: &mut &[u8], ) -> Result<ReceiptEnvelope, Eip2718Error>
source§fn fallback_decode(buf: &mut &[u8]) -> Result<ReceiptEnvelope, Eip2718Error>
fn fallback_decode(buf: &mut &[u8]) -> Result<ReceiptEnvelope, Eip2718Error>
source§fn extract_type_byte(buf: &mut &[u8]) -> Option<u8>
fn extract_type_byte(buf: &mut &[u8]) -> Option<u8>
source§fn decode_2718(buf: &mut &[u8]) -> Result<Self, Eip2718Error>
fn decode_2718(buf: &mut &[u8]) -> Result<Self, Eip2718Error>
source§fn network_decode(buf: &mut &[u8]) -> Result<Self, Eip2718Error>
fn network_decode(buf: &mut &[u8]) -> Result<Self, Eip2718Error>
source§impl<'de, T> Deserialize<'de> for ReceiptEnvelope<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for ReceiptEnvelope<T>where
T: Deserialize<'de>,
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ReceiptEnvelope<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ReceiptEnvelope<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl Encodable for ReceiptEnvelope
impl Encodable for ReceiptEnvelope
source§impl Encodable2718 for ReceiptEnvelope
impl Encodable2718 for ReceiptEnvelope
source§fn encode_2718_len(&self) -> usize
fn encode_2718_len(&self) -> usize
source§fn encode_2718(&self, out: &mut dyn BufMut)
fn encode_2718(&self, out: &mut dyn BufMut)
source§fn encoded_2718(&self) -> Vec<u8> ⓘ
fn encoded_2718(&self) -> Vec<u8> ⓘ
source§fn trie_hash(&self) -> FixedBytes<32>
fn trie_hash(&self) -> FixedBytes<32>
source§fn network_len(&self) -> usize
fn network_len(&self) -> usize
source§fn network_encode(&self, out: &mut dyn BufMut)
fn network_encode(&self, out: &mut dyn BufMut)
source§impl<T> PartialEq for ReceiptEnvelope<T>where
T: PartialEq,
impl<T> PartialEq for ReceiptEnvelope<T>where
T: PartialEq,
source§fn eq(&self, other: &ReceiptEnvelope<T>) -> bool
fn eq(&self, other: &ReceiptEnvelope<T>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<T> Serialize for ReceiptEnvelope<T>where
T: Serialize,
impl<T> Serialize for ReceiptEnvelope<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,
source§impl<T> TxReceipt for ReceiptEnvelope<T>
impl<T> TxReceipt for ReceiptEnvelope<T>
source§fn cumulative_gas_used(&self) -> u64
fn cumulative_gas_used(&self) -> u64
Returns the cumulative gas used at this receipt.
source§fn status_or_post_state(&self) -> Eip658Value
fn status_or_post_state(&self) -> Eip658Value
source§fn bloom_cheap(&self) -> Option<Bloom>
fn bloom_cheap(&self) -> Option<Bloom>
source§fn with_bloom_ref(&self) -> ReceiptWithBloom<&Self>
fn with_bloom_ref(&self) -> ReceiptWithBloom<&Self>
ReceiptWithBloom
with the computed bloom filter Self::bloom
and a reference
to the receipt.source§fn into_with_bloom(self) -> ReceiptWithBloom<Self>
fn into_with_bloom(self) -> ReceiptWithBloom<Self>
ReceiptWithBloom
with the computed bloom filter
Self::bloom
and the receipt.impl<T> Eq for ReceiptEnvelope<T>where
T: Eq,
impl<T> StructuralPartialEq for ReceiptEnvelope<T>
Auto Trait Implementations§
impl<T> Freeze for ReceiptEnvelope<T>
impl<T> RefUnwindSafe for ReceiptEnvelope<T>where
T: RefUnwindSafe,
impl<T> Send for ReceiptEnvelope<T>where
T: Send,
impl<T> Sync for ReceiptEnvelope<T>where
T: Sync,
impl<T> Unpin for ReceiptEnvelope<T>where
T: Unpin,
impl<T> UnwindSafe for ReceiptEnvelope<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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default 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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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