This call was removed in v160
This call is no longer available in the current runtime. Existed from v156 to v160. Shown here for historical reference.
unstake_all_and_transfer_to_new_coldkey
Call Removed v156 → v157, v158 → v160 (removed) #72Unstakes all tokens associated with a hotkey and transfers them to a new coldkey .
Call Workflow
This diagram shows the call execution flow: starting with unstake_all_and_transfer_to_new_coldkey, passing through validation
(signature, nonce, mortality, fee payment), then pre-dispatch checks where it may fail with errors like NotEnoughStaketoWithdraw, NotEnoughStake, NotEnoughStakeToWithdraw, followed by dispatch, and finally post-dispatch where ExtrinsicSuccess is emitted and fees are settled.
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
Click items to navigate. Pan and zoom to explore.
From Chain Metadata
Unstakes all tokens associated with a hotkey and transfers them to a new coldkey.
Input Parameters
| # | Name | Type | Description |
|---|---|---|---|
| 0 | new_coldkey | AccountId | new_coldkey (AccountId) (hex -> SS58) |
Permissions
Origin
Signed
Required Role
Permission data inferred from metadata. May be incomplete.
Requirements
- Item exists and caller authorized to remove
- Sender has sufficient balance
- Sufficient balance for staking operation
Effects
Postconditions
- Item removed successfully
- Balance transferred successfully
- Stake updated successfully
Possible Errors
NotEnoughStaketoWithdrawNotEnoughStakeNotEnoughStakeToWithdrawNotEnoughStakeToSetWeightsStakeToWithdrawIsZeroNotEnoughStakeToSetChildkeysNotEnoughBalanceToStakeStakeAlreadyAddedStakeRateLimitExceededUnstakeRateLimitExceededStakeTooLowForRootBelowStakeThresholdNomStakeBelowMinimumThresholdCannotUnstakeLockZeroMaxStakeAmountSameAutoStakeHotkeyAlreadySetAddStakeBurnRateLimitExceeded
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 unstake_all_and_transfer_to_new_coldkey call
const new_coldkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const call = api.tx[stringCamelCase("SubtensorModule")][stringCamelCase("unstake_all_and_transfer_to_new_coldkey")](
new_coldkey
);Version History
v156 block 3,321,841 2 args
v158 block 3,322,072 1 args
v160 Removed
Runtime Info
View Source- Pallet Index
- 7
- Call Index
- 72
- First Version
- v156
- Removed In
- v160