PayloadAttributes

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

Basic attributes required to initiate payload construction.

Defines minimal parameters needed to build a new execution payload. Implementations must be serializable for transmission.

Required Methods§

Source

fn timestamp(&self) -> u64

Returns the timestamp for the new payload.

Source

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

Returns the withdrawals to be included in the payload.

Some for post-Shanghai blocks, None for earlier blocks.

Source

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

Returns the parent beacon block root.

Some for post-merge blocks, None for pre-merge blocks.

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§