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 chain

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

#NameTypeDescription
0
hotkey
AccountId hotkey: Account address (32 bytes, SS58-encoded) (hex -> SS58)
1
netuid
u16 NetUidnetuid: Subnet ID (u16, 0-65535)
2
amount
u64 TaoBalanceamount: 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

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