pub async fn get_fee_history(
        &mut self,
        newest_block: L2BlockNumber,
        block_count: u64,
    ) -> DalResult<(Vec<U256>, Vec<U256>)> {
        let result: Vec<_> = sqlx::query!(
            r#"
            SELECT
                base_fee_per_gas,
                l2_fair_gas_price,
                fair_pubdata_price,
                protocol_version,
                l1_gas_price
            FROM
                miniblocks
            WHERE
                number <= $1
            ORDER BY
                number DESC
            LIMIT
                $2
            "#,
            i64::from(newest_block.0),
            block_count as i64
        )
        .instrument("get_fee_history")
        .with_arg("newest_block", &newest_block)
        .with_arg("block_count", &block_count)
        .fetch_all(self.storage)
        .await?
        .into_iter()
        .map(|row| {
            let fee_input = BatchFeeInput::for_protocol_version(
                row.protocol_version
                    .map(|x| (x as u16).try_into().unwrap())
                    .unwrap_or_else(ProtocolVersionId::last_potentially_undefined),
                row.l2_fair_gas_price as u64,
                row.fair_pubdata_price.map(|x| x as u64),
                row.l1_gas_price as u64,
            );

            (
                bigdecimal_to_u256(row.base_fee_per_gas),
                U256::from(fee_input.fair_pubdata_price()),
            )
        })
        .collect();

        let (base_fee_per_gas, effective_pubdata_price): (Vec<U256>, Vec<U256>) =
            result.into_iter().unzip();

        Ok((base_fee_per_gas, effective_pubdata_price))
    }
Returns `base_fee_per_gas` and `fair_pubdata_price` for L2 block range [min(newest_block - block_count + 1, 0), newest_block]
in descending order of L2 block numbers.
core/lib/dal/src/blocks_web3_dal.rs