CannotDeposit

Event v154 → current #6

Emitted when deposit reservation fails during safe-mode entry/extend.

View events on chain
Useful for: validatorsdevelopers

The Big Picture

Something went wrong with the deposit. This is typically a currency system error - perhaps insufficient balance or a locking issue. The safe-mode operation did not proceed.

Use Cases

  • Debug failed safe-mode activations
  • Monitor currency system issues

From Chain Metadata

Could not hold funds for entering or extending the safe-mode. This error comes from the underlying `Currency`.

Triggers

Preconditions

  • Account attempted permissionless entry/extend
  • Currency operation failed

Effects

Postconditions

  • Safe-mode was not entered/extended
  • No deposit was reserved

This event has no data fields.

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

Runtime Info

Pallet Index
20
Event Index
6
First Version
v154
Current Version
v411