foundry_evm_core/
precompiles.rs1use alloy_primitives::{Address, address};
2
3pub const EC_RECOVER: Address = Address::with_last_byte(1);
5
6pub const SHA_256: Address = Address::with_last_byte(2);
8
9pub const RIPEMD_160: Address = Address::with_last_byte(3);
11
12pub const IDENTITY: Address = Address::with_last_byte(4);
14
15pub const MOD_EXP: Address = Address::with_last_byte(5);
17
18pub const EC_ADD: Address = Address::with_last_byte(6);
20
21pub const EC_MUL: Address = Address::with_last_byte(7);
23
24pub const EC_PAIRING: Address = Address::with_last_byte(8);
26
27pub const BLAKE_2F: Address = Address::with_last_byte(9);
29
30pub const POINT_EVALUATION: Address = Address::with_last_byte(0x0a);
32
33pub const BLS12_G1ADD: Address = Address::with_last_byte(0x0b);
35
36pub const BLS12_G1MSM: Address = Address::with_last_byte(0x0c);
38
39pub const BLS12_G2ADD: Address = Address::with_last_byte(0x0d);
41
42pub const BLS12_G2MSM: Address = Address::with_last_byte(0x0e);
44
45pub const BLS12_PAIRING_CHECK: Address = Address::with_last_byte(0x0f);
47
48pub const BLS12_MAP_FP_TO_G1: Address = Address::with_last_byte(0x10);
50
51pub const BLS12_MAP_FP2_TO_G2: Address = Address::with_last_byte(0x11);
53
54pub const P256_VERIFY: Address = address!("0x0000000000000000000000000000000000000100");
56
57pub const CELO_TRANSFER: Address = Address::with_last_byte(0xfd);
61
62pub const PRECOMPILES: &[Address] = &[
64 EC_RECOVER,
65 SHA_256,
66 RIPEMD_160,
67 IDENTITY,
68 MOD_EXP,
69 EC_ADD,
70 EC_MUL,
71 EC_PAIRING,
72 BLAKE_2F,
73 POINT_EVALUATION,
74 BLS12_G1ADD,
75 BLS12_G1MSM,
76 BLS12_G2ADD,
77 BLS12_G2MSM,
78 BLS12_PAIRING_CHECK,
79 BLS12_MAP_FP_TO_G1,
80 BLS12_MAP_FP2_TO_G2,
81 P256_VERIFY,
82];