Skip to main content

ExecutionPayload

Trait ExecutionPayload 

pub trait ExecutionPayload:
    Serialize
    + DeserializeOwned
    + Debug
    + Clone
    + Send
    + Sync
    + 'static {
Show 13 methods // 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 block_access_list(&self) -> Option<&Bytes>; fn parent_beacon_block_root(&self) -> Option<FixedBytes<32>>; fn timestamp(&self) -> u64; fn gas_used(&self) -> u64; fn gas_limit(&self) -> u64; fn transaction_count(&self) -> usize; fn slot_number(&self) -> Option<u64>; // Provided methods fn num_hash(&self) -> NumHash { ... } fn block_with_parent(&self) -> BlockWithParent { ... }
}
Expand description

Represents the core data structure of an execution payload.

Contains all necessary information to execute and validate a block, including headers, transactions, and consensus fields. Provides a unified interface regardless of protocol version.

Required Methods§

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

Returns the hash of this block’s parent.

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

Returns this block’s hash.

fn block_number(&self) -> u64

Returns this block’s number (height).

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

Returns the withdrawals included in this payload.

Returns None for pre-Shanghai blocks.

fn block_access_list(&self) -> Option<&Bytes>

Returns the access list included in this payload.

Returns None for pre-Amsterdam blocks.

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

Returns the beacon block root associated with this payload.

Returns None for pre-merge payloads.

fn timestamp(&self) -> u64

Returns this block’s timestamp (seconds since Unix epoch).

fn gas_used(&self) -> u64

Returns the total gas consumed by all transactions in this block.

fn gas_limit(&self) -> u64

Returns the total gas limit for this block.

fn transaction_count(&self) -> usize

Returns the number of transactions in the payload.

fn slot_number(&self) -> Option<u64>

Returns the slot number included in this payload.

Returns None for pre-Amsterdam blocks.

Provided Methods§

fn num_hash(&self) -> NumHash

Returns this block’s number hash.

fn block_with_parent(&self) -> BlockWithParent

Returns a [BlockWithParent] for this block.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

§

impl ExecutionPayload for ExecutionData

§

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

§

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

§

fn block_number(&self) -> u64

§

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

§

fn block_access_list(&self) -> Option<&Bytes>

§

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

§

fn timestamp(&self) -> u64

§

fn gas_used(&self) -> u64

§

fn gas_limit(&self) -> u64

§

fn transaction_count(&self) -> usize

§

fn slot_number(&self) -> Option<u64>

Implementors§

Source§

impl ExecutionPayload for BigBlockData<ExecutionData>

Available on crate feature std only.