pub struct OpPayloadAttributes {
pub payload_attributes: PayloadAttributes,
pub transactions: Option<Vec<Bytes>>,
pub no_tx_pool: Option<bool>,
pub gas_limit: Option<u64>,
pub eip_1559_params: Option<B64>,
}
Expand description
Optimism Payload Attributes
Fields§
§payload_attributes: PayloadAttributes
The payload attributes
transactions: Option<Vec<Bytes>>
Transactions is a field for rollups: the transactions list is forced into the block
no_tx_pool: Option<bool>
If true, the no transactions are taken out of the tx-pool, only transactions from the above Transactions list will be included.
gas_limit: Option<u64>
If set, this sets the exact gas limit the block produced with.
eip_1559_params: Option<B64>
If set, this sets the EIP-1559 parameters for the block.
Prior to Holocene activation, this field should always be None.
Implementations§
Source§impl OpPayloadAttributes
impl OpPayloadAttributes
Sourcepub fn get_holocene_extra_data(
&self,
default_base_fee_params: BaseFeeParams,
) -> Result<Bytes, EIP1559ParamError>
pub fn get_holocene_extra_data( &self, default_base_fee_params: BaseFeeParams, ) -> Result<Bytes, EIP1559ParamError>
Extracts the eip1559
parameters for the payload.
Sourcepub fn decode_eip_1559_params(&self) -> Option<(u32, u32)>
pub fn decode_eip_1559_params(&self) -> Option<(u32, u32)>
Extracts the Holocene 1599 parameters from the encoded form: https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/holocene/exec-engine.md#eip1559params-encoding
Returns (elasticity
, denominator
)
Trait Implementations§
Source§impl Clone for OpPayloadAttributes
impl Clone for OpPayloadAttributes
Source§fn clone(&self) -> OpPayloadAttributes
fn clone(&self) -> OpPayloadAttributes
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OpPayloadAttributes
impl Debug for OpPayloadAttributes
Source§impl Default for OpPayloadAttributes
impl Default for OpPayloadAttributes
Source§fn default() -> OpPayloadAttributes
fn default() -> OpPayloadAttributes
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OpPayloadAttributes
impl<'de> Deserialize<'de> for OpPayloadAttributes
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for OpPayloadAttributes
impl PartialEq for OpPayloadAttributes
Source§impl Serialize for OpPayloadAttributes
impl Serialize for OpPayloadAttributes
impl Eq for OpPayloadAttributes
impl StructuralPartialEq for OpPayloadAttributes
Auto Trait Implementations§
impl Freeze for OpPayloadAttributes
impl RefUnwindSafe for OpPayloadAttributes
impl Send for OpPayloadAttributes
impl Sync for OpPayloadAttributes
impl Unpin for OpPayloadAttributes
impl UnwindSafe for OpPayloadAttributes
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
Converts
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>
Converts
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 more