pub async fn get_storage_values(
        &mut self,
        hashed_keys: &[H256],
        l2_block_number: L2BlockNumber,
    ) -> DalResult<HashMap<H256, Option<H256>>> {
        let hashed_keys: Vec<_> = hashed_keys.iter().map(H256::as_bytes).collect();

        let rows = sqlx::query!(
            r#"
            SELECT
                u.hashed_key AS "hashed_key!",
                (
                    SELECT
                        value
                    FROM
                        storage_logs
                    WHERE
                        hashed_key = u.hashed_key
                        AND miniblock_number <= $2
                    ORDER BY
                        miniblock_number DESC,
                        operation_number DESC
                    LIMIT
                        1
                ) AS "value?"
            FROM
                UNNEST($1::bytea []) AS u (hashed_key)
            "#,
            &hashed_keys as &[&[u8]],
            i64::from(l2_block_number.0)
        )
        .instrument("get_storage_values")
        .with_arg("l2_block_number", &l2_block_number)
        .with_arg("hashed_keys.len", &hashed_keys.len())
        .fetch_all(self.storage)
        .await?;

        Ok(rows
            .into_iter()
            .map(|row| {
                let key = H256::from_slice(&row.hashed_key);
                let value = row.value.map(|value| H256::from_slice(&value));
                (key, value)
            })
            .collect())
    }
Returns current values for the specified keys at the specified `l2_block_number`.
core/lib/dal/src/storage_logs_dal.rs