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<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 more