chore: prep alloy TxEnvelope transition (#15628)

This commit is contained in:
Matthias Seitz
2025-04-09 12:09:57 +02:00
committed by GitHub
parent c6ba7c6207
commit 9239188093
4 changed files with 16 additions and 9 deletions

View File

@@ -24,7 +24,7 @@ use reth_evm::{
use reth_execution_types::ExecutionOutcome;
use reth_optimism_evm::OpNextBlockEnvAttributes;
use reth_optimism_forks::OpHardforks;
use reth_optimism_primitives::transaction::signed::OpTransaction;
use reth_optimism_primitives::transaction::OpTransaction;
use reth_optimism_txpool::{
interop::{is_valid_interop, MaybeInteropTransaction},
OpPooledTx,

View File

@@ -1,5 +1,5 @@
use alloy_consensus::{BlockBody, Header};
use reth_optimism_primitives::{transaction::signed::OpTransaction, DepositReceipt};
use reth_optimism_primitives::{transaction::OpTransaction, DepositReceipt};
use reth_primitives_traits::{NodePrimitives, SignedTransaction};
/// Helper trait to encapsulate common bounds on [`NodePrimitives`] for OP payload builder.

View File

@@ -2,3 +2,16 @@
pub mod signed;
pub mod tx_type;
/// A trait that represents an optimism transaction, mainly used to indicate whether or not the
/// transaction is a deposit transaction.
pub trait OpTransaction {
/// Whether or not the transaction is a dpeosit transaction.
fn is_deposit(&self) -> bool;
}
impl OpTransaction for op_alloy_consensus::OpTxEnvelope {
fn is_deposit(&self) -> bool {
Self::is_deposit(self)
}
}

View File

@@ -1,5 +1,6 @@
//! A signed Optimism transaction.
use crate::transaction::OpTransaction;
use alloc::vec::Vec;
use alloy_consensus::{
transaction::{RlpEcdsaDecodableTx, RlpEcdsaEncodableTx},
@@ -196,13 +197,6 @@ impl From<Sealed<TxDeposit>> for OpTransactionSigned {
}
}
/// A trait that represents an optimism transaction, mainly used to indicate whether or not the
/// transaction is a deposit transaction.
pub trait OpTransaction {
/// Whether or not the transaction is a dpeosit transaction.
fn is_deposit(&self) -> bool;
}
impl OpTransaction for OpTransactionSigned {
fn is_deposit(&self) -> bool {
self.is_deposit()