Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align precompiles addresses #1626

Merged
merged 1 commit into from
Nov 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions runtime/common/src/pallet_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ pub mod precompiles {
pub const ADDR_BN128_MUL: [u8; 20] = address_of(0x07);
pub const ADDR_BN128_PAIRING: [u8; 20] = address_of(0x08);
pub const ADDR_BLAKE2F: [u8; 20] = address_of(0x09);
pub const ADDR_BLS12381_G1_ADD: [u8; 20] = address_of(0x0c);
pub const ADDR_BLS12381_G1_MUL: [u8; 20] = address_of(0x0d);
pub const ADDR_BLS12381_G1_MULTI_EXP: [u8; 20] = address_of(0x0e);
pub const ADDR_BLS12381_G2_ADD: [u8; 20] = address_of(0x0f);
pub const ADDR_BLS12381_G2_MUL: [u8; 20] = address_of(0x10);
pub const ADDR_BLS12381_G2_MULTI_EXP: [u8; 20] = address_of(0x11);
pub const ADDR_BLS12381_PAIRING: [u8; 20] = address_of(0x12);
pub const ADDR_BLS12381_MAP_G1: [u8; 20] = address_of(0x13);
pub const ADDR_BLS12381_MAP_G2: [u8; 20] = address_of(0x14);
// https://github.com/ethereum/go-ethereum/blob/e56bbd77a44fc26550a862801690461e49e02503/core/vm/contracts.go#L131-L139.
pub const ADDR_BLS12381_G1_ADD: [u8; 20] = address_of(0x0b);
pub const ADDR_BLS12381_G1_MUL: [u8; 20] = address_of(0x0c);
pub const ADDR_BLS12381_G1_MULTI_EXP: [u8; 20] = address_of(0x0d);
pub const ADDR_BLS12381_G2_ADD: [u8; 20] = address_of(0x0e);
pub const ADDR_BLS12381_G2_MUL: [u8; 20] = address_of(0x0f);
pub const ADDR_BLS12381_G2_MULTI_EXP: [u8; 20] = address_of(0x10);
pub const ADDR_BLS12381_PAIRING: [u8; 20] = address_of(0x11);
pub const ADDR_BLS12381_MAP_G1: [u8; 20] = address_of(0x12);
pub const ADDR_BLS12381_MAP_G2: [u8; 20] = address_of(0x13);
// [0x400, 0x800) for stable precompiles.
pub const ADDR_STATE_STORAGE: [u8; 20] = address_of(0x400);
pub const ADDR_DISPATCH: [u8; 20] = address_of(0x401);
Expand Down