Documents the Lux precompile address scheme and provides an on-chain registry for precompile discovery. Contracts can query the registry to determine which precompiles are available, their addresses, and supported operations. The address scheme encodes the LP number, chain slot, and function index into the trailing bytes of the 20-byte EVM address.
All Lux-native precompiles use trailing-significant 20-byte addresses:
Format: 0x0000000000000000000000000000000000PCII
P = Family page (4 bits, aligned with LP numbering)
C = Chain slot (4 bits)
II = Item/function (8 bits, 256 items per family per chain)
Family pages (P nibble):
Chain slots (C nibble):
Standard EVM addresses (0x01-0x11) are preserved and not part of this scheme.
1. The registry is read-only. Precompile addresses are fixed at genesis.
2. Calling a non-existent precompile address behaves as a normal contract call (no code, returns empty).
3. The address scheme is deterministic -- given an LP number and chain slot, the address can be computed without querying the registry.
github.com/luxfi/precompile/registry/Copyright (C) 2024-2026, Lux Partners Limited. All rights reserved.
Licensed under the MIT License.