mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-09 23:38:10 -05:00
chore: prep alloy TxEnvelope transition (#15628)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user