Skip to main content
SUBMIT A PRSUBMIT AN ISSUElast edit: Jun 10, 2026

Bittensor EVM: Examples and Precompiles

Available Precompiles

The following precompiled smart contracts are available on the Bittensor EVM. The source code can be found on GitHub.

Code examples used throughout this section are provided by the Opentensor Foundation (OTF), and come from this repository.

Examples

The following tutorials cover common EVM workflows on Bittensor, including account management, token bridging, and interaction with precompiles:

Standard Ethereum Precompiles

The following table consists of standard Ethereum precompiles with their addresses and description:

PrecompileAddressDescription
ECRecover0x1Recover the address associated with the public key from elliptic curve signature (ECDSA)
Sha2560x2SHA-256 hash function
Ripemd1600x3RIPEMD-160 hash function
Identity0x4Identity function (returns input data)
Modexp0x5Modular exponentiation
Dispatch0x6Dispatch a runtime call from EVM
Bn128Mul0x7BN128 scalar multiplication
Bn128Pairing0x8BN128 pairing check
Bn128Add0x9BN128 point addition
Sha3FIPS2560x400SHA3-256 hash function (FIPS variant)
ECRecoverPublicKey0x401Recover public key from an elliptic curve signature (ECDSA)

Bittensor-Specific Precompiles

The following table lists of Bittensor-specific precompiles with their addresses, descriptions and links to their respective documentation:

PrecompileAddressDescription
Ed25519Verify0x402Verify Ed25519 signatures. See Ed25519 Verify
SR25519Verify0x403Verify Substrate SR25519 signatures. See SR25519 Verify ./sr25519-verify-precompile.md
BalanceTransferPrecompile0x800Transfer TAO between H160 addresses. see Transfer TAO
StakingPrecompile0x801Staking via msg.valuedeprecated, use V2. See Staking Precompile
MetagraphPrecompile0x802Interact with the metagraph (rank, trust, stake, axon). See Metagraph Precompile
SubnetPrecompile0x803Register subnets, get/set hyperparameters . See Subnet Precompile
NeuronPrecompile0x804Register neurons, set weights, serve axon. See Neuron Precompile
StakingPrecompileV20x805Full staking with limits, allowances, moves . See
UidLookupPrecompile0x806Map EVM address → registered neuron UID. See
StorageQueryPrecompile0x807Manages EVM contracts read access to Substrate chain storage.
AlphaPrecompile0x808AMM pool state, prices, swap simulation. See
CrowdloanPrecompile0x809Create and manage crowdloan campaigns. See
LeasingPrecompile0x80ACreate subnet lease crowdloans, terminate leases. See
ProxyPrecompile0x80BAdd/remove/execute Substrate proxy relationships. See
AddressMappingPrecompile0x80CConvert H160 → Substrate AccountId32. See
VotingPowerPrecompile0x80DQuery per-validator EMA voting power. See