pub async fn load_first_l2_block_in_batch(
        &self,
        storage: &mut Connection<'_, Core>,
        l1_batch_number: L1BatchNumber,
    ) -> anyhow::Result<Option<FirstL2BlockInBatch>> {
        let l2_block_number = self
            .load_number_of_first_l2_block_in_batch(storage, l1_batch_number)
            .await
            .context("failed getting first L2 block number")?;
        Ok(match l2_block_number {
            Some(number) => storage
                .blocks_dal()
                .get_l2_block_header(number)
                .await?
                .map(|header| FirstL2BlockInBatch {
                    header,
                    l1_batch_number,
                }),
            None => None,
        })
    }
Returns a header of the first L2 block in the specified L1 batch regardless of whether the batch is sealed or not.
core/lib/vm_executor/src/storage.rs