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 { 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 ProtocolId constant
const value = api.consts[stringCamelCase("Swap")][stringCamelCase("ProtocolId")];
console.log("ProtocolId:", value.toHuman());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
- v393