chore: add typed receipt for Receipt (#13140)

This commit is contained in:
Matthias Seitz
2024-12-04 21:20:45 +01:00
committed by GitHub
parent fbd2d6eeda
commit 337272c88b
2 changed files with 7 additions and 6 deletions

View File

@ -4,7 +4,7 @@ use reth_primitives_traits::InMemorySize;
use alloy_consensus::{
constants::{EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, EIP4844_TX_TYPE_ID, EIP7702_TX_TYPE_ID},
Eip658Value, TxReceipt,
Eip658Value, TxReceipt, Typed2718,
};
use alloy_eips::eip2718::Encodable2718;
use alloy_primitives::{Bloom, Log, B256};
@ -96,12 +96,14 @@ impl TxReceipt for Receipt {
}
}
impl reth_primitives_traits::Receipt for Receipt {
fn tx_type(&self) -> u8 {
impl Typed2718 for Receipt {
fn ty(&self) -> u8 {
self.tx_type as u8
}
}
impl reth_primitives_traits::Receipt for Receipt {}
impl ReceiptExt for Receipt {
fn receipts_root(_receipts: &[&Self]) -> B256 {
#[cfg(feature = "optimism")]