EnabledUserLiquidity

Storage Map v290 → current

Whether user liquidity is enabled per subnet .

Explore chain
Queried by: developersstakerssubnet owners

The Big Picture

When true, users can provide concentrated liquidity.

Use Cases

  • Check if LP is open
  • Verify before adding liquidity

From Chain Metadata

Indicates whether a subnet has been switched to V3 swap from V2. If `true`, the subnet is permanently on V3 swap mode allowing add/remove liquidity operations. Once set to `true` for a subnet, it cannot be changed back to `false`.

Purpose & Usage

Purpose

Controls add_liquidity availability.

Common Query Patterns

  • Query by netuid

Query Keys

#NameTypeDescription
1
netuid netuid
raw: key1
u16 key1 (u16)

Stored Value

value (bool)

Relationships

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

// Query EnabledUserLiquidity storage
const key1 = 0;

const result = await api.query.Swap.EnabledUserLiquidity.getValue(key1);
console.log("EnabledUserLiquidity:", result);

Runtime Info

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