pub type Receipt<T = TxType> = EthereumReceipt<T>;
Expand description
Raw ethereum receipt.
Aliased Type§
pub struct Receipt<T = TxType> {
pub tx_type: T,
pub success: bool,
pub cumulative_gas_used: u64,
pub logs: Vec<Log>,
}
Fields§
§tx_type: T
Receipt type.
success: bool
If transaction is executed successfully.
This is the statusCode
cumulative_gas_used: u64
Gas used
logs: Vec<Log>
Log send from contracts.
Implementations§
Source§impl Receipt
impl Receipt
Sourcepub const fn bitflag_encoded_bytes() -> usize
Available on crate feature reth-codec
only.
pub const fn bitflag_encoded_bytes() -> usize
reth-codec
only.Used bytes by ReceiptFlags
Sourcepub const fn bitflag_unused_bits() -> usize
Available on crate feature reth-codec
only.
pub const fn bitflag_unused_bits() -> usize
reth-codec
only.Unused bits for new fields by ReceiptFlags
Source§impl<T> Receipt<T>
impl<T> Receipt<T>
Sourcepub fn into_rpc(
self,
next_log_index: usize,
meta: TransactionMeta,
) -> RpcReceipt<T>
Available on crate feature rpc
only.
pub fn into_rpc( self, next_log_index: usize, meta: TransactionMeta, ) -> RpcReceipt<T>
rpc
only.Converts the logs of the receipt to RPC logs.
Source§impl<T: TxTy> Receipt<T>
impl<T: TxTy> Receipt<T>
Sourcepub fn rlp_encoded_fields_length(&self, bloom: &Bloom) -> usize
pub fn rlp_encoded_fields_length(&self, bloom: &Bloom) -> usize
Returns length of RLP-encoded receipt fields with the given [Bloom
] without an RLP header.
Sourcepub fn rlp_encode_fields(&self, bloom: &Bloom, out: &mut dyn BufMut)
pub fn rlp_encode_fields(&self, bloom: &Bloom, out: &mut dyn BufMut)
RLP-encodes receipt fields with the given [Bloom
] without an RLP header.
Sourcepub fn rlp_header_inner(&self, bloom: &Bloom) -> Header
pub fn rlp_header_inner(&self, bloom: &Bloom) -> Header
Returns RLP header for inner encoding.
Sourcepub fn rlp_decode_inner(
buf: &mut &[u8],
tx_type: T,
) -> Result<ReceiptWithBloom<Self>>
pub fn rlp_decode_inner( buf: &mut &[u8], tx_type: T, ) -> Result<ReceiptWithBloom<Self>>
RLP-decodes the receipt from the provided buffer. This does not expect a type byte or network header.
Sourcepub fn calculate_receipt_root_no_memo(receipts: &[Self]) -> B256
pub fn calculate_receipt_root_no_memo(receipts: &[Self]) -> B256
Calculates the receipt root for a header for the reference type of Receipt.
NOTE: Prefer proofs::calculate_receipt_root
if you have log blooms memoized.
Sourcepub fn rlp_encoded_fields_length_without_bloom(&self) -> usize
pub fn rlp_encoded_fields_length_without_bloom(&self) -> usize
Returns length of RLP-encoded receipt fields without the given [Bloom
] without an RLP
header
Sourcepub fn rlp_encode_fields_without_bloom(&self, out: &mut dyn BufMut)
pub fn rlp_encode_fields_without_bloom(&self, out: &mut dyn BufMut)
RLP-encodes receipt fields without the given [Bloom
] without an RLP header.
Sourcepub fn rlp_header_inner_without_bloom(&self) -> Header
pub fn rlp_header_inner_without_bloom(&self) -> Header
Returns RLP header for inner encoding.
Sourcepub fn rlp_decode_inner_without_bloom(
buf: &mut &[u8],
tx_type: T,
) -> Result<Self>
pub fn rlp_decode_inner_without_bloom( buf: &mut &[u8], tx_type: T, ) -> Result<Self>
RLP-decodes the receipt from the provided buffer. This does not expect a type byte or network header.
Trait Implementations§
Source§impl<T: Compact> Compact for Receipt<T>
Available on crate feature reth-codec
only.
impl<T: Compact> Compact for Receipt<T>
reth-codec
only.Source§fn to_compact<B>(&self, buf: &mut B) -> usize
fn to_compact<B>(&self, buf: &mut B) -> usize
Source§fn from_compact(buf: &[u8], _len: usize) -> (Self, &[u8])
fn from_compact(buf: &[u8], _len: usize) -> (Self, &[u8])
buf
with its internal cursor
advanced (eg..advance(len)
). Read more§fn specialized_to_compact<B>(&self, buf: &mut B) -> usize
fn specialized_to_compact<B>(&self, buf: &mut B) -> usize
§fn specialized_from_compact(buf: &[u8], len: usize) -> (Self, &[u8])
fn specialized_from_compact(buf: &[u8], len: usize) -> (Self, &[u8])
Source§impl<T: TxTy> Decodable2718 for Receipt<T>
impl<T: TxTy> Decodable2718 for Receipt<T>
Source§fn typed_decode(ty: u8, buf: &mut &[u8]) -> Eip2718Result<Self>
fn typed_decode(ty: u8, buf: &mut &[u8]) -> Eip2718Result<Self>
Source§fn fallback_decode(buf: &mut &[u8]) -> Eip2718Result<Self>
fn fallback_decode(buf: &mut &[u8]) -> Eip2718Result<Self>
§fn extract_type_byte(buf: &mut &[u8]) -> Option<u8>
fn extract_type_byte(buf: &mut &[u8]) -> Option<u8>
§fn decode_2718(buf: &mut &[u8]) -> Result<Self, Eip2718Error>
fn decode_2718(buf: &mut &[u8]) -> Result<Self, Eip2718Error>
§fn decode_2718_exact(bytes: &[u8]) -> Result<Self, Eip2718Error>
fn decode_2718_exact(bytes: &[u8]) -> Result<Self, Eip2718Error>
Source§impl<T: TxTy> Eip2718EncodableReceipt for Receipt<T>
impl<T: TxTy> Eip2718EncodableReceipt for Receipt<T>
Source§fn eip2718_encoded_length_with_bloom(&self, bloom: &Bloom) -> usize
fn eip2718_encoded_length_with_bloom(&self, bloom: &Bloom) -> usize
Source§fn eip2718_encode_with_bloom(&self, bloom: &Bloom, out: &mut dyn BufMut)
fn eip2718_encode_with_bloom(&self, bloom: &Bloom, out: &mut dyn BufMut)
Source§impl<T: TxTy> Encodable2718 for Receipt<T>
impl<T: TxTy> Encodable2718 for Receipt<T>
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)
§fn encoded_2718(&self) -> Vec<u8> ⓘ
fn encoded_2718(&self) -> Vec<u8> ⓘ
§fn trie_hash(&self) -> FixedBytes<32>
fn trie_hash(&self) -> FixedBytes<32>
§fn into_encoded(self) -> WithEncoded<Self>
fn into_encoded(self) -> WithEncoded<Self>
WithEncoded
] wrapper. Read more§fn network_len(&self) -> usize
fn network_len(&self) -> usize
§fn network_encode(&self, out: &mut dyn BufMut)
fn network_encode(&self, out: &mut dyn BufMut)
Source§impl<'a, T> From<Receipt<'a, T>> for Receipt<T>
Available on crate features serde
and serde-bincode-compat
only.
impl<'a, T> From<Receipt<'a, T>> for Receipt<T>
serde
and serde-bincode-compat
only.Source§impl<T: TxTy> RlpDecodableReceipt for Receipt<T>
impl<T: TxTy> RlpDecodableReceipt for Receipt<T>
Source§fn rlp_decode_with_bloom(buf: &mut &[u8]) -> Result<ReceiptWithBloom<Self>>
fn rlp_decode_with_bloom(buf: &mut &[u8]) -> Result<ReceiptWithBloom<Self>>
Bloom
] into [ReceiptWithBloom
] instance.Source§impl<T: TxTy> RlpEncodableReceipt for Receipt<T>
impl<T: TxTy> RlpEncodableReceipt for Receipt<T>
Source§fn rlp_encoded_length_with_bloom(&self, bloom: &Bloom) -> usize
fn rlp_encoded_length_with_bloom(&self, bloom: &Bloom) -> usize
Source§fn rlp_encode_with_bloom(&self, bloom: &Bloom, out: &mut dyn BufMut)
fn rlp_encode_with_bloom(&self, bloom: &Bloom, out: &mut dyn BufMut)
Source§impl<T> SerdeBincodeCompat for Receipt<T>
Available on crate features serde
and serde-bincode-compat
only.
impl<T> SerdeBincodeCompat for Receipt<T>
serde
and serde-bincode-compat
only.Source§type BincodeRepr<'a> = Receipt<'a, T>
type BincodeRepr<'a> = Receipt<'a, T>
Source§impl<T: TxTy> Typed2718 for Receipt<T>
impl<T: TxTy> Typed2718 for Receipt<T>
§fn is_eip2930(&self) -> bool
fn is_eip2930(&self) -> bool
§fn is_eip1559(&self) -> bool
fn is_eip1559(&self) -> bool
§fn is_eip4844(&self) -> bool
fn is_eip4844(&self) -> bool
§fn is_eip7702(&self) -> bool
fn is_eip7702(&self) -> bool
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.