reth_optimism_primitives/transaction/mod.rs
1//! Optimism transaction types
2
3mod tx_type;
4
5/// Kept for concistency tests
6#[cfg(test)]
7mod signed;
8
9pub use op_alloy_consensus::{OpTxType, OpTypedTransaction};
10
11/// Signed transaction.
12pub type OpTransactionSigned = op_alloy_consensus::OpTxEnvelope;
13
14/// A trait that represents an optimism transaction, mainly used to indicate whether or not the
15/// transaction is a deposit transaction.
16pub trait OpTransaction {
17 /// Whether or not the transaction is a dpeosit transaction.
18 fn is_deposit(&self) -> bool;
19}
20
21impl OpTransaction for op_alloy_consensus::OpTxEnvelope {
22 fn is_deposit(&self) -> bool {
23 Self::is_deposit(self)
24 }
25}