SubnetOwnerChanged

Event v411 → current New #129

Emitted when subnet ownership transfers to a new coldkey because conviction shifted the lead.

View events on chain
Useful for: subnet ownersanalyticsdevelopers

The Big Picture

Subnet ownership is conviction-weighted in v411 and beyond. When a different coldkey accumulates more conviction than the current owner, ownership transfers. This event is the on-chain record of that transition.

Use Cases

  • Alert on subnet ownership changes
  • Track subnet ownership history
  • Audit conviction-driven governance changes

From Chain Metadata

Subnet ownership was reassigned by lock conviction.

Part of: Lock & Conviction

Triggers

Preconditions

  • Conviction tally placed a new coldkey ahead of the previous owner
  • Lock state evaluated at the relevant boundary

Effects

Postconditions

  • SubnetOwner storage updated to the new coldkey

Side Effects

  • Subsequent owner-cut allocations route to the new owner
  • Some owner-permissioned admin calls now belong to the new coldkey

Event Data

#NameTypeDescription
0
netuid
u16 NetUidSubnet whose ownership transferred
1
old_coldkey
AccountId Previous subnet owner coldkey (hex -> SS58)
2
new_coldkey
AccountId New subnet owner coldkey, decided by conviction tally (hex -> SS58)

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

Runtime Info

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