feat: added IsTyped2718 trait for Envelope (#16004)

This commit is contained in:
Soubhik Singha Mahapatra
2025-04-30 20:55:25 +05:30
committed by GitHub
parent 4d46962a65
commit 412dab238e
3 changed files with 49 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ use op_alloy_consensus::{OpTxEnvelope, OpTxType};
use reth_codecs::Compact;
use reth_ethereum::primitives::{
serde_bincode_compat::SerdeBincodeCompat, transaction::signed::RecoveryError, InMemorySize,
SignedTransaction,
IsTyped2718, SignedTransaction,
};
use revm_primitives::{Address, Bytes, TxKind, B256, U256};
use std::convert::TryInto;
@@ -120,6 +120,16 @@ where
}
}
impl<B, T> IsTyped2718 for ExtendedTxEnvelope<B, T>
where
B: IsTyped2718,
T: IsTyped2718,
{
fn is_type(type_id: u8) -> bool {
B::is_type(type_id) || T::is_type(type_id)
}
}
impl<B, T> InMemorySize for ExtendedTxEnvelope<B, T>
where
B: InMemorySize,