Skip to main content

Precompile Addresses

Every precompile the runtime registers, as listed in template/runtime/src/precompiles.rs. An address is its index as a 20-byte big-endian number, so index 2050 is 0x0000000000000000000000000000000000000802. Every other address is unregistered.


Registered precompiles​

AddressIndexNameWhat it doesInputReference
0x…00011ECRecoverRecovers the signer address of a secp256k1 signatureRaw bytes, as on EthereumEthereum precompiles
0x…00022Sha256SHA-256Raw bytesEthereum precompiles
0x…00033Ripemd160RIPEMD-160Raw bytesEthereum precompiles
0x…00044IdentityReturns its inputRaw bytesEthereum precompiles
0x…00055ModexpModular exponentiation; operands up to 1,024 bytes, EIP-7883 pricingRaw bytes, as on EthereumModexp rules
0x…04001024Sha3FIPS256FIPS 202 SHA3-256, not Keccak-256Raw bytes; returns 32 bytes—
0x…04011025ECRecoverPublicKeyRecovers the 64-byte uncompressed secp256k1 public key128 bytes: hash, v, r, s, as for ECRecover—
0x…04021026Curve25519AddAdds up to 10 Ristretto255 pointsRaw bytes: 32-byte compressed points, at most 320 bytes—
0x…04031027Curve25519ScalarMulMultiplies a Ristretto255 point by a scalarRaw bytes: 32-byte little-endian scalar, then a 32-byte compressed point—
0x00000000000000000000000000000000000008012049ShieldedPoolshield: deposits ORB into the shielded poolSolidity ABIShieldedPool Precompile
0x00000000000000000000000000000000000008022050Balancestransfer, transferKeepAlive: pays ORB to any AccountId32Solidity ABIBalances Precompile

0x…0400 hashes with SHA3-256 as standardised in FIPS 202, which pads differently from the Keccak-256 behind Solidity's keccak256. The two give different digests for the same input; use keccak256 for Ethereum hashing.

The Curve25519 precompiles have no function selector and no ABI: the input is the raw bytes above, and both return a 32-byte compressed Ristretto255 point. A malformed point or a wrong input length fails the call.


Unregistered addresses​

BN254 (0x06–0x08), BLAKE2F (0x09), KZG (0x0a), BLS12-381 (0x0b–0x11) and P256VERIFY (0x100) are not registered. A call to them, as to any unregistered address, succeeds and returns no data. See Unregistered precompile addresses.


Rules for the Orbinum precompiles​

RuleShieldedPool 0x…0801Balances 0x…0802
STATICCALLRefusedRefused
DELEGATECALL, CALLCODERefusedRefused
msg.valueRequired: the shielded amountRefused
Account that paysThe value sent with the callmsg.sender, mapped to its AccountId32
FailureReverts with Error(string)Reverts with Error(string)
EVM logsNone; Substrate events insteadNone; Substrate events instead

Because delegated calls are refused, a contract can move only its own balance through Balances, never its caller's. Neither precompile repeats signature verification: the EVM transaction already authenticates the caller.

Every precompile past the Ethereum range (0x0400–0x0403, 0x0801, 0x0802) holds a five-byte stub, 0x60006000fd (PUSH1 0 PUSH1 0 REVERT). It never runs: the precompile executes instead. It only gives the address code, so eth_getCode is non-empty and Solidity's high-level calls reach the precompile. 0x01–0x05 hold no code, as on Ethereum. See Calling a Precompile.