TokenSymbol

Storage Map v233 → current

Token symbol for subnet alpha tokens.

Explore chain
Queried by: walletsdevelopersanalytics

The Big Picture

Each subnet has alpha tokens with a symbol. This storage provides the human-readable symbol for display purposes.

Use Cases

  • Display token symbol in UIs
  • Build token-aware interfaces
  • Create trading tools

Purpose & Usage

Purpose

Store human-readable symbol for each subnets token.

Common Query Patterns

  • Query by netuid

Query Keys

#NameTypeDescription
1
key1
u16 key1 (u16)

Stored Value

value (Vec<u8>)

Relationships

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

// Query TokenSymbol storage
const key1 = 0;

const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("TokenSymbol")](
  key1
);

console.log("TokenSymbol:", result.toHuman());

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v233
Current Version
v393