pub async fn modified_keys_in_l2_blocks(
        &mut self,
        l2_block_numbers: ops::RangeInclusive<L2BlockNumber>,
    ) -> DalResult<Vec<H256>> {
        let rows = sqlx::query!(
            r#"
            SELECT
                DISTINCT
                hashed_key
            FROM
                storage_logs
            WHERE
                miniblock_number BETWEEN $1 AND $2
            "#,
            i64::from(l2_block_numbers.start().0),
            i64::from(l2_block_numbers.end().0)
        )
        .instrument("modified_keys_in_l2_blocks")
        .with_arg("l2_block_numbers", &l2_block_numbers)
        .fetch_all(self.storage)
        .await?;

        Ok(rows
            .into_iter()
            .map(|row| H256::from_slice(&row.hashed_key))
            .collect())
    }
Returns distinct hashed storage keys that were modified in the specified L2 block range.
core/lib/dal/src/storage_logs_dal.rs