maili-consensus 0.1.7

Optimism common types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Transaction envelope with support for OP [`TxDeposit`].

use alloy_consensus::Sealed;

use crate::TxDeposit;

/// Transaction envelope that encompasses a [`TxDeposit`].
pub trait DepositTxEnvelope {
    /// Returns `true` if the transaction is a deposit transaction.
    fn is_deposit(&self) -> bool;

    /// Returns [`TxDeposit`] if transaction is a deposit transaction.
    fn as_deposit(&self) -> Option<&Sealed<TxDeposit>>;
}