Creates a deterministic account for holding pool liquidity.
Current Value
0x74656e2f73776170Relevant for: developers
The Big Picture
All pool liquidity is held in an account derived from this ID (ten/swap).
From Chain Metadata
This type is used to derive protocol accoun ID.
Use Cases
- Derive protocol account
- Verify pool account address
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 ProtocolId constant
const value = await api.constants.Swap.ProtocolId();
console.log("ProtocolId:", value);Type Information
- Type
- PalletId
- Byte Size
- variable bytes
- Encoding
- composite
- Raw Hex
- 0x74656e2f73776170
Runtime Info
- Pallet
- Swap
- First Version
- v290
- Latest Version
- v290
- Current Runtime
- v411