foundry_evm_core/
precompiles.rs

1use alloy_primitives::{address, Address};
2
3/// The ECRecover precompile address.
4pub const EC_RECOVER: Address = address!("0x0000000000000000000000000000000000000001");
5
6/// The SHA-256 precompile address.
7pub const SHA_256: Address = address!("0x0000000000000000000000000000000000000002");
8
9/// The RIPEMD-160 precompile address.
10pub const RIPEMD_160: Address = address!("0x0000000000000000000000000000000000000003");
11
12/// The Identity precompile address.
13pub const IDENTITY: Address = address!("0x0000000000000000000000000000000000000004");
14
15/// The ModExp precompile address.
16pub const MOD_EXP: Address = address!("0x0000000000000000000000000000000000000005");
17
18/// The ECAdd precompile address.
19pub const EC_ADD: Address = address!("0x0000000000000000000000000000000000000006");
20
21/// The ECMul precompile address.
22pub const EC_MUL: Address = address!("0x0000000000000000000000000000000000000007");
23
24/// The ECPairing precompile address.
25pub const EC_PAIRING: Address = address!("0x0000000000000000000000000000000000000008");
26
27/// The Blake2F precompile address.
28pub const BLAKE_2F: Address = address!("0x0000000000000000000000000000000000000009");
29
30/// The PointEvaluation precompile address.
31pub const POINT_EVALUATION: Address = address!("0x000000000000000000000000000000000000000a");
32
33/// Precompile addresses.
34pub const PRECOMPILES: &[Address] = &[
35    EC_RECOVER,
36    SHA_256,
37    RIPEMD_160,
38    IDENTITY,
39    MOD_EXP,
40    EC_ADD,
41    EC_MUL,
42    EC_PAIRING,
43    BLAKE_2F,
44    POINT_EVALUATION,
45];