reth_optimism_evm::l1

Function extract_l1_info_from_tx

Source
pub fn extract_l1_info_from_tx<T: Transaction>(
    tx: &T,
) -> Result<L1BlockInfo, OpBlockExecutionError>
Available on crate feature optimism only.
Expand description

Extracts the [L1BlockInfo] from the the L1 info transaction (first transaction) in the L2 block.

Returns an error if the calldata is shorter than 4 bytes.