Function osaka_gas_calc

Source
pub fn osaka_gas_calc(
    base_len: u64,
    exp_len: u64,
    mod_len: u64,
    exp_highp: &U256,
) -> u64
Expand description

Calculate gas cost according to EIP-7883: https://eips.ethereum.org/EIPS/eip-7883

There are three changes:

  1. Increase minimal price from 200 to 500
  2. Increase cost when exponent is larger than 32 bytes
  3. Increase cost when base or modulus is larger than 32 bytes