pub trait PayloadBuilderAttributes:
Send
+ Sync
+ Unpin
+ Debug
+ 'static {
type RpcPayloadAttributes: Send + Sync + 'static;
type Error: Error + Send + Sync + 'static;
// Required methods
fn try_new(
parent: B256,
rpc_payload_attributes: Self::RpcPayloadAttributes,
version: u8,
) -> Result<Self, Self::Error>
where Self: Sized;
fn payload_id(&self) -> PayloadId;
fn parent(&self) -> B256;
fn timestamp(&self) -> u64;
fn parent_beacon_block_root(&self) -> Option<B256>;
fn suggested_fee_recipient(&self) -> Address;
fn prev_randao(&self) -> B256;
fn withdrawals(&self) -> &Withdrawals;
}
Expand description
Attributes used to guide the construction of a new execution payload.
Extends basic payload attributes with additional context needed during the building process, tracking in-progress payload jobs and their parameters.
Required Associated Types§
Sourcetype RpcPayloadAttributes: Send + Sync + 'static
type RpcPayloadAttributes: Send + Sync + 'static
The external payload attributes format this type can be constructed from.
Required Methods§
Sourcefn try_new(
parent: B256,
rpc_payload_attributes: Self::RpcPayloadAttributes,
version: u8,
) -> Result<Self, Self::Error>where
Self: Sized,
fn try_new(
parent: B256,
rpc_payload_attributes: Self::RpcPayloadAttributes,
version: u8,
) -> Result<Self, Self::Error>where
Self: Sized,
Constructs new builder attributes from external payload attributes.
Validates attributes and generates a unique [PayloadId
] based on the
parent block, attributes, and version.
Sourcefn payload_id(&self) -> PayloadId
fn payload_id(&self) -> PayloadId
Returns the unique identifier for this payload build job.
Sourcefn parent_beacon_block_root(&self) -> Option<B256>
fn parent_beacon_block_root(&self) -> Option<B256>
Returns the beacon chain block root from the parent block.
Returns None
for pre-merge blocks or non-beacon contexts.
Sourcefn suggested_fee_recipient(&self) -> Address
fn suggested_fee_recipient(&self) -> Address
Returns the address that should receive transaction fees.
Sourcefn prev_randao(&self) -> B256
fn prev_randao(&self) -> B256
Returns the randomness value for this block.
Sourcefn withdrawals(&self) -> &Withdrawals
fn withdrawals(&self) -> &Withdrawals
Returns the list of withdrawals to be processed in this block.