Loading
Loading
A precompile is a contract built into the chain at a fixed address. Solidity code calls it like any other contract, and the chain runs native code instead of EVM bytecode. On Bittensor, precompiles are how EVM contracts and wallets stake, move TAO, read subnet and neuron data, and reach the rest of Subtensor. Each one below links to its functions, their selectors and the documentation from the source.
Contracts built into the chain that let Solidity code stake, read the metagraph, manage subnets and more. Each has an ABI, listed function by function.
| Precompile | Status | Available since | Functions |
|---|---|---|---|
ed25519Verify0x0000000000000000000000000000000000000402 | Bittensor (ABI)LiveSince runtime 2101 function, 1 documented | Since runtime 210 | 11 documented |
sr25519Verify0x0000000000000000000000000000000000000403 | Bittensor (ABI)LiveSince runtime 2831 function, 1 documented | Since runtime 283 | 11 documented |
balanceTransfer0x0000000000000000000000000000000000000800 | Bittensor (ABI)LiveSince runtime 2103 functions, 0 documented | Since runtime 210 | 30 documented |
staking0x0000000000000000000000000000000000000801 | Bittensor (ABI)LiveSince runtime 2109 functions, 9 documented | Since runtime 210 | 99 documented |
metagraph0x0000000000000000000000000000000000000802 | Bittensor (ABI)LiveSince runtime 21615 functions, 15 documented | Since runtime 216 | 1515 documented |
subnet0x0000000000000000000000000000000000000803 | Bittensor (ABI)LiveSince runtime 23386 functions, 9 documented | Since runtime 233 | 869 documented |
neuron0x0000000000000000000000000000000000000804 | Bittensor (ABI)LiveSince runtime 23348 functions, 9 documented | Since runtime 233 | 489 documented |
stakingV20x0000000000000000000000000000000000000805 | Bittensor (ABI)LiveSince runtime 25282 functions, 40 documented | Since runtime 252 | 8240 documented |
uidLookup0x0000000000000000000000000000000000000806 | Bittensor (ABI)LiveSince runtime 2732 functions, 0 documented | Since runtime 273 | 20 documented |
alpha0x0000000000000000000000000000000000000808 | Bittensor (ABI)LiveSince runtime 28327 functions, 20 documented | Since runtime 283 | 2720 documented |
crowdloan0x0000000000000000000000000000000000000809 | Bittensor (ABI)LiveSince runtime 29712 functions, 11 documented | Since runtime 297 | 1211 documented |
leasing0x000000000000000000000000000000000000080a | Bittensor (ABI)LiveSince runtime 2988 functions, 5 documented | Since runtime 298 | 85 documented |
proxy0x000000000000000000000000000000000000080b | Bittensor (ABI)LiveSince runtime 36518 functions, 0 documented | Since runtime 365 | 180 documented |
addressMapping0x000000000000000000000000000000000000080c | Bittensor (ABI)LiveSince runtime 3711 function, 1 documented | Since runtime 371 | 11 documented |
votingPower0x000000000000000000000000000000000000080d | Bittensor (ABI)LiveSince runtime 4287 functions, 5 documented | Since runtime 428 | 75 documented |
balance0x000000000000000000000000000000000000080e | Bittensor (ABI)LiveSince runtime 4323 functions, 1 documented | Since runtime 432 | 31 documented |
scheduler0x000000000000000000000000000000000000080f | Bittensor (ABI)LiveSince runtime 4445 functions, 0 documented | Since runtime 444 | 50 documented |
drand0x0000000000000000000000000000000000000810 | Bittensor (ABI)LiveSince runtime 4445 functions, 0 documented | Since runtime 444 | 50 documented |
timestamp0x0000000000000000000000000000000000000811 | Bittensor (ABI)LiveSince runtime 4442 functions, 0 documented | Since runtime 444 | 20 documented |
runtimeConfiguration0x0000000000000000000000000000000000000812 | Bittensor (ABI)LiveSince runtime 44418 functions, 0 documented | Since runtime 444 | 180 documented |
registry0x0000000000000000000000000000000000000813 | Bittensor (ABI)LiveSince runtime 4441 function, 1 documented | Since runtime 444 | 11 documented |
The Ethereum cryptography precompiles (hashing, signature recovery, elliptic-curve maths). They behave as on Ethereum and take raw bytes, so there is no ABI to list.
| Precompile | Status | What it does |
|---|---|---|
ECRecover0x0000000000000000000000000000000000000001 Ethereum ecrecover | StandardLive | Ethereum ecrecover |
Sha2560x0000000000000000000000000000000000000002 Ethereum sha256 | StandardLive | Ethereum sha256 |
Ripemd1600x0000000000000000000000000000000000000003 Ethereum ripemd160 | StandardLive | Ethereum ripemd160 |
Identity0x0000000000000000000000000000000000000004 Ethereum identity (datacopy) | StandardLive | Ethereum identity (datacopy) |
Modexp0x0000000000000000000000000000000000000005 Ethereum modexp (EIP-198) | StandardLive | Ethereum modexp (EIP-198) |
Bn128Mul0x0000000000000000000000000000000000000007 alt_bn128 scalar mul (Ethereum's 0x07) | StandardLive | alt_bn128 scalar mul (Ethereum's 0x07) |
Bn128Pairing0x0000000000000000000000000000000000000008 alt_bn128 pairing (Ethereum's 0x08) | StandardLive | alt_bn128 pairing (Ethereum's 0x08) |
Bn128Add0x0000000000000000000000000000000000000009 alt_bn128 add (Ethereum has it at 0x06; Ethereum's 0x09 is blake2f) | StandardLive | alt_bn128 add (Ethereum has it at 0x06; Ethereum's 0x09 is blake2f) |
Sha3FIPS2560x0000000000000000000000000000000000000400 Frontier sha3-256 (FIPS) | StandardLive | Frontier sha3-256 (FIPS) |
ECRecoverPublicKey0x0000000000000000000000000000000000000401 Frontier ecrecover returning the public key | StandardLive | Frontier ecrecover returning the public key |
Precompiles whose input is not ABI-encoded: it is Substrate data, decoded with the runtime metadata. Neither has an ABI.
| Precompile | Status | What it does |
|---|---|---|
Dispatch0x0000000000000000000000000000000000000006 Frontier Dispatch: input is a SCALE-encoded RuntimeCall, dispatched with the caller's mapped origin; decode with the runtime metadata at that block. NOT Ethereum's 0x06 (ecAdd). | RawLive | Frontier Dispatch: input is a SCALE-encoded RuntimeCall, dispatched with the caller's mapped origin; decode with the runtime metadata at that block. NOT Ethereum's 0x06 (ecAdd). |
StorageQuery0x0000000000000000000000000000000000000807 input is a raw Substrate storage key (allowed prefixes only); output is the SCALE value, empty if absent; decode with the runtime metadata | RawLive | input is a raw Substrate storage key (allowed prefixes only); output is the SCALE value, empty if absent; decode with the runtime metadata |
Data: precompile-abis/v471-summaries, subtensor c004cebf3 (github.com, opens in a new tab, external site) (runtime 471). Runtime ranges are the spec versions on subtensor’s main branch when an entry first and last appeared, not the block it went live on chain.