ColdkeySwapDisputed

Event v385 → v402, v411 → v422, v423 → v440, v441 → current #73

Emitted when a coldkey disputes its own pending swap, escalating it for manual resolution and blocking every call .

View events on chain
Useful for: stakersdelegatorswalletsexchangesanalytics

The Big Picture

This is the safety valve on the announcement delay. An announced swap freezes everything except the swap calls; a dispute freezes those too, so a pending rotation cannot be completed while the dispute stands. Resolution is off-chain, and the only way back is a root-origin reset.

Why This Matters

The difference between announced and disputed matters operationally. Announced blocks most calls and returns ColdkeySwapAnnounced. Disputed blocks all calls and returns ColdkeySwapDisputed. In the second state the account cannot even complete or clear its own swap.

Example Scenario

A rotation is announced on your coldkey that you did not intend. You call dispute_coldkey_swap. The pending swap can no longer execute when its delay elapses, and the account stays halted until root calls reset_coldkey_swap.

Common Questions

Who can raise a dispute?
Only the coldkey itself. dispute_coldkey_swap takes a signed origin and uses the signer as the disputed coldkey, so it is a self-service halt for someone who still holds the key, not a way for a third party to freeze another account.
How does a dispute end?
Through reset_coldkey_swap, which requires root origin and clears both the announcement and the dispute. There is no timeout and no self-service exit.

Use Cases

  • Detect a contested key rotation
  • Alert on an account that has escalated to manual resolution
  • Explain why every call from an account is failing

How to Use This Event

  • → Treat a disputed coldkey as fully halted, not merely restricted
  • → Watch for ColdkeySwapReset as the only exit

From Chain Metadata

A coldkey swap has been disputed.

Triggers

Preconditions

  • Caller is the coldkey with the announcement
  • An announcement exists in ColdkeySwapAnnouncements
  • No dispute is already recorded

Effects

Postconditions

  • ColdkeySwapDisputes[coldkey] holds the block the dispute was raised at
  • EVERY call signed by this coldkey is now rejected, including the swap calls themselves

Side Effects

  • Only a root-origin reset_coldkey_swap can clear the state
  • The pending swap can no longer be executed by anyone holding the key

Event Data

#NameTypeDescription
0
coldkey
AccountId coldkey: Account address (32 bytes, SS58-encoded) (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 ColdkeySwapDisputed events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.SubtensorModule.ColdkeySwapDisputed.get(block.hash);
  for (const evt of events) {
    console.log("ColdkeySwapDisputed:", evt.payload);
  }
});

Version History

v385 block 7,782,670 1 args
v411 block 8,283,784 1 args
v423 block 8,486,593 1 args
v441 block 8,765,683 1 args Current

Runtime Info

View Source
Pallet Index
7
Event Index
73
First Version
v385
Current Version
v472