op_reth::node

Function extract_l1_info_from_tx

pub fn extract_l1_info_from_tx<T>(
    tx: &T,
) -> Result<L1BlockInfo, OpBlockExecutionError>
where T: Transaction,
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.