reth_primitives_traits::transaction::tx_type

Trait TxType

Source
pub trait TxType:
    Send
    + Sync
    + Unpin
    + Clone
    + Copy
    + Default
    + Debug
    + Display
    + PartialEq
    + Eq
    + PartialEq<u8>
    + Into<u8>
    + Into<U8>
    + TryFrom<u8, Error: Debug>
    + TryFrom<u64, Error: Debug>
    + TryFrom<U64>
    + Encodable
    + Decodable
    + InMemorySize {
    // Required methods
    fn is_legacy(&self) -> bool;
    fn is_eip2930(&self) -> bool;
    fn is_eip1559(&self) -> bool;
    fn is_eip4844(&self) -> bool;
    fn is_eip7702(&self) -> bool;

    // Provided method
    fn is_broadcastable_in_full(&self) -> bool { ... }
}
Expand description

Trait representing the behavior of a transaction type.

Required Methods§

Source

fn is_legacy(&self) -> bool

Returns true if this is a legacy transaction.

Source

fn is_eip2930(&self) -> bool

Returns true if this is an eip-2930 transaction.

Source

fn is_eip1559(&self) -> bool

Returns true if this is an eip-1559 transaction.

Source

fn is_eip4844(&self) -> bool

Returns true if this is an eip-4844 transaction.

Source

fn is_eip7702(&self) -> bool

Returns true if this is an eip-7702 transaction.

Provided Methods§

Source

fn is_broadcastable_in_full(&self) -> bool

Returns whether this transaction type can be broadcasted as full transaction over the network.

Some transactions are not broadcastable as objects and only allowed to be broadcasted as hashes, e.g. because they missing context (e.g. blob sidecar).

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.

Implementors§