Skip to content

Appendix B · Precompile addresses

TRN exposes its native pallets to the EVM through precompiles at deterministic addresses. The address-derivation rules below let you compute the EVM address for any asset, collection, or futurepass without an indexer.

Singleton precompiles

PrecompileEVM addressPalletReference
DEX router0x000000000000000000000000000000000000DDDDDexDEX precompile
FuturePass registrar0x000000000000000000000000000000000000FFFFFuturePassFuturePass precompile
FeeProxy0x00000000000000000000000000000000000004BBFeeProxyFeeProxy precompile

Address-derivation rules

ResourceEVM address rule
ERC-20 mirror of asset id N0xCCCCCCCC + 24-bit big-endian asset-id padded to 12 bytes — i.e. 0xCCCCCCCC000000000000000000000000<assetIdHex>.
ERC-721 collection with collection id N0xAAAAAAAA + 24-bit big-endian collection id padded to 12 bytes — i.e. 0xAAAAAAAA00000000000000000000000<collectionIdHex>.
ERC-1155 (SFT) collection with collection id N0xBBBBBBBB + 24-bit big-endian collection id padded to 12 bytes — i.e. 0xBBBBBBBB00000000000000000000000<collectionIdHex>.
FuturePass for ownerReturned by FuturePassRegistrar.futurepassOf(owner).

The 0xCCCC / 0xAAAA / 0xBBBB prefixes are stable across releases. Always use the precompile registrar (or assetIdToAddress helpers in the SDKs) rather than hard-coding the derived address.

Where to confirm at runtime

ts
// Substrate side
const address = api.consts.assetsExt.palletId.toHex(); // anchor address for asset prefixes

// EVM side (viem)
import { encodeAbiParameters, getAddress } from 'viem';
const erc20For = (assetId: number) =>
  getAddress('0xCCCCCCCC' + assetId.toString(16).padStart(24, '0'));
Sourced from the EVM precompile pages and the @therootnetwork/evm README. Verify against the live ABI on rootscan.io before relying on these in production.

Curated independently by Codeology. Source-attributed reference for The Root Network. Not affiliated with Futureverse / TRN Labs.