Skip to main content

Module precompiles

Module precompiles 

Source

Re-exportsยง

use evm2::interpreter::gas::CALL_STIPEND; ๐Ÿ”’
use super::*; ๐Ÿ”’

Constantsยง

SECP256K1_ORDER ๐Ÿ”’
Order of the secp256k1 curve, the exclusive bound of a valid signature scalar.

Functionsยง

active_precompiles ๐Ÿ”’
Returns the canonical precompiles active under spec_id.
ecrecover_signature_well_formed ๐Ÿ”’
Returns whether a 128-byte ECRECOVER input is a well-formed signature: v is 27 or 28 and r and s are in [1, n). The precompile returns no data otherwise.
execute_precompile ๐Ÿ”’
Executes a canonical precompile on concrete input with at most gas gas.
execute_symbolic_precompile ๐Ÿ”’
is_precompile_for_spec ๐Ÿ”’
Returns whether address is a canonical precompile active under spec_id.
modexp_gas ๐Ÿ”’
Returns the gas the modexp precompile for spec_id charges for these lengths and leading exponent word, as EIP-198, EIP-2565 (Berlin) and EIP-7883 (Osaka) define it.
precompile_call_gas ๐Ÿ”’
Returns the most gas a gasleft() call gives a precompile in a transaction with gas_limit gas: 63/64 of the gas left (EIP-150), plus the value transfer stipend when it sends value.
precompile_gas_fits ๐Ÿ”’
Returns whether a precompile whose cost lies between min_cost and max_cost fits in gas, or None when that depends on symbolic input.
precompile_number ๐Ÿ”’
precompile_number_for_spec ๐Ÿ”’
symbolic_fixed_len_precompile_output ๐Ÿ”’
symbolic_input_word_range ๐Ÿ”’
Returns the smallest and largest big-endian values of the len input bytes at offset, taking each symbolic byte as 0x00 and 0xff and each byte past input_len as zero.
symbolic_modexp_precompile ๐Ÿ”’