EvmKeyAssociated

Event Re-added v261 → v265, v273 → v277, v290 → v315, v320 → v326, v334 → v367, v372 → v377, v385 → current #96

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 Subnet/network identifier (0-65535)
1
hotkey
AccountId Hot wallet address (active operations) (hex -> SS58)
2
evm_key
H160 evm_key (H160)
3
block_associated
u64 block_associated (u64) (RAO -> TAO (/ 10^9))

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Subscribe to EvmKeyAssociated events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("SubtensorModule") &&
      event.method === "EvmKeyAssociated"
    )
    .forEach(({ event }) => {
      console.log("EvmKeyAssociated:", event.data.toHuman());
    });
});

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 Current

Runtime Info

View Source
Pallet Index
7
Event Index
96
First Version
v261
Current Version
v393