reth_payload_primitives

Trait 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>;
}
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.

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 PayloadAttributes for OpPayloadAttributes

Available on crate feature op only.
Source§

fn timestamp(&self) -> u64

Source§

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

Source§

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

Source§

impl PayloadAttributes for PayloadAttributes

Source§

fn timestamp(&self) -> u64

Source§

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

Source§

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

Implementors§