EvmKeyAssociated

Event v261 → v265, v273 → v277, v290 → v315, v320 → v326, v334 → v367, v372 → v377, v385 → v402, v411 → current Changed in v411 #97

Emitted when an EVM key is associated with a Substrate account.

View events on chain
Useful for: developerswalletsexchangesanalytics

The Big Picture

Bittensor uses Substrate addresses (SS58), but many users and tools use Ethereum-style addresses (EVM/0x format). Associating an EVM key with your Substrate account enables interoperability - bridges, DeFi integrations, and tools that speak Ethereum can now interact with your Bittensor identity.

Why This Matters

If you want to use Ethereum-based tools, DeFi protocols, or bridges with your Bittensor account, you need this link. The association proves 'this 0x address and this SS58 address are the same person.' Essential for cross-chain operations.

Example Scenario

You want to use TAO on an EVM DeFi protocol. You associate your Metamask address (0xabc...) with your Bittensor coldkey (5Grw...). EvmKeyAssociated fires confirming the link. Now bridges and protocols can recognize both addresses as belonging to you.

Common Questions

Do I need this for basic Bittensor operations?
No, pure Bittensor operations use Substrate addresses. EVM association is only needed for cross-chain interoperability with Ethereum-compatible systems.
Can I associate multiple EVM keys?
Check the runtime implementation. Some support multiple associations, others are 1:1. Either way, be careful about which keys you link.
What's the security implication?
You're linking two identities. Anyone who controls one and knows about the link knows about the other. Only associate keys you're comfortable publicly linking.

Use Cases

  • Link Ethereum-style addresses to Bittensor accounts
  • Enable cross-chain interoperability
  • Track EVM integration activity
  • Build cross-chain wallet and bridge tools

How to Use This Event

  • Track EVM associations for cross-chain analytics
  • Monitor bridge and interop activity
  • Build unified cross-chain identity tools

From Chain Metadata

An EVM key has been associated with a hotkey.

Triggers

Preconditions

  • Valid EVM key provided
  • Association is authorized

Effects

Postconditions

  • EVM key linked to Substrate account

Side Effects

  • Enables cross-chain operations

Event Data

#NameTypeDescription
0
netuid
u16 NetUidnetuid: Subnet ID (u16, 0-65535)
1
hotkey
AccountId hotkey: Account address (32 bytes, SS58-encoded) (hex -> SS58)
2
evm_key
H160 evm_key: 20-byte address (Ethereum-style)
3
block_associated
u64 block_associated (u64) (RAO -> TAO (/ 10^9))

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);

// Subscribe to EvmKeyAssociated events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.SubtensorModule.EvmKeyAssociated.get(block.hash);
  for (const evt of events) {
    console.log("EvmKeyAssociated:", evt.payload);
  }
});

Version History

v261 block 5,328,895 4 args
v273 block 5,659,032 4 args
v290 block 5,947,548 4 args
v320 block 6,523,566 4 args
v334 block 6,811,690 4 args
v372 block 7,430,358 4 args
v385 block 7,782,670 4 args
v411 block 8,283,784 4 args Current

Runtime Info

View Source
Pallet Index
7
Event Index
97
First Version
v261
Current Version
v411