AssociatedEvmAddress
Storage Map v261 → v490 · 1 shape changeEVM address associated with a neuron position.
Explore chainThe Big Picture
Bridges the gap between Substrate accounts and EVM addresses. Neurons can prove ownership of an EVM address, enabling cross-chain features and EVM-based access to Bittensor functionality.
Use Cases
- Find EVM address for a neuron
- Build cross-chain identity tools
- Link EVM and Substrate accounts
From Chain Metadata
DMAP (netuid, uid) --> (H160, last_block_where_ownership_was_proven)
Purpose & Usage
Purpose
Link Substrate neuron UIDs to EVM addresses for cross-chain identity.
Common Query Patterns
- Query by (netuid, uid)
Migration Notes
key type changed from (u16, u16) to (NetUid, u16)
Update decoders: SCALE encoding is positional, so any signature change (added, removed, or type-changed fields, or storage shape changes) shifts byte offsets and existing decoders will misparse this item. Re-derive types from the new metadata.
Query Keys
Stored Value
- .0 evm_address — H160 EVM-compatible address (20 bytes) associated with this neuron. Used by EVM-side tooling to map a Substrate neuron to an Ethereum-style address.Source src/lib.rs:3135-3138
- .1 ownership_proof_block — Last block number at which the EVM-side controller proved ownership of the associated H160 address. Used to age and re-validate the binding.Source src/lib.rs:3135-3138
Default Value
Optional storage: querying a key that has never been written returns no value (None) — do not assume a zero default.
Relationships
Modified By
Related Events
Code Examples
import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443
const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);
// Query AssociatedEvmAddress storage
const netuid = 1;
const uid = 0;
const result = await api.query.SubtensorModule.AssociatedEvmAddress.getValue(netuid, uid);
console.log("AssociatedEvmAddress:", result);On-Chain Activity
100K to 1M writes
#169 most written storage item
Modified via user-submitted extrinsics
As of block 9,385,000
Version History
- key :
(u16, u16)→(NetUid, u16)
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v261
- Current Version
- v490