From Chain Metadata
Some balance was locked.
Triggers
Preconditions
- Account has balance to lock
- Lock operation requested
Effects
Postconditions
- Balance locked and unavailable for transfer
Side Effects
- Commonly used for staking/vesting
Event Data
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);
// Subscribe to Locked events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Balances.Locked.get(block.hash);
for (const evt of events) {
console.log("Locked:", evt.payload);
}
});Runtime Info
- Pallet Index
- 5
- Event Index
- 17
- First Version
- v149
- Current Version
- v411