Module modexp

Source
Expand description

Modexp precompile added in EIP-198 and reprices in berlin hardfork with EIP-2565.

Constants§

BERLIN
modexp precompile with BERLIN gas rules.
BYZANTIUM
modexp precompile with BYZANTIUM gas rules.

Functions§

berlin_gas_calc
Calculate gas cost according to EIP 2565: https://eips.ethereum.org/EIPS/eip-2565
berlin_run
See: https://eips.ethereum.org/EIPS/eip-2565 Gas cost of berlin is modified from byzantium.
byzantium_gas_calc
Calculate the gas cost for the modexp precompile with BYZANTIUM gas rules.
byzantium_run
See: https://eips.ethereum.org/EIPS/eip-198 See: https://etherscan.io/address/0000000000000000000000000000000000000005
calculate_iteration_count
Calculate the iteration count for the modexp precompile.
run_inner
Run the modexp precompile.