extend
Call v154 → current #2Extend safe-mode duration permissionlessly by reserving a deposit.
View calls on chainCall Workflow
Click items to navigate. Pan and zoom to explore.
The Big Picture
Sometimes the initial safe-mode duration isn't enough. Anyone can extend it by putting up another deposit. Extensions accumulate on top of existing duration.
Use Cases
- Extend protection while investigation continues
- Maintain safe-mode when fix isn't ready before expiration
From Chain Metadata
Extend the safe-mode permissionlessly for [`Config::ExtendDuration`] blocks. This accumulates on top of the current remaining duration. Reserves [`Config::ExtendDepositAmount`] from the caller's account. Emits an [`Event::Extended`] event on success. Errors with [`Error::Exited`] if the safe-mode is entered. Errors with [`Error::NotConfigured`] if the deposit amount is `None`. This may be called by any signed origin with [`Config::ExtendDepositAmount`] free currency to reserve. This call can be disabled for all origins by configuring [`Config::ExtendDepositAmount`] to `None`.
This call takes no parameters.
Permissions
Permission data inferred from metadata. May be incomplete.
Requirements
- Safe-mode is currently entered
- Caller has sufficient free balance for the extend deposit
- ExtendDepositAmount is configured (not None)
Effects
Events Emitted
Storage Modified
Postconditions
- Safe-mode extended by ExtendDuration blocks
- EnteredUntil storage updated
- Additional deposit reserved
Side Effects
- New deposit tracked separately in Deposits storage
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 });
// Build extend call (no parameters)
const call = api.tx[stringCamelCase("SafeMode")][stringCamelCase("extend")]();Runtime Info
- Pallet Index
- 20
- Call Index
- 2
- First Version
- v154
- Current Version
- v393