Trait ExecutionPayload

Source
pub trait ExecutionPayload:
    Serialize
    + DeserializeOwned
    + Debug
    + Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn parent_hash(&self) -> FixedBytes<32>;
    fn block_hash(&self) -> FixedBytes<32>;
    fn block_number(&self) -> u64;
    fn withdrawals(&self) -> Option<&Vec<Withdrawal>>;
    fn parent_beacon_block_root(&self) -> Option<FixedBytes<32>>;
    fn timestamp(&self) -> u64;
    fn gas_used(&self) -> u64;
}
Expand description

An execution payload.

Required Methods§

Source

fn parent_hash(&self) -> FixedBytes<32>

Returns the parent hash of the block.

Source

fn block_hash(&self) -> FixedBytes<32>

Returns the hash of the block.

Source

fn block_number(&self) -> u64

Returns the number of the block.

Source

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

Returns the withdrawals for the payload, if it exists.

Source

fn parent_beacon_block_root(&self) -> Option<FixedBytes<32>>

Return the parent beacon block root for the payload, if it exists.

Source

fn timestamp(&self) -> u64

Returns the timestamp to be used in the payload.

Source

fn gas_used(&self) -> u64

Gas used by the payload

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 ExecutionPayload for OpExecutionData

Available on crate feature op only.

Implementors§