foundry_evm_traces::decoder::precompiles

Module Precompiles

Source
Expand description

EVM precompiles interface. For illustration purposes only, as precompiles don’t follow the Solidity ABI codec.

Parameter names and types are taken from evm.codes.

interface Precompiles {
    struct EcPairingInput { uint256 x1; uint256 y1; uint256 x2; uint256 y2; uint256 x3; uint256 y3; }
    function ecrecover(bytes32 hash, uint8 v, uint256 r, uint256 s) returns (address publicAddress);
    function sha256(bytes data) returns (bytes32 hash);
    function ripemd(bytes data) returns (bytes20 hash);
    function identity(bytes data) returns (bytes data);
    function modexp(uint256 Bsize, uint256 Esize, uint256 Msize, bytes B, bytes E, bytes M) returns (bytes value);
    function ecadd(uint256 x1, uint256 y1, uint256 x2, uint256 y2) returns (uint256 x, uint256 y);
    function ecmul(uint256 x1, uint256 y1, uint256 s) returns (uint256 x, uint256 y);
    function ecpairing(EcPairingInput[] input) returns (bool success);
    function blake2f(uint32 rounds, uint64[8] h, uint64[16] m, uint64[2] t, bool f) returns (uint64[8] h);
    function pointEvaluation(bytes32 versionedHash, bytes32 z, bytes32 y, bytes1[48] commitment, bytes1[48] proof) returns (bytes value);
}

Structs§

Enums§