Trait BuiltPayload

pub trait BuiltPayload:
    Send
    + Sync
    + Debug {
    type Primitives: NodePrimitives;

    // Required methods
    fn block(&self) -> &SealedBlock<<Self::Primitives as NodePrimitives>::Block>;
    fn fees(&self) -> Uint<256, 4>;
    fn requests(&self) -> Option<Requests>;

    // Provided method
    fn executed_block(
        &self,
    ) -> Option<ExecutedBlockWithTrieUpdates<Self::Primitives>> { ... }
}
Expand description

Represents a built payload type that contains a built SealedBlock and can be converted into engine API execution payloads.

Required Associated Types§

type Primitives: NodePrimitives

The node’s primitive types

Required Methods§

fn block(&self) -> &SealedBlock<<Self::Primitives as NodePrimitives>::Block>

Returns the built block (sealed)

fn fees(&self) -> Uint<256, 4>

Returns the fees collected for the built block

fn requests(&self) -> Option<Requests>

Returns the EIP-7685 requests for the payload if any.

Provided Methods§

fn executed_block( &self, ) -> Option<ExecutedBlockWithTrieUpdates<Self::Primitives>>

Returns the entire execution data for the built block, if available.

Implementations on Foreign Types§

§

impl<'a, T> BuiltPayload for &'a T
where T: 'a + BuiltPayload + ?Sized, &'a T: Send + Sync + Debug,

§

type Primitives = <T as BuiltPayload>::Primitives

§

fn block( &self, ) -> &SealedBlock<<<&'a T as BuiltPayload>::Primitives as NodePrimitives>::Block>

§

fn fees(&self) -> Uint<256, 4>

§

fn executed_block( &self, ) -> Option<ExecutedBlockWithTrieUpdates<<&'a T as BuiltPayload>::Primitives>>

§

fn requests(&self) -> Option<Requests>

§

impl<T> BuiltPayload for Arc<T>
where T: BuiltPayload + ?Sized, Arc<T>: Send + Sync + Debug,

§

type Primitives = <T as BuiltPayload>::Primitives

§

fn block( &self, ) -> &SealedBlock<<<Arc<T> as BuiltPayload>::Primitives as NodePrimitives>::Block>

§

fn fees(&self) -> Uint<256, 4>

§

fn executed_block( &self, ) -> Option<ExecutedBlockWithTrieUpdates<<Arc<T> as BuiltPayload>::Primitives>>

§

fn requests(&self) -> Option<Requests>

Implementors§

§

impl BuiltPayload for EthBuiltPayload

impl<N: NodePrimitives> BuiltPayload for OpBuiltPayload<N>