TransferToggle

Event Re-added v233 → v247, v252 → v265, v273 → v277, v290 → v315, v320 → v326, v334 → v367, v372 → v377, v385 → current #91

Emitted when transfer functionality is toggled.

View events on chain
Useful for: stakersvalidatorsexchangeswalletsanalytics

The Big Picture

Transfer toggling is an emergency mechanism that can enable or disable all token transfers on the network. Disabling transfers is a drastic measure - typically used during emergencies, migrations, or security incidents. This event signals major operational changes affecting everyone's ability to move TAO.

Why This Matters

If transfers are disabled, you cannot send TAO to anyone (except possibly special operations). This is a network-wide lock affecting everyone. Understanding when and why transfers toggle helps you respond appropriately to network emergencies or planned maintenance.

Example Scenario

A security vulnerability is discovered. Admins disable transfers to prevent exploitation. TransferToggle fires with enabled=false. No one can transfer TAO until the issue is fixed. Later, TransferToggle fires with enabled=true when transfers resume.

Common Questions

Can I still stake if transfers are disabled?
Depends on implementation. Staking might be considered different from transfers. Check what operations are specifically blocked. Often staking continues to work.
Why would transfers ever be disabled?
Emergency situations: security vulnerabilities, chain bugs, coordinated attacks, or planned maintenance/migrations. It's a last resort to protect the network.
How long are transfers typically disabled?
As short as possible. It's an emergency measure, not a normal state. Expect transfers to resume once the issue is resolved. Monitor for re-enable announcements.

Use Cases

  • Track when transfers are enabled or disabled
  • Monitor network operational status
  • Detect emergency network states
  • Build transfer availability tracking

How to Use This Event

  • Monitor for transfer status changes
  • Build alerts for transfer availability
  • Track network operational status

From Chain Metadata

Event called when transfer is toggled on a subnet. Parameters: (netuid, bool)

Triggers

Preconditions

  • Caller has admin/sudo privileges

Effects

Postconditions

  • Transfer enabled/disabled

Side Effects

  • If disabled, token transfers blocked

Event Data

#NameTypeDescription
0
arg0
u16 Event field #0 (u16)
1
arg1
bool Event field #1 (bool)

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Subscribe to TransferToggle events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("SubtensorModule") &&
      event.method === "TransferToggle"
    )
    .forEach(({ event }) => {
      console.log("TransferToggle:", event.data.toHuman());
    });
});

Version History

v233 block 4,920,350 2 args
v252 block 5,163,656 2 args
v273 block 5,659,032 2 args
v290 block 5,947,548 2 args
v320 block 6,523,566 2 args
v334 block 6,811,690 2 args
v372 block 7,430,358 2 args
v385 block 7,782,670 2 args Current

Runtime Info

View Source
Pallet Index
7
Event Index
91
First Version
v233
Current Version
v393