From Chain Metadata
Some amount was removed from the account (e.g. for misbehavior).
Triggers
Preconditions
- Account has balance to slash
- Slash condition triggered
Effects
Postconditions
- Account balance decreased by slash amount
Side Effects
- Slashed funds may be burned or redistributed
Event Data
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 Slashed events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Balances.Slashed.get(block.hash);
for (const evt of events) {
console.log("Slashed:", evt.payload);
}
});Runtime Info
- Pallet Index
- 5
- Event Index
- 9
- First Version
- v101
- Current Version
- v411