SwapV3Initialized
Storage Map v290 → currentWhether V3 swap is initialized for a subnet .
Explore chainQueried by: developerssubnet owners
The Big Picture
Once true, subnet uses V3. Cannot revert to V2.
Use Cases
- Check if LP is possible
- Determine swap version
From Chain Metadata
Storage to determine whether swap V3 was initialized for a specific subnet.
Purpose & Usage
Purpose
Tracks if subnet uses concentrated liquidity.
Common Query Patterns
- Query by netuid
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | netuid netuid raw: key1 | u16 | key1 (u16) |
Stored Value
value (bool)
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 SwapV3Initialized storage
const key1 = 0;
const result = await api.query.Swap.SwapV3Initialized.getValue(key1);
console.log("SwapV3Initialized:", result);Runtime Info
View Source- Pallet
- Swap
- Storage Kind
- Map
- First Version
- v290
- Current Version
- v411