AssociatedEvmAddress

Storage Map v261 → v490 · 1 shape change

EVM address associated with a neuron position.

Explore chain
Queried by: developerswallets

The 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

v424 v432 Breaking

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

#NameTypeDescription
1
netuid
NetUid Subnet ID
2
uid
u16 Neuron UID on the subnet

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.
  • .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.

Default Value

None (absent keys return no 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

Write Frequency
●●●●○○ Medium 100K–1M est. writes

100K to 1M writes

#169 most written storage item

Write Source User Extrinsics

Modified via user-submitted extrinsics

As of block 9,385,000

Version History

v261 block 5,328,895 Added
v425–v431 · runtime versions skipped on chain (never deployed)
v432 block 8,636,190 Shape changed Current
  • key : (u16, u16) → (NetUid, u16)

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v261
Current Version
v490