TickIndexBitmapWords

Storage Map v290 → current

Bitmap tracking initialized ticks.

Explore chain
Queried by: developers

The Big Picture

Multi-layer bitmap enables O(log n) tick traversal.

Use Cases

  • Optimize swap path finding

From Chain Metadata

Tick index bitmap words storage

Purpose & Usage

Purpose

Efficient lookup of next tick during swaps.

Common Query Patterns

  • Query by (netuid, layer, word)
Part of: Concentrated Liquidity

Query Keys

#NameTypeDescription
1
key1
u16 key1 (u16)
2
key2
LayerLevel key2 (LayerLevel)
3
key3
u32 key3 (u32)

Stored Value

Value in RAO (÷10⁹ for TAO)

RAO -> TAO (/ 10^9)

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 TickIndexBitmapWords storage
const key1 = 0;
const key2 = 0 as any /* LayerLevel */;
const key3 = 0;

const result = await api.query
  [stringCamelCase("Swap")]
  [stringCamelCase("TickIndexBitmapWords")](
  key1,
  key2,
  key3
);

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

On-Chain Activity

Write Frequency
●●●○○○ Low 10K–100K est. writes

10K–100K estimated writes

#51 most written storage item

Write Source User Extrinsics

Modified via user-submitted extrinsics

As of block 7,429,232

Runtime Info

View Source
Pallet
Swap
Storage Kind
Map
First Version
v290
Current Version
v393