StakeAndHotkeyTransferred
Event v437 → v440, v441 → current #143Stake has been transferred from one coldkey to another, landing on a
View events on chainFrom Chain Metadata
Stake has been transferred from one coldkey to another, landing on a different hotkey (and optionally a different subnet).
Triggers
Emitted by
May fail with
NotEnoughStaketoWithdrawNotEnoughStakeNotEnoughStakeToWithdrawNotEnoughStakeToSetWeightsStakeToWithdrawIsZeroNotEnoughStakeToSetChildkeysNotEnoughBalanceToStakeStakeAlreadyAddedStakeRateLimitExceededUnstakeRateLimitExceededStakeTooLowForRootBelowStakeThresholdNomStakeBelowMinimumThresholdCannotUnstakeLockStakeUnavailableZeroMaxStakeAmountKeepStakeBlockedByCollateralSameAutoStakeHotkeyAlreadySetAddStakeBurnRateLimitExceededInsufficientStakeForLockRootStakeLocked
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | origin_coldkey | AccountId | Coldkey the stake left; the signer of transfer_stake_and_hotkey (hex -> SS58) |
| 1 | destination_coldkey | AccountId | Coldkey that now owns the stake (hex -> SS58) |
| 2 | origin_hotkey | AccountId | Hotkey the stake left (hex -> SS58) |
| 3 | destination_hotkey | AccountId | Hotkey the stake landed on (hex -> SS58) |
| 4 | origin_netuid | NetUid | Subnet the stake left |
| 5 | destination_netuid | NetUid | Subnet the stake landed on; equal to origin_netuid on a same-subnet transfer |
| 6 | amount → tao_equivalent | TaoBalance | TAO-equivalent of the move in RAO, the TaoBalance returned by transition_stake_internal. This is NOT the alpha that moved: the extrinsic takes alpha_amount, and that alpha leg is absent from this payload. Do not read this field as an alpha delta. The alpha actually debited and credited is visible only in the StakeRemoved / StakeAdded pair the same call emits. |
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 StakeAndHotkeyTransferred events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.SubtensorModule.StakeAndHotkeyTransferred.get(block.hash);
for (const evt of events) {
console.log("StakeAndHotkeyTransferred:", evt.payload);
}
});Version History
v437 block 8,679,056 7 args
v441 block 8,765,683 7 args Current
Runtime Info
View Source- Pallet Index
- 7
- Event Index
- 143
- First Version
- v437
- Current Version
- v472