transfer_stake_and_hotkey

Call v437 → current #143

Transfers a specified amount of stake from one coldkey to another, landing it

View calls on chain

Click items to navigate. Pan and zoom to explore.

From Chain Metadata

Transfers a specified amount of stake from one coldkey to another, landing it on a different hotkey, optionally across subnets. This is `transfer_stake` generalized to a destination hotkey: it transfers ownership of the position and re-delegates it in one atomic call. Use `transfer_stake` when the hotkey stays the same, and `move_stake` when only the hotkey changes (ownership stays with the signing coldkey).

Input Parameters

#NameTypeDescription
0
destination_coldkey
AccountId destination_coldkey: Account address (32 bytes, SS58-encoded) (hex -> SS58)
1
origin_hotkey
AccountId origin_hotkey: Account address (32 bytes, SS58-encoded) (hex -> SS58)
2
destination_hotkey
AccountId destination_hotkey: Account address (32 bytes, SS58-encoded) (hex -> SS58)
3
origin_netuid
NetUid origin_netuid: Subnet ID (u16, 0-65535)
4
destination_netuid
NetUid destination_netuid: Subnet ID (u16, 0-65535)
5
alpha_amount
AlphaBalance alpha_amount: Alpha amount in alpha-RAO (÷10⁹ for alpha)

Permissions

Origin
Signed
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Sender has sufficient balance
  • Sufficient balance for staking operation

Effects

Postconditions

  • Balance transferred successfully
  • Stake updated successfully

Possible Errors

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);

// Build transfer_stake_and_hotkey call (typed, named args)
const destination_coldkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const origin_hotkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const destination_hotkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const origin_netuid = 1;
const destination_netuid = 1;
const alpha_amount = 1_000_000_000n;

const tx = api.tx.SubtensorModule.transfer_stake_and_hotkey({
  destination_coldkey,
  origin_hotkey,
  destination_hotkey,
  origin_netuid,
  destination_netuid,
  alpha_amount,
});

On-Chain Activity

Usage Frequency
●●●○○○ Moderate 10K–100K extrinsics

Occasional use

#55 most used call

Success Rate Near-certain

Over 95% of submissions succeed

As of block 9,385,000

Runtime Info

View Source
Pallet Index
7
Call Index
143
First Version
v437
Current Version
v490