pub struct PayloadAttributes {
pub timestamp: u64,
pub prev_randao: B256,
pub suggested_fee_recipient: Address,
pub withdrawals: Option<Vec<Withdrawal>>,
pub parent_beacon_block_root: Option<B256>,
pub slot_number: Option<u64>,
}Expand description
This structure contains the attributes required to initiate a payload build process in the
context of an engine_forkchoiceUpdated call.
Fields§
§timestamp: u64Value for the timestamp field of the new payload
prev_randao: B256Value for the prevRandao field of the new payload
suggested_fee_recipient: AddressSuggested value for the feeRecipient field of the new payload
withdrawals: Option<Vec<Withdrawal>>Array of Withdrawal enabled with V2
See https://github.com/ethereum/execution-apis/blob/6452a6b194d7db269bf1dbd087a267251d3cc7f8/src/engine/shanghai.md#payloadattributesv2
parent_beacon_block_root: Option<B256>Root of the parent beacon block enabled with V3.
See also https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#payloadattributesv3
slot_number: Option<u64>Slot of the current block enabled with Amsterdam fork.
Implementations§
Source§impl PayloadAttributes
impl PayloadAttributes
Sourcepub const fn with_timestamp(self, timestamp: u64) -> Self
pub const fn with_timestamp(self, timestamp: u64) -> Self
Sets the timestamp for the payload attributes.
Sourcepub fn with_withdrawals(self, withdrawals: Vec<Withdrawal>) -> Self
pub fn with_withdrawals(self, withdrawals: Vec<Withdrawal>) -> Self
Sets the withdrawals for the payload attributes.
Sourcepub const fn with_parent_beacon_block_root(
self,
parent_beacon_block_root: B256,
) -> Self
pub const fn with_parent_beacon_block_root( self, parent_beacon_block_root: B256, ) -> Self
Sets the parent beacon block root for the payload attributes.
Sourcepub const fn with_slot_number(self, slot_number: u64) -> Self
pub const fn with_slot_number(self, slot_number: u64) -> Self
Sets the slot number for the payload attributes.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for PayloadAttributes
impl<'arbitrary> Arbitrary<'arbitrary> for PayloadAttributes
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl Clone for PayloadAttributes
impl Clone for PayloadAttributes
Source§fn clone(&self) -> PayloadAttributes
fn clone(&self) -> PayloadAttributes
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PayloadAttributes
impl Debug for PayloadAttributes
Source§impl Decode for PayloadAttributes
Available on crate feature ssz only.
impl Decode for PayloadAttributes
ssz only.Source§fn is_ssz_fixed_len() -> bool
fn is_ssz_fixed_len() -> bool
true if this object has a fixed-length. Read moreSource§fn from_ssz_bytes(bytes: &[u8]) -> Result<Self, DecodeError>
fn from_ssz_bytes(bytes: &[u8]) -> Result<Self, DecodeError>
Source§fn ssz_fixed_len() -> usize
fn ssz_fixed_len() -> usize
Source§impl Default for PayloadAttributes
impl Default for PayloadAttributes
Source§fn default() -> PayloadAttributes
fn default() -> PayloadAttributes
Source§impl<'de> Deserialize<'de> for PayloadAttributes
impl<'de> Deserialize<'de> for PayloadAttributes
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Encode for PayloadAttributes
Available on crate feature ssz only.
impl Encode for PayloadAttributes
ssz only.Source§fn is_ssz_fixed_len() -> bool
fn is_ssz_fixed_len() -> bool
true if this object has a fixed-length. Read moreSource§fn ssz_bytes_len(&self) -> usize
fn ssz_bytes_len(&self) -> usize
self is serialized. Read moreSource§fn ssz_fixed_len() -> usize
fn ssz_fixed_len() -> usize
Source§impl PartialEq for PayloadAttributes
impl PartialEq for PayloadAttributes
Source§fn eq(&self, other: &PayloadAttributes) -> bool
fn eq(&self, other: &PayloadAttributes) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PayloadAttributes
impl Serialize for PayloadAttributes
impl Eq for PayloadAttributes
impl StructuralPartialEq for PayloadAttributes
Auto Trait Implementations§
impl Freeze for PayloadAttributes
impl RefUnwindSafe for PayloadAttributes
impl Send for PayloadAttributes
impl Sync for PayloadAttributes
impl Unpin for PayloadAttributes
impl UnsafeUnpin for PayloadAttributes
impl UnwindSafe for PayloadAttributes
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 136 bytes