TotalIssuanceForced

Event v151 → current #21

Emitted when total issuance is forcefully changed.

View events on chain

From Chain Metadata

The `TotalIssuance` was forcefully changed.

Triggers

Preconditions

  • Caller has root/sudo privileges

Effects

Storage Modified

Postconditions

  • Total issuance set to new value

Side Effects

  • Administrative operation - may not balance

Event Data

#NameTypeDescription
0
old
u64 old (u64)
1
new
u64 new (u64)

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 TotalIssuanceForced events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("Balances") &&
      event.method === "TotalIssuanceForced"
    )
    .forEach(({ event }) => {
      console.log("TotalIssuanceForced:", event.data.toHuman());
    });
});

Runtime Info

Pallet Index
5
Event Index
21
First Version
v151
Current Version
v393