add_stake_burn
Call v385 → v385, v391 → current #132--- The extrinsic is a combination of add_stake(add_stake_limit) and burn_alpha. We buy
View calls on chainCall Workflow
This diagram shows the call execution flow: starting with add_stake_burn, 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 which emits events: AddStakeBurn, 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
The extrinsic is a combination of add_stake(add_stake_limit) and burn_alpha. We buy alpha token first and immediately burn the acquired amount of alpha (aka Subnet buyback).
Input Parameters
| # | Name | Type | Description |
|---|---|---|---|
| 0 | hotkey | AccountId | hotkey: Account address (32 bytes, SS58-encoded) (hex -> SS58) |
| 1 | netuid | u16 NetUid | netuid: Subnet ID (u16, 0-65535) |
| 2 | amount | u64 TaoBalance | amount: TAO amount in RAO (÷10⁹ for TAO) (RAO -> TAO (/ 10^9)) |
| 3 | limit | Option Option<TaoBalance> | limit: optional TAO amount in RAO (÷10⁹ for TAO) |
Permissions
Origin
Unknown
Required Role
Permission data inferred from metadata. May be incomplete.
Requirements
- Required conditions for addition met
- Sufficient balance for staking operation
Effects
Events Emitted
Postconditions
- Item successfully added/registered
- Stake updated successfully
Possible Errors
NotEnoughStaketoWithdrawNotEnoughStakeNotEnoughStakeToWithdrawNotEnoughStakeToSetWeightsStakeToWithdrawIsZeroNotEnoughStakeToSetChildkeysNotEnoughBalanceToStakeStakeAlreadyAddedStakeRateLimitExceededUnstakeRateLimitExceededStakeTooLowForRootBelowStakeThresholdNomStakeBelowMinimumThresholdCannotUnstakeLockStakeUnavailableZeroMaxStakeAmountSameAutoStakeHotkeyAlreadySetAddStakeBurnRateLimitExceededInsufficientStakeForLock
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 add_stake_burn call (typed, named args)
const hotkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const netuid = 1;
const amount = 1_000_000_000n;
const limit = undefined;
const tx = api.tx.SubtensorModule.add_stake_burn({
hotkey,
netuid,
amount,
limit,
});Version History
v385 block 7,782,670 4 args
v391 block 7,782,857 4 args Current
Runtime Info
View Source- Pallet Index
- 7
- Call Index
- 132
- First Version
- v385
- Current Version
- v411