Trait reth_payload_primitives::PayloadAttributes

source ·
pub trait PayloadAttributes:
    DeserializeOwned
    + Serialize
    + Debug
    + Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn timestamp(&self) -> u64;
    fn withdrawals(&self) -> Option<&Vec<Withdrawal>>;
    fn parent_beacon_block_root(&self) -> Option<B256>;
    fn ensure_well_formed_attributes(
        &self,
        chain_spec: &ChainSpec,
        version: EngineApiMessageVersion,
    ) -> Result<(), EngineObjectValidationError>;
}
Expand description

The execution payload attribute type the CL node emits via the engine API. This trait should be implemented by types that could be used to spawn a payload job.

This type is emitted as part of the forkchoiceUpdated call

Required Methods§

source

fn timestamp(&self) -> u64

Returns the timestamp to be used in the payload job.

source

fn withdrawals(&self) -> Option<&Vec<Withdrawal>>

Returns the withdrawals for the given payload attributes.

source

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

Return the parent beacon block root for the payload attributes.

source

fn ensure_well_formed_attributes( &self, chain_spec: &ChainSpec, version: EngineApiMessageVersion, ) -> Result<(), EngineObjectValidationError>

Ensures that the payload attributes are valid for the given [ChainSpec] and EngineApiMessageVersion.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl PayloadAttributes for OptimismPayloadAttributes

source§

impl PayloadAttributes for PayloadAttributes

Implementors§