PayloadAttributesBuilder

Trait PayloadAttributesBuilder 

Source
pub trait PayloadAttributesBuilder<Attributes, Header = Header>:
    Send
    + Sync
    + 'static {
    // Required method
    fn build(&self, parent: &SealedHeader<Header>) -> Attributes;
}
Expand description

Factory trait for creating payload attributes.

Enables different strategies for generating payload attributes based on contextual information. Useful for testing and specialized building.

Required Methods§

Source

fn build(&self, parent: &SealedHeader<Header>) -> Attributes

Constructs new payload attributes for the given timestamp.

Trait Implementations§

Source§

impl<Attributes, Header> PayloadAttributesBuilder<Attributes, Header> for Box<dyn PayloadAttributesBuilder<Attributes, Header>>
where Header: 'static, Attributes: 'static,

Source§

fn build(&self, parent: &SealedHeader<Header>) -> Attributes

Constructs new payload attributes for the given timestamp.

Implementations on Foreign Types§

Source§

impl<Attributes, Header> PayloadAttributesBuilder<Attributes, Header> for Box<dyn PayloadAttributesBuilder<Attributes, Header>>
where Header: 'static, Attributes: 'static,

Source§

fn build(&self, parent: &SealedHeader<Header>) -> Attributes

Source§

impl<Attributes, Header, L, R> PayloadAttributesBuilder<Attributes, Header> for Either<L, R>
where L: PayloadAttributesBuilder<Attributes, Header>, R: PayloadAttributesBuilder<Attributes, Header>,

Source§

fn build(&self, parent: &SealedHeader<Header>) -> Attributes

Source§

impl<ChainSpec> PayloadAttributesBuilder<OpPayloadAttributes, <ChainSpec as EthChainSpec>::Header> for LocalPayloadAttributesBuilder<ChainSpec>
where ChainSpec: EthChainSpec + EthereumHardforks + 'static,

Available on crate feature op only.
Source§

fn build( &self, parent: &SealedHeader<<ChainSpec as EthChainSpec>::Header>, ) -> OpPayloadAttributes

Source§

impl<ChainSpec> PayloadAttributesBuilder<PayloadAttributes, <ChainSpec as EthChainSpec>::Header> for LocalPayloadAttributesBuilder<ChainSpec>
where ChainSpec: EthChainSpec + EthereumHardforks + 'static,

Source§

fn build( &self, parent: &SealedHeader<<ChainSpec as EthChainSpec>::Header>, ) -> PayloadAttributes

Implementors§

Source§

impl<Attributes, Header, F> PayloadAttributesBuilder<Attributes, Header> for F
where Header: Clone, F: Fn(SealedHeader<Header>) -> Attributes + Send + Sync + 'static,