TotalHotkeyAlphaLastEpoch

Storage Map v261 → current

Hotkey alpha ownership from last epoch .

Explore chain
Queried by: validatorsanalyticsdevelopers

The Big Picture

Snapshot of alpha ownership from the previous epoch. Used in calculations that need to compare current vs previous state.

Use Cases

  • Compare epoch-over-epoch alpha
  • Research alpha dynamics
  • Build historical analytics

Purpose & Usage

Purpose

Track historical alpha for calculations.

Common Query Patterns

  • Query by (hotkey, netuid)

Query Keys

#NameTypeDescription
1
key1
AccountId key1 (AccountId) (hex -> SS58)
2
key2
u16 key2 (u16)

Stored Value

Value in RAO (÷10⁹ for TAO)

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

// Query TotalHotkeyAlphaLastEpoch storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const key2 = 0;

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

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

Runtime Info

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