pub enum L1BlockInfoTx {
Bedrock(L1BlockInfoBedrock),
Ecotone(L1BlockInfoEcotone),
}
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<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, 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<(Self, 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<Self, DecodeError>
pub fn decode_calldata(r: &[u8]) -> Result<Self, DecodeError>
Decodes the L1BlockInfoEcotone object from ethereum transaction calldata.
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 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<'de> Deserialize<'de> for L1BlockInfoTx
impl<'de> Deserialize<'de> for L1BlockInfoTx
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 Serialize for L1BlockInfoTx
impl Serialize for L1BlockInfoTx
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)