MaxLocks

Constant v101 → current u32

Limits complexity of balance management.

Current Value

50

From Chain Metadata

The maximum number of locks that should exist on an account. Not strictly enforced, but used for weight estimation.

Use Cases

  • Lock operations
  • Staking

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 MaxLocks constant
const value = await api.constants.Balances.MaxLocks();
console.log("MaxLocks:", value);

Type Information

Type
u32
Byte Size
4 bytes
Encoding
fixed
Raw Hex
0x32000000

Runtime Info

Pallet
Balances
First Version
v101
Latest Version
v101
Current Runtime
v411