pub enum L1BlockInfoTx {
Bedrock(L1BlockInfoBedrock),
Ecotone(L1BlockInfoEcotone),
Isthmus(L1BlockInfoIsthmus),
}Expand description
The L1BlockInfoTx enum contains variants for the different versions of the L1 block info
transaction on OP Stack chains.
This transaction always sits at the top of the block, and alters the L1 Block contract’s
knowledge of the L1 chain.
Variants§
Bedrock(L1BlockInfoBedrock)
A Bedrock L1 info transaction
Ecotone(L1BlockInfoEcotone)
An Ecotone L1 info transaction
Isthmus(L1BlockInfoIsthmus)
An Isthmus L1 info transaction
Implementations§
Source§impl L1BlockInfoTx
impl L1BlockInfoTx
Sourcepub fn try_new(
rollup_config: &RollupConfig,
system_config: &SystemConfig,
sequence_number: u64,
l1_header: &Header,
l2_block_time: u64,
) -> Result<Self, BlockInfoError>
pub fn try_new( rollup_config: &RollupConfig, system_config: &SystemConfig, sequence_number: u64, l1_header: &Header, l2_block_time: u64, ) -> Result<Self, BlockInfoError>
Creates a new L1BlockInfoTx from the given information.
Sourcepub fn try_new_with_deposit_tx(
rollup_config: &RollupConfig,
system_config: &SystemConfig,
sequence_number: u64,
l1_header: &Header,
l2_block_time: u64,
) -> Result<(Self, Sealed<TxDeposit>), BlockInfoError>
pub fn try_new_with_deposit_tx( rollup_config: &RollupConfig, system_config: &SystemConfig, sequence_number: u64, l1_header: &Header, l2_block_time: u64, ) -> Result<(Self, Sealed<TxDeposit>), BlockInfoError>
Creates a new L1BlockInfoTx from the given information and returns a typed TxDeposit
to include at the top of a block.
Sourcepub fn decode_calldata(r: &[u8]) -> Result<Self, DecodeError>
pub fn decode_calldata(r: &[u8]) -> Result<Self, DecodeError>
Decodes the L1BlockInfoEcotone object from Ethereum transaction calldata.
Sourcepub const fn empty_scalars(&self) -> bool
pub const fn empty_scalars(&self) -> bool
Returns whether the scalars are empty.
Sourcepub const fn block_hash(&self) -> B256
pub const fn block_hash(&self) -> B256
Returns the block hash for the L1BlockInfoTx.
Sourcepub fn encode_calldata(&self) -> Bytes
pub fn encode_calldata(&self) -> Bytes
Encodes the L1BlockInfoTx object into Ethereum transaction calldata.
Sourcepub const fn id(&self) -> BlockNumHash
pub const fn id(&self) -> BlockNumHash
Returns the L1 BlockNumHash for the info transaction.
Sourcepub const fn operator_fee_scalar(&self) -> u32
pub const fn operator_fee_scalar(&self) -> u32
Returns the operator fee scalar.
Sourcepub const fn operator_fee_constant(&self) -> u64
pub const fn operator_fee_constant(&self) -> u64
Returns the operator fee constant.
Sourcepub fn l1_base_fee(&self) -> U256
pub fn l1_base_fee(&self) -> U256
Returns the l1 base fee.
Sourcepub fn l1_fee_scalar(&self) -> U256
pub fn l1_fee_scalar(&self) -> U256
Returns the l1 fee scalar.
Sourcepub fn blob_base_fee(&self) -> U256
pub fn blob_base_fee(&self) -> U256
Returns the blob base fee.
Sourcepub fn blob_base_fee_scalar(&self) -> U256
pub fn blob_base_fee_scalar(&self) -> U256
Returns the blob base fee scalar.
Sourcepub const fn l1_fee_overhead(&self) -> U256
pub const fn l1_fee_overhead(&self) -> U256
Returns the L1 fee overhead for the info transaction. After ecotone, this value is ignored.
Sourcepub const fn batcher_address(&self) -> Address
pub const fn batcher_address(&self) -> Address
Returns the batcher address for the info transaction
Sourcepub const fn sequence_number(&self) -> u64
pub const fn sequence_number(&self) -> u64
Returns the sequence number for the info transaction
Trait Implementations§
Source§impl Clone for L1BlockInfoTx
impl Clone for L1BlockInfoTx
Source§fn clone(&self) -> L1BlockInfoTx
fn clone(&self) -> L1BlockInfoTx
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for L1BlockInfoTx
impl Debug for L1BlockInfoTx
Source§impl PartialEq for L1BlockInfoTx
impl PartialEq for L1BlockInfoTx
impl Copy for L1BlockInfoTx
impl Eq for L1BlockInfoTx
impl StructuralPartialEq for L1BlockInfoTx
Auto Trait Implementations§
impl Freeze for L1BlockInfoTx
impl RefUnwindSafe for L1BlockInfoTx
impl Send for L1BlockInfoTx
impl Sync for L1BlockInfoTx
impl Unpin for L1BlockInfoTx
impl UnwindSafe for L1BlockInfoTx
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 more