Trait OpTxTr

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

    // Provided method
    fn is_deposit(&self) -> bool { ... }
}

Required Methods§

Source

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

Source

fn source_hash(&self) -> Option<B256>

Source hash of the deposit transaction

Source

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

Mint of the deposit transaction

Source

fn is_system_transaction(&self) -> bool

Whether the transaction is a system transaction

Provided Methods§

Source

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§

Source§

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

Source§

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

Source§

fn source_hash(&self) -> Option<B256>

Source§

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

Source§

fn is_system_transaction(&self) -> bool

Source§

fn is_deposit(&self) -> bool

Source§

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

Source§

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

Source§

fn source_hash(&self) -> Option<B256>

Source§

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

Source§

fn is_system_transaction(&self) -> bool

Source§

fn is_deposit(&self) -> bool

Source§

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

Source§

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

Source§

fn source_hash(&self) -> Option<B256>

Source§

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

Source§

fn is_system_transaction(&self) -> bool

Source§

fn is_deposit(&self) -> bool

Source§

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

Source§

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

Source§

fn source_hash(&self) -> Option<B256>

Source§

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

Source§

fn is_system_transaction(&self) -> bool

Source§

fn is_deposit(&self) -> bool

Implementors§