Current Value
100Relevant for: stakersdevelopers
The Big Picture
Users must stay under this limit. Close old positions to make room for new ones.
From Chain Metadata
The maximum number of positions a user can have
Use Cases
- Check before adding position
- Manage position count
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 MaxPositions constant
const value = await api.constants.Swap.MaxPositions();
console.log("MaxPositions:", value);Type Information
- Type
- u32
- Byte Size
- 4 bytes
- Encoding
- fixed
- Raw Hex
- 0x64000000
Runtime Info
- Pallet
- Swap
- First Version
- v290
- Latest Version
- v290
- Current Runtime
- v411