PerpetualLockUpdated

Event v411 → current New #130

Emitted when a coldkey 's perpetual-lock flag flips on or off for a specific subnet .

View events on chain
Useful for: stakerssubnet ownersanalytics

The Big Picture

Perpetual flag changes are a strong commitment signal. Aggregating these tells you how much of the locked supply has opted out of decay entirely.

Use Cases

  • Track perpetual-lock adoption per subnet
  • Identify accounts committed to long-term subnet positions

From Chain Metadata

A coldkey's perpetual lock flag was updated.

Part of: Lock & Conviction

Triggers

Preconditions

  • set_perpetual_lock call succeeded

Effects

Postconditions

  • DecayingLock entry inserted (enabled=false) or removed (enabled=true)

Side Effects

  • The coldkey's individual lock either stops decaying (perpetual) or resumes normal decay

Event Data

#NameTypeDescription
0
coldkey
AccountId Coldkey whose perpetual-lock flag was toggled (hex -> SS58)
1
netuid
u16 NetUidSubnet the flag was toggled on
2
enabled
bool Whether this coldkey's lock is now perpetual (true) or back to normal decay (false)

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 PerpetualLockUpdated events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.SubtensorModule.PerpetualLockUpdated.get(block.hash);
  for (const evt of events) {
    console.log("PerpetualLockUpdated:", evt.payload);
  }
});

Runtime Info

View Source
Pallet Index
7
Event Index
130
First Version
v411
Current Version
v411