pub enum L1BlockInfoTx {
Bedrock(L1BlockInfoBedrock),
Ecotone(L1BlockInfoEcotone),
}
protocol
only.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
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<L1BlockInfoTx, BlockInfoError>
pub fn try_new( rollup_config: &RollupConfig, system_config: &SystemConfig, sequence_number: u64, l1_header: &Header, l2_block_time: u64, ) -> Result<L1BlockInfoTx, 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<(L1BlockInfoTx, OpTxEnvelope), 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<(L1BlockInfoTx, OpTxEnvelope), 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<L1BlockInfoTx, DecodeError>
pub fn decode_calldata(r: &[u8]) -> Result<L1BlockInfoTx, DecodeError>
Decodes the L1BlockInfoEcotone object from ethereum transaction calldata.
Sourcepub const fn block_hash(&self) -> FixedBytes<32>
pub const fn block_hash(&self) -> FixedBytes<32>
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) -> NumHash
pub const fn id(&self) -> NumHash
Returns the L1 BlockNumHash for the info transaction.
Sourcepub const fn l1_fee_overhead(&self) -> Uint<256, 4>
pub const fn l1_fee_overhead(&self) -> Uint<256, 4>
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<'de> Deserialize<'de> for L1BlockInfoTx
impl<'de> Deserialize<'de> for L1BlockInfoTx
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<L1BlockInfoTx, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<L1BlockInfoTx, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for L1BlockInfoTx
impl Serialize for L1BlockInfoTx
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy 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<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