Module l1

Source
Expand description

Optimism-specific implementation and utilities for the executor

Traits§

RethL1BlockInfo
An extension trait for [L1BlockInfo] that allows us to calculate the L1 cost of a transaction based off of the chain spec’s activated hardfork.

Functions§

extract_l1_info
Extracts the [L1BlockInfo] from the L2 block. The L1 info transaction is always the first transaction in the L2 block.
extract_l1_info_from_tx
Extracts the [L1BlockInfo] from the L1 info transaction (first transaction) in the L2 block.
parse_l1_info
Parses the input of the first transaction in the L2 block, into [L1BlockInfo].
parse_l1_info_tx_bedrock
Parses the calldata of the [L1BlockInfo] transaction pre-Ecotone hardfork.
parse_l1_info_tx_ecotone
Updates the L1 block values for an Ecotone upgraded chain. Params are packed and passed in as raw msg.data instead of ABI to reduce calldata size. Params are expected to be in the following order:
parse_l1_info_tx_isthmus
Updates the L1 block values for an Isthmus upgraded chain. Params are packed and passed in as raw msg.data instead of ABI to reduce calldata size. Params are expected to be in the following order: