pub(crate) fn derive_base_fee_and_gas_per_pubdata(
    fee_input: PubdataIndependentBatchFeeModelInput,
) -> (u64, u64) {
    let PubdataIndependentBatchFeeModelInput {
        fair_l2_gas_price,
        fair_pubdata_price,
        ..
    } = fee_input;

    // The `baseFee` is set in such a way that it is always possible for a transaction to
    // publish enough public data while compensating us for it.
    let base_fee = std::cmp::max(
        fair_l2_gas_price,
        fair_pubdata_price.div_ceil(MAX_GAS_PER_PUBDATA_BYTE),
    );

    let gas_per_pubdata = if fair_pubdata_price == 0 {
        0
    } else {
        fair_pubdata_price.div_ceil(base_fee)
    };
    (base_fee, gas_per_pubdata)
}
Calculates the base fee and gas per pubdata for the given L1 gas price.
core/lib/multivm/src/versions/vm_1_4_1/utils/fee.rs