OpTxTr

Trait OpTxTr 

pub trait OpTxTr: Transaction {
    // Required methods
    fn enveloped_tx(&self) -> Option<&Bytes>;
    fn source_hash(&self) -> Option<FixedBytes<32>>;
    fn mint(&self) -> Option<u128>;
    fn is_system_transaction(&self) -> bool;

    // Provided method
    fn is_deposit(&self) -> bool { ... }
}
Available on crate feature evm only.
Expand description

Optimism Transaction trait.

Required Methods§

fn enveloped_tx(&self) -> Option<&Bytes>

Enveloped transaction bytes.

fn source_hash(&self) -> Option<FixedBytes<32>>

Source hash of the deposit transaction.

fn mint(&self) -> Option<u128>

Mint of the deposit transaction

fn is_system_transaction(&self) -> bool

Whether the transaction is a system transaction

Provided Methods§

fn is_deposit(&self) -> bool

Returns true if transaction is of type DEPOSIT_TRANSACTION_TYPE.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl<'a, T> OpTxTr for &'a T
where T: 'a + OpTxTr + ?Sized, &'a T: Transaction,

§

fn enveloped_tx(&self) -> Option<&Bytes>

§

fn source_hash(&self) -> Option<FixedBytes<32>>

§

fn mint(&self) -> Option<u128>

§

fn is_system_transaction(&self) -> bool

§

fn is_deposit(&self) -> bool

§

impl<'a, T> OpTxTr for &'a mut T
where T: 'a + OpTxTr + ?Sized, &'a mut T: Transaction,

§

fn enveloped_tx(&self) -> Option<&Bytes>

§

fn source_hash(&self) -> Option<FixedBytes<32>>

§

fn mint(&self) -> Option<u128>

§

fn is_system_transaction(&self) -> bool

§

fn is_deposit(&self) -> bool

§

impl<T> OpTxTr for Box<T>
where T: OpTxTr + ?Sized, Box<T>: Transaction,

§

fn enveloped_tx(&self) -> Option<&Bytes>

§

fn source_hash(&self) -> Option<FixedBytes<32>>

§

fn mint(&self) -> Option<u128>

§

fn is_system_transaction(&self) -> bool

§

fn is_deposit(&self) -> bool

§

impl<T> OpTxTr for Arc<T>
where T: OpTxTr + ?Sized, Arc<T>: Transaction,

§

fn enveloped_tx(&self) -> Option<&Bytes>

§

fn source_hash(&self) -> Option<FixedBytes<32>>

§

fn mint(&self) -> Option<u128>

§

fn is_system_transaction(&self) -> bool

§

fn is_deposit(&self) -> bool

Implementors§

§

impl<T> OpTxTr for OpTransaction<T>
where T: Transaction,