AdminUtils docs
Look up any call, event, or storage item with code examples. Runtime v490 · Block #9,478,217
Developer documentation for the AdminUtils pallet of the Subtensor blockchain, part of the Bittensor decentralized AI network. This page is designed for developers integrating with the chain: look up any call, event, or storage item, copy code examples in TypeScript, Python, or Rust, and filter by your role. For in-depth explanations, version history, and relationships between items, see the Reference section.
AdminUtils
The extrinsic sets the new authorities for Aura consensus.
Calls 105
Sets the default delegate take percentage for new validators.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
default_take | PerU16 | — | default_take (PerU16) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_default_take call (typed, named args)
const default_take = undefined as any /* PerU16 — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_default_take({
default_take,
});Sets the transaction rate limit for the network.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
tx_rate_limit | u64 | Integer | tx_rate_limit (u64) |
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 sudo_set_tx_rate_limit call (typed, named args)
const tx_rate_limit = 0n;
const tx = api.tx.AdminUtils.sudo_set_tx_rate_limit({
tx_rate_limit,
});Sets the serving rate limit for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
serving_rate_limit | u64 | Integer | serving_rate_limit (u64) |
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 sudo_set_serving_rate_limit call (typed, named args)
const netuid = 1;
const serving_rate_limit = 0n;
const tx = api.tx.AdminUtils.sudo_set_serving_rate_limit({
netuid,
serving_rate_limit,
});Sets the minimum POW difficulty for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
min_difficulty | u64 | Integer | min_difficulty (u64) |
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 sudo_set_min_difficulty call (typed, named args)
const netuid = 1;
const min_difficulty = 0n;
const tx = api.tx.AdminUtils.sudo_set_min_difficulty({
netuid,
min_difficulty,
});Sets the maximum POW difficulty for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
max_difficulty | u64 | Integer | max_difficulty (u64) |
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 sudo_set_max_difficulty call (typed, named args)
const netuid = 1;
const max_difficulty = 0n;
const tx = api.tx.AdminUtils.sudo_set_max_difficulty({
netuid,
max_difficulty,
});Sets the weights version key for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
weights_version_key | u64 | Integer | weights_version_key (u64) |
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 sudo_set_weights_version_key call (typed, named args)
const netuid = 1;
const weights_version_key = 0n;
const tx = api.tx.AdminUtils.sudo_set_weights_version_key({
netuid,
weights_version_key,
});Sets how often neurons can update weights on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
weights_set_rate_limit | u64 | Integer | weights_set_rate_limit (u64) |
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 sudo_set_weights_set_rate_limit call (typed, named args)
const netuid = 1;
const weights_set_rate_limit = 0n;
const tx = api.tx.AdminUtils.sudo_set_weights_set_rate_limit({
netuid,
weights_set_rate_limit,
});Sets the difficulty adjustment interval for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
adjustment_interval | u16 | Integer (0-65535) | adjustment_interval (u16) |
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 sudo_set_adjustment_interval call (typed, named args)
const netuid = 1;
const adjustment_interval = 0;
const tx = api.tx.AdminUtils.sudo_set_adjustment_interval({
netuid,
adjustment_interval,
});Sets the difficulty adjustment smoothing factor for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
adjustment_alpha | u64 | Integer | adjustment_alpha (u64) |
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 sudo_set_adjustment_alpha call (typed, named args)
const netuid = 1;
const adjustment_alpha = 0n;
const tx = api.tx.AdminUtils.sudo_set_adjustment_alpha({
netuid,
adjustment_alpha,
});Sets the immunity period for newly registered neurons on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
immunity_period | u16 | Integer (0-65535) | immunity_period (u16) |
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 sudo_set_immunity_period call (typed, named args)
const netuid = 1;
const immunity_period = 0;
const tx = api.tx.AdminUtils.sudo_set_immunity_period({
netuid,
immunity_period,
});Sets the minimum number of weights a neuron must set on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
min_allowed_weights | u16 | Integer (0-65535) | min_allowed_weights (u16) |
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 sudo_set_min_allowed_weights call (typed, named args)
const netuid = 1;
const min_allowed_weights = 0;
const tx = api.tx.AdminUtils.sudo_set_min_allowed_weights({
netuid,
min_allowed_weights,
});Sets the maximum number of UIDs (neurons) allowed on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
max_allowed_uids | u16 | Integer (0-65535) | max_allowed_uids (u16) |
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 sudo_set_max_allowed_uids call (typed, named args)
const netuid = 1;
const max_allowed_uids = 0;
const tx = api.tx.AdminUtils.sudo_set_max_allowed_uids({
netuid,
max_allowed_uids,
});Sets the kappa parameter for consensus on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
kappa | u16 | Integer (0-65535) | kappa (u16) |
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 sudo_set_kappa call (typed, named args)
const netuid = 1;
const kappa = 0;
const tx = api.tx.AdminUtils.sudo_set_kappa({
netuid,
kappa,
});Sets the rho parameter for consensus on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
rho | u16 | Integer (0-65535) | rho (u16) |
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 sudo_set_rho call (typed, named args)
const netuid = 1;
const rho = 0;
const tx = api.tx.AdminUtils.sudo_set_rho({
netuid,
rho,
});Sets the activity cutoff for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
activity_cutoff | u16 | Integer (0-65535) | activity_cutoff (u16) |
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 sudo_set_activity_cutoff call (typed, named args)
const netuid = 1;
const activity_cutoff = 0;
const tx = api.tx.AdminUtils.sudo_set_activity_cutoff({
netuid,
activity_cutoff,
});Enables or disables new neuron registration on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
registration_allowed | bool | Boolean (true/false) | registration_allowed (bool) |
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 sudo_set_network_registration_allowed call (typed, named args)
const netuid = 1;
const registration_allowed = true;
const tx = api.tx.AdminUtils.sudo_set_network_registration_allowed({
netuid,
registration_allowed,
});Enables or disables POW-based registration on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
registration_allowed | bool | Boolean (true/false) | registration_allowed (bool) |
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 sudo_set_network_pow_registration_allowed call (typed, named args)
const netuid = 1;
const registration_allowed = true;
const tx = api.tx.AdminUtils.sudo_set_network_pow_registration_allowed({
netuid,
registration_allowed,
});Sets the target registration rate for difficulty adjustment.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
target_registrations_per_interval | u16 | Integer (0-65535) | target_registrations_per_interval (u16) |
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 sudo_set_target_registrations_per_interval call (typed, named args)
const netuid = 1;
const target_registrations_per_interval = 0;
const tx = api.tx.AdminUtils.sudo_set_target_registrations_per_interval({
netuid,
target_registrations_per_interval,
});Sets the minimum burn amount for registration on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
min_burn | TaoBalance | — | min_burn: TAO amount in RAO (÷10⁹ for TAO) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_min_burn call (typed, named args)
const netuid = 1;
const min_burn = undefined as any /* TaoBalance — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_min_burn({
netuid,
min_burn,
});Sets the maximum burn amount for registration on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
max_burn | TaoBalance | — | max_burn: TAO amount in RAO (÷10⁹ for TAO) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_max_burn call (typed, named args)
const netuid = 1;
const max_burn = undefined as any /* TaoBalance — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_max_burn({
netuid,
max_burn,
});Directly sets the POW difficulty for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
difficulty | u64 | Integer | difficulty (u64) |
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 sudo_set_difficulty call (typed, named args)
const netuid = 1;
const difficulty = 0n;
const tx = api.tx.AdminUtils.sudo_set_difficulty({
netuid,
difficulty,
});Sets the maximum number of validators allowed on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
max_allowed_validators | u16 | Integer (0-65535) | max_allowed_validators (u16) |
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 sudo_set_max_allowed_validators call (typed, named args)
const netuid = 1;
const max_allowed_validators = 0;
const tx = api.tx.AdminUtils.sudo_set_max_allowed_validators({
netuid,
max_allowed_validators,
});Sets the bonds moving average parameter for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
bonds_moving_average | u64 | Integer | bonds_moving_average (u64) |
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 sudo_set_bonds_moving_average call (typed, named args)
const netuid = 1;
const bonds_moving_average = 0n;
const tx = api.tx.AdminUtils.sudo_set_bonds_moving_average({
netuid,
bonds_moving_average,
});Sets the maximum registrations allowed per block on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
max_registrations_per_block | u16 | Integer (0-65535) | max_registrations_per_block (u16) |
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 sudo_set_max_registrations_per_block call (typed, named args)
const netuid = 1;
const max_registrations_per_block = 0;
const tx = api.tx.AdminUtils.sudo_set_max_registrations_per_block({
netuid,
max_registrations_per_block,
});Set the network-wide subnet owner cut through v479. Deprecated from v481, where it returns AdminUtils.Deprecated without writing.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
subnet_owner_cut | u16 | Integer (0-65535) | subnet_owner_cut (u16) |
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 sudo_set_subnet_owner_cut call (typed, named args)
const subnet_owner_cut = 0;
const tx = api.tx.AdminUtils.sudo_set_subnet_owner_cut({
subnet_owner_cut,
});Sets the network-wide rate limit for subnet creation.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
rate_limit | u64 | Integer | rate_limit (u64) |
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 sudo_set_network_rate_limit call (typed, named args)
const rate_limit = 0n;
const tx = api.tx.AdminUtils.sudo_set_network_rate_limit({
rate_limit,
});Sets the tempo (epoch length) for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
tempo | u16 | Integer (0-65535) | tempo (u16) |
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 sudo_set_tempo call (typed, named args)
const netuid = 1;
const tempo = 0;
const tx = api.tx.AdminUtils.sudo_set_tempo({
netuid,
tempo,
});Sets the total TAO issuance (root only, dangerous).
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
total_issuance | TaoBalance | — | total_issuance: TAO amount in RAO (÷10⁹ for TAO) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_total_issuance call (typed, named args)
const total_issuance = undefined as any /* TaoBalance — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_total_issuance({
total_issuance,
});Sets the network-wide immunity period for new subnets.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
immunity_period | u64 | Integer | immunity_period (u64) |
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 sudo_set_network_immunity_period call (typed, named args)
const immunity_period = 0n;
const tx = api.tx.AdminUtils.sudo_set_network_immunity_period({
immunity_period,
});Sets the minimum TAO lock cost for creating a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
lock_cost | TaoBalance | — | lock_cost: TAO amount in RAO (÷10⁹ for TAO) |
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 sudo_set_network_min_lock_cost call (typed, named args)
const lock_cost = 1_000_000_000n;
const tx = api.tx.AdminUtils.sudo_set_network_min_lock_cost({
lock_cost,
});Sets the maximum number of subnets allowed on the network.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
max_subnets | u16 | Integer (0-65535) | max_subnets (u16) |
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 sudo_set_subnet_limit call (typed, named args)
const max_subnets = 0;
const tx = api.tx.AdminUtils.sudo_set_subnet_limit({
max_subnets,
});Sets how often subnet lock requirements decrease.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
interval | u64 | Integer | interval (u64) |
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 sudo_set_lock_reduction_interval call (typed, named args)
const interval = 0n;
const tx = api.tx.AdminUtils.sudo_set_lock_reduction_interval({
interval,
});Sets the RAO recycled amount for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
rao_recycled | TaoBalance | — | rao_recycled: TAO amount in RAO (÷10⁹ for TAO) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_rao_recycled call (typed, named args)
const netuid = 1;
const rao_recycled = undefined as any /* TaoBalance — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_rao_recycled({
netuid,
rao_recycled,
});Sets the minimum stake threshold for network participation.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
min_stake | u64 | Integer | min_stake (u64) |
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 sudo_set_stake_threshold call (typed, named args)
const min_stake = 1_000_000_000n;
const tx = api.tx.AdminUtils.sudo_set_stake_threshold({
min_stake,
});Sets the minimum stake required to be a nominator/delegator.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
min_stake | u64 | Integer | min_stake (u64) |
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 sudo_set_nominator_min_required_stake call (typed, named args)
const min_stake = 1_000_000_000n;
const tx = api.tx.AdminUtils.sudo_set_nominator_min_required_stake({
min_stake,
});Sets how often delegates can change their take rate.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
tx_rate_limit | u64 | Integer | tx_rate_limit (u64) |
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 sudo_set_tx_delegate_take_rate_limit call (typed, named args)
const tx_rate_limit = 0n;
const tx = api.tx.AdminUtils.sudo_set_tx_delegate_take_rate_limit({
tx_rate_limit,
});Sets the minimum delegate take percentage.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
take | PerU16 | — | take (PerU16) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_min_delegate_take call (typed, named args)
const take = undefined as any /* PerU16 — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_min_delegate_take({
take,
});Enables or disables commit-reveal weight setting on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
enabled | bool | Boolean (true/false) | enabled (bool) |
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 sudo_set_commit_reveal_weights_enabled call (typed, named args)
const netuid = 1;
const enabled = true;
const tx = api.tx.AdminUtils.sudo_set_commit_reveal_weights_enabled({
netuid,
enabled,
});Enables or disables liquid alpha on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
enabled | bool | Boolean (true/false) | enabled (bool) |
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 sudo_set_liquid_alpha_enabled call (typed, named args)
const netuid = 1;
const enabled = true;
const tx = api.tx.AdminUtils.sudo_set_liquid_alpha_enabled({
netuid,
enabled,
});Sets the alpha low and high values for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
alpha_low | u16 | Integer (0-65535) | alpha_low (u16) |
alpha_high | u16 | Integer (0-65535) | alpha_high (u16) |
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 sudo_set_alpha_values call (typed, named args)
const netuid = 1;
const alpha_low = 0;
const alpha_high = 0;
const tx = api.tx.AdminUtils.sudo_set_alpha_values({
netuid,
alpha_low,
alpha_high,
});Sets how long subnet dissolution takes.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
duration | u32 | Integer | duration: Block number |
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 sudo_set_dissolve_network_schedule_duration call (typed, named args)
const duration = 0;
const tx = api.tx.AdminUtils.sudo_set_dissolve_network_schedule_duration({
duration,
});Sets the commit-reveal interval for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
interval | u64 | Integer | interval (u64) |
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 sudo_set_commit_reveal_weights_interval call (typed, named args)
const netuid = 1;
const interval = 0n;
const tx = api.tx.AdminUtils.sudo_set_commit_reveal_weights_interval({
netuid,
interval,
});Sets the EVM chain ID for the network.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
chain_id | u64 | Integer | chain_id (u64) |
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 sudo_set_evm_chain_id call (typed, named args)
const chain_id = 0n;
const tx = api.tx.AdminUtils.sudo_set_evm_chain_id({
chain_id,
});Schedules a GRANDPA authority change to take effect after specified blocks.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
next_authorities | Vec<(Public, u64)> | Array of (Public, u64) | next_authorities (Vec<(Public, u64)>) |
in_blocks | u32 | Integer | in_blocks: Block number |
forced | Option | — | forced: optional Block number |
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 schedule_grandpa_change call (typed, named args)
const next_authorities = [] as [];
const in_blocks = 0;
const forced = undefined;
const tx = api.tx.AdminUtils.schedule_grandpa_change({
next_authorities,
in_blocks,
forced,
});Sets the bonds penalty parameter for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
bonds_penalty | u16 | Integer (0-65535) | bonds_penalty (u16) |
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 sudo_set_bonds_penalty call (typed, named args)
const netuid = 1;
const bonds_penalty = 0;
const tx = api.tx.AdminUtils.sudo_set_bonds_penalty({
netuid,
bonds_penalty,
});Toggles transfer restrictions for a subnet's alpha token.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
toggle | bool | Boolean (true/false) | toggle (bool) |
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 sudo_set_toggle_transfer call (typed, named args)
const netuid = 1;
const toggle = true;
const tx = api.tx.AdminUtils.sudo_set_toggle_transfer({
netuid,
toggle,
});Enables or disables an EVM precompile contract.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
precompile_id | PrecompileEnum | — | precompile_id (PrecompileEnum) |
enabled | bool | Boolean (true/false) | enabled (bool) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_toggle_evm_precompile call (typed, named args)
const precompile_id = undefined as any /* PrecompileEnum — replace with real value */;
const enabled = true;
const tx = api.tx.AdminUtils.sudo_toggle_evm_precompile({
precompile_id,
enabled,
});Sets the moving alpha parameter for subnet emission calculations.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
alpha | FixedI128 | — | alpha: Signed substrate-fixed i96.32 via .bits codec (inner i128). Real value = bits / 2^32. Two's complement: JS BigInt(hex) does NOT sign-extend — adjust manually for negatives. |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_subnet_moving_alpha call (typed, named args)
const alpha = undefined as any /* FixedI128 — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_subnet_moving_alpha({
alpha,
});Sets the EMA price halving period for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
ema_halving | u64 | Integer | ema_halving (u64) |
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 sudo_set_ema_price_halving_period call (typed, named args)
const netuid = 1;
const ema_halving = 0n;
const tx = api.tx.AdminUtils.sudo_set_ema_price_halving_period({
netuid,
ema_halving,
});Enables or disables subtoken (Alpha) on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
subtoken_enabled | bool | Boolean (true/false) | subtoken_enabled (bool) |
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 sudo_set_subtoken_enabled call (typed, named args)
const netuid = 1;
const subtoken_enabled = true;
const tx = api.tx.AdminUtils.sudo_set_subtoken_enabled({
netuid,
subtoken_enabled,
});Sets the subnet owner's hotkey (alias for sudo_set_subnet_owner_hotkey).
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
hotkey | AccountId | SS58 Address | hotkey: Account address (32 bytes, SS58-encoded) |
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 sudo_set_sn_owner_hotkey call (typed, named args)
const netuid = 1;
const hotkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const tx = api.tx.AdminUtils.sudo_set_sn_owner_hotkey({
netuid,
hotkey,
});Sets the sigmoid steepness for alpha calculations.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
steepness | i16 | Signed Integer | steepness (i16) |
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 sudo_set_alpha_sigmoid_steepness call (typed, named args)
const netuid = 1;
const steepness = 0;
const tx = api.tx.AdminUtils.sudo_set_alpha_sigmoid_steepness({
netuid,
steepness,
});Enables or disables Yuma3 consensus on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
enabled | bool | Boolean (true/false) | enabled (bool) |
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 sudo_set_yuma3_enabled call (typed, named args)
const netuid = 1;
const enabled = true;
const tx = api.tx.AdminUtils.sudo_set_yuma3_enabled({
netuid,
enabled,
});Enables or disables bonds reset capability on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
enabled | bool | Boolean (true/false) | enabled (bool) |
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 sudo_set_bonds_reset_enabled call (typed, named args)
const netuid = 1;
const enabled = true;
const tx = api.tx.AdminUtils.sudo_set_bonds_reset_enabled({
netuid,
enabled,
});Sets the commit-reveal version for weight submission.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
version | u16 | Integer (0-65535) | version (u16) |
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 sudo_set_commit_reveal_version call (typed, named args)
const version = 0;
const tx = api.tx.AdminUtils.sudo_set_commit_reveal_version({
version,
});Sets how many neurons subnet owners can make immune.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
immune_neurons | u16 | Integer (0-65535) | immune_neurons (u16) |
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 sudo_set_owner_immune_neuron_limit call (typed, named args)
const netuid = 1;
const immune_neurons = 0;
const tx = api.tx.AdminUtils.sudo_set_owner_immune_neuron_limit({
netuid,
immune_neurons,
});Sets the coldkey swap burn amount.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
burn | u64 | Integer | burn (u64) |
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 sudo_set_ck_burn call (typed, named args)
const burn = 0n;
const tx = api.tx.AdminUtils.sudo_set_ck_burn({
burn,
});Sets the admin freeze window duration.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
window | u16 | Integer (0-65535) | window (u16) |
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 sudo_set_admin_freeze_window call (typed, named args)
const window = 0;
const tx = api.tx.AdminUtils.sudo_set_admin_freeze_window({
window,
});Sets how often subnet owners can change hyperparameters.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
epochs | u16 | Integer (0-65535) | epochs (u16) |
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 sudo_set_owner_hparam_rate_limit call (typed, named args)
const epochs = 0;
const tx = api.tx.AdminUtils.sudo_set_owner_hparam_rate_limit({
epochs,
});Sets the number of mechanisms for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
mechanism_count | MechId | — | mechanism_count: Mechanism identifier |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_mechanism_count call (typed, named args)
const netuid = 1;
const mechanism_count = undefined as any /* MechId — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_mechanism_count({
netuid,
mechanism_count,
});Sets how emissions are split between mechanisms on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
maybe_split | Option | — | maybe_split (Option) |
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 sudo_set_mechanism_emission_split call (typed, named args)
const netuid = 1;
const maybe_split = undefined;
const tx = api.tx.AdminUtils.sudo_set_mechanism_emission_split({
netuid,
maybe_split,
});Trims a subnet's neurons to a new maximum UID limit.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
max_n | u16 | Integer (0-65535) | max_n (u16) |
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 sudo_trim_to_max_allowed_uids call (typed, named args)
const netuid = 1;
const max_n = 0;
const tx = api.tx.AdminUtils.sudo_trim_to_max_allowed_uids({
netuid,
max_n,
});Sets the minimum number of UIDs required on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
min_allowed_uids | u16 | Integer (0-65535) | min_allowed_uids (u16) |
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 sudo_set_min_allowed_uids call (typed, named args)
const netuid = 1;
const min_allowed_uids = 0;
const tx = api.tx.AdminUtils.sudo_set_min_allowed_uids({
netuid,
min_allowed_uids,
});Sets whether registration fees are recycled or burned.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
recycle_or_burn | RecycleOrBurnEnum | — | recycle_or_burn (RecycleOrBurnEnum) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_recycle_or_burn call (typed, named args)
const netuid = 1;
const recycle_or_burn = undefined as any /* RecycleOrBurnEnum — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_recycle_or_burn({
netuid,
recycle_or_burn,
});Sets the TAO flow cutoff parameter.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
flow_cutoff | FixedI128 | — | flow_cutoff: Signed substrate-fixed i64.64 via .bits codec (inner i128). Real value = bits / 2^64. Two's complement: JS BigInt(hex) does NOT sign-extend — adjust manually for negatives. |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_tao_flow_cutoff call (typed, named args)
const flow_cutoff = undefined as any /* FixedI128 — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_tao_flow_cutoff({
flow_cutoff,
});Sets the TAO flow normalization exponent.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
exponent | FixedU128 | — | exponent: Unsigned substrate-fixed u64.64 via .bits codec (inner u128). Real value = bits / 2^64. Do NOT truncate to u64. |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_tao_flow_normalization_exponent call (typed, named args)
const exponent = undefined as any /* FixedU128 — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_tao_flow_normalization_exponent({
exponent,
});Sets the TAO flow smoothing factor.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
smoothing_factor | u64 | Integer | smoothing_factor (u64) |
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 sudo_set_tao_flow_smoothing_factor call (typed, named args)
const smoothing_factor = 0n;
const tx = api.tx.AdminUtils.sudo_set_tao_flow_smoothing_factor({
smoothing_factor,
});Sets the minimum number of non-immune UIDs required on a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
min | u16 | Integer (0-65535) | min (u16) |
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 sudo_set_min_non_immune_uids call (typed, named args)
const netuid = 1;
const min = 0;
const tx = api.tx.AdminUtils.sudo_set_min_non_immune_uids({
netuid,
min,
});Sets the delay before certain operations can start.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
delay | u64 | Integer | delay (u64) |
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 sudo_set_start_call_delay call (typed, named args)
const delay = 0n;
const tx = api.tx.AdminUtils.sudo_set_start_call_delay({
delay,
});Sets the announcement delay for coldkey swap.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
duration | u32 | Integer | duration: Block number |
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 sudo_set_coldkey_swap_announcement_delay call (typed, named args)
const duration = 0;
const tx = api.tx.AdminUtils.sudo_set_coldkey_swap_announcement_delay({
duration,
});Sets the coldkey swap reannouncement delay.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
duration | u32 | Integer | duration: Block number |
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 sudo_set_coldkey_swap_reannouncement_delay call (typed, named args)
const duration = 0;
const tx = api.tx.AdminUtils.sudo_set_coldkey_swap_reannouncement_delay({
duration,
});Sets the global maximum number of mechanisms in a subnet
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
max_mechanism_count | MechId | — | max_mechanism_count: Mechanism identifier |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_max_mechanism_count call (typed, named args)
const max_mechanism_count = undefined as any /* MechId — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_max_mechanism_count({
max_mechanism_count,
});Set BurnHalfLife for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
burn_half_life | u16 | Integer (0-65535) | burn_half_life (u16) |
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 sudo_set_burn_half_life call (typed, named args)
const netuid = 1;
const burn_half_life = 0;
const tx = api.tx.AdminUtils.sudo_set_burn_half_life({
netuid,
burn_half_life,
});Set BurnIncreaseMult for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
burn_increase_mult | FixedU128 | — | burn_increase_mult: Unsigned substrate-fixed u64.64 via .bits codec (inner u128). Real value = bits / 2^64. Do NOT truncate to u64. |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_burn_increase_mult call (typed, named args)
const netuid = 1;
const burn_increase_mult = undefined as any /* FixedU128 — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_burn_increase_mult({
netuid,
burn_increase_mult,
});Sets the NetTaoFlowEnabled toggle. Its only reader is dead code since v421, so the call has no effect on emission at v452.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
enabled | bool | Boolean (true/false) | enabled (bool) |
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 sudo_set_net_tao_flow_enabled call (typed, named args)
const enabled = true;
const tx = api.tx.AdminUtils.sudo_set_net_tao_flow_enabled({
enabled,
});Enabled or disabled owner cut on a subnet through v479. Deprecated from v481, where it returns AdminUtils.Deprecated without writing.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
enabled | bool | Boolean (true/false) | enabled (bool) |
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 sudo_set_owner_cut_enabled call (typed, named args)
const netuid = 1;
const enabled = true;
const tx = api.tx.AdminUtils.sudo_set_owner_cut_enabled({
netuid,
enabled,
});Sets a subnet-specific minimum child-key take, overriding the global floor with a stricter one.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
take | PerU16 | — | take (PerU16) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_min_childkey_take_per_subnet call (typed, named args)
const netuid = 1;
const take = undefined as any /* PerU16 — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_min_childkey_take_per_subnet({
netuid,
take,
});Enables or disables pool-side emission for a subnet (alpha_in, tao_in, excess_tao chain-buy paths).
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
enabled | bool | Boolean (true/false) | enabled (bool) |
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 sudo_set_subnet_emission_enabled call (typed, named args)
const netuid = 1;
const enabled = true;
const tx = api.tx.AdminUtils.sudo_set_subnet_emission_enabled({
netuid,
enabled,
});Configures whether owner cut on a subnet is automatically locked (building owner conviction) or paid out liquid.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
enabled | bool | Boolean (true/false) | enabled (bool) |
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 sudo_set_owner_cut_auto_lock_enabled call (typed, named args)
const netuid = 1;
const enabled = true;
const tx = api.tx.AdminUtils.sudo_set_owner_cut_auto_lock_enabled({
netuid,
enabled,
});Sets the per-block cap on subnet epochs (dynamic tempo throttle).
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
max_epochs_per_block | u8 | Integer (0-255) | max_epochs_per_block (u8) |
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 sudo_set_max_epochs_per_block call (typed, named args)
const max_epochs_per_block = 0;
const tx = api.tx.AdminUtils.sudo_set_max_epochs_per_block({
max_epochs_per_block,
});The extrinsic sets the activity-cutoff factor for a subnet, in per-mille
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
factor_milli | u32 | Integer | factor_milli (u32) |
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 sudo_set_activity_cutoff_factor call (typed, named args)
const netuid = 1;
const factor_milli = 0;
const tx = api.tx.AdminUtils.sudo_set_activity_cutoff_factor({
netuid,
factor_milli,
});Sets the miner collateral drain ratio (k) for a subnet: how much
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
drain_ratio | FixedU128 | — | drain_ratio: Unsigned substrate-fixed u64.64 via .bits codec (inner u128). Real value = bits / 2^64. Do NOT truncate to u64. |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_collateral_drain_ratio call (typed, named args)
const netuid = 1;
const drain_ratio = undefined as any /* FixedU128 — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_collateral_drain_ratio({
netuid,
drain_ratio,
});Sets the emission bar quantile (q): the fraction of demand carried by
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
quantile | FixedU128 | — | quantile: Unsigned substrate-fixed u64.64 via .bits codec (inner u128). Real value = bits / 2^64. Do NOT truncate to u64. |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_emission_bar_quantile call (typed, named args)
const quantile = undefined as any /* FixedU128 — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_emission_bar_quantile({
quantile,
});Sets the emission gate Hill exponent (h): cliff sharpness at the bar.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
exponent | FixedU128 | — | exponent: Unsigned substrate-fixed u64.64 via .bits codec (inner u128). Real value = bits / 2^64. Do NOT truncate to u64. |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_emission_gate_exponent call (typed, named args)
const exponent = undefined as any /* FixedU128 — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_emission_gate_exponent({
exponent,
});Sets the emission bar rank N, pinning the eligibility threshold to the Nth-largest demand share.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
rank | u16 | Integer (0-65535) | rank (u16) |
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 sudo_set_emission_bar_rank call (typed, named args)
const rank = 0;
const tx = api.tx.AdminUtils.sudo_set_emission_bar_rank({
rank,
});Sets which consensus values liquid alpha uses for a subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
mode | ConsensusMode | — | mode (ConsensusMode) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_liquid_alpha_consensus_mode call (typed, named args)
const netuid = 1;
const mode = undefined as any /* ConsensusMode — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_liquid_alpha_consensus_mode({
netuid,
mode,
});Sets BasketConcentrationCap: the largest u16-normalized share of fund NAV one holding may reach through a swap_basket buy.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
cap | u16 | Integer (0-65535) | cap (u16) |
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 sudo_set_basket_concentration_cap call (typed, named args)
const cap = 0;
const tx = api.tx.AdminUtils.sudo_set_basket_concentration_cap({
cap,
});Turns validator basket trading (swap_basket) on or off network-wide.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
enabled | bool | Boolean (true/false) | enabled (bool) |
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 sudo_set_basket_trading_enabled call (typed, named args)
const enabled = true;
const tx = api.tx.AdminUtils.sudo_set_basket_trading_enabled({
enabled,
});Freezes or unfreezes swap_basket for one validator hotkey.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
hotkey | AccountId | SS58 Address | hotkey: Account address (32 bytes, SS58-encoded) |
frozen | bool | Boolean (true/false) | frozen (bool) |
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 sudo_set_basket_trading_frozen call (typed, named args)
const hotkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const frozen = true;
const tx = api.tx.AdminUtils.sudo_set_basket_trading_frozen({
hotkey,
frozen,
});Sets BasketDailyTurnoverCap: the capacity of each fund swap_basket turnover bucket as a u16-normalized share of NAV.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
cap | u16 | Integer (0-65535) | cap (u16) |
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 sudo_set_basket_daily_turnover_cap call (typed, named args)
const cap = 0;
const tx = api.tx.AdminUtils.sudo_set_basket_daily_turnover_cap({
cap,
});Sets BasketLiquidityCap: the largest u16-normalized share of a subnet alpha reserve a fund may hold there after a swap_basket buy.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
cap | u16 | Integer (0-65535) | cap (u16) |
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 sudo_set_basket_liquidity_cap call (typed, named args)
const cap = 0;
const tx = api.tx.AdminUtils.sudo_set_basket_liquidity_cap({
cap,
});Sets all four root-claim dust knobs in one call.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
row_cap_rao | u64 | Integer | row_cap_rao (u64) |
row_bps | u16 | Integer (0-65535) | row_bps (u16) |
slice_rao | u64 | Integer | slice_rao (u64) |
forfeit_cap_rao | u64 | Integer | forfeit_cap_rao (u64) |
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 sudo_set_basket_claim_dust call (typed, named args)
const row_cap_rao = 0n;
const row_bps = 0;
const slice_rao = 0n;
const forfeit_cap_rao = 0n;
const tx = api.tx.AdminUtils.sudo_set_basket_claim_dust({
row_cap_rao,
row_bps,
slice_rao,
forfeit_cap_rao,
});Switches a subnet's epoch reward algorithm between Yuma and Null.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
mode | EpochConsensus | — | mode (EpochConsensus) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_epoch_consensus call (typed, named args)
const netuid = 1;
const mode = undefined as any /* EpochConsensus — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_epoch_consensus({
netuid,
mode,
});Removes at most 64 UIDs from a Null-consensus subnet toward a final target, one bounded batch per call.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
target | u16 | Integer (0-65535) | target (u16) |
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 sudo_trim_null_uids_batch call (typed, named args)
const netuid = 1;
const target = 0;
const tx = api.tx.AdminUtils.sudo_trim_null_uids_batch({
netuid,
target,
});Sets BasketMinTradeTao, the minimum TAO value in rao that each swap_basket leg must carry through its middle.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
min_trade_rao | u64 | Integer | min_trade_rao (u64) |
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 sudo_set_basket_min_trade_tao call (typed, named args)
const min_trade_rao = 0n;
const tx = api.tx.AdminUtils.sudo_set_basket_min_trade_tao({
min_trade_rao,
});Sets entries of a subnet's emission weight vector [burn, recycle, owner, validator, miner], each a u64 share of u64::MAX.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
uids | Vec<u16> | Array of Integer (0-65535) | uids (Vec<u16>) |
values | Vec<u64> | Array of Integer | values (Vec<u64>) |
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 sudo_set_subnet_emission_weights call (typed, named args)
const netuid = 1;
const uids = [] as [];
const values = [] as [];
const tx = api.tx.AdminUtils.sudo_set_subnet_emission_weights({
netuid,
uids,
values,
});Root switch for hashed accounts: turns registration and transaction authorization on or off for every classical hashed, ML-DSA, Falcon and protected derived account.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
enabled | bool | Boolean (true/false) | enabled (bool) |
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 sudo_set_hashed_accounts_enabled call (typed, named args)
const enabled = true;
const tx = api.tx.AdminUtils.sudo_set_hashed_accounts_enabled({
enabled,
});Root sets or removes the account allowed to feed the TAO/USD price, and clears the stored price.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
oracle | Option | — | oracle: optional Account address (32 bytes, SS58-encoded) |
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 sudo_set_tao_usd_price_oracle call (typed, named args)
const oracle = undefined;
const tx = api.tx.AdminUtils.sudo_set_tao_usd_price_oracle({
oracle,
});The subnet owner or root enables or disables gamma minting on one subnet.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
enabled | bool | Boolean (true/false) | enabled (bool) |
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 sudo_set_subnet_gamma_enabled call (typed, named args)
const netuid = 1;
const enabled = true;
const tx = api.tx.AdminUtils.sudo_set_subnet_gamma_enabled({
netuid,
enabled,
});Root enables or disables gamma minting network-wide.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
enabled | bool | Boolean (true/false) | enabled (bool) |
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 sudo_set_gamma_enabled call (typed, named args)
const enabled = true;
const tx = api.tx.AdminUtils.sudo_set_gamma_enabled({
enabled,
});Root setter for the TAO amount reserved from the payer of each new hashed, ML-DSA, Falcon or protected derived account registration.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
value | TaoBalance | — | value: TAO amount in RAO (÷10⁹ for TAO) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_hashed_account_registration_deposit call (typed, named args)
const value = undefined as any /* TaoBalance — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_hashed_account_registration_deposit({
value,
});Replaces the whole emission split of a subnet: the burn, recycle, owner, validator and miner slots plus up to 16 gamma shares, each a u64 share of u64::MAX.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
split | BoundedVec | — | split (BoundedVec) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 sudo_set_subnet_emission_weights_v2 call (typed, named args)
const netuid = 1;
const split = undefined as any /* BoundedVec — replace with real value */;
const tx = api.tx.AdminUtils.sudo_set_subnet_emission_weights_v2({
netuid,
split,
});Root adds a subnet to, or removes it from, the whitelist of subnets that may be named as a gamma emission target.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
whitelisted | bool | Boolean (true/false) | whitelisted (bool) |
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 sudo_set_subnet_gamma_emission_whitelisted call (typed, named args)
const netuid = 1;
const whitelisted = true;
const tx = api.tx.AdminUtils.sudo_set_subnet_gamma_emission_whitelisted({
netuid,
whitelisted,
});Events 21
Emitted when an EVM precompile's enabled status is changed.
When it fires
- Caller is root account
- Valid precompile ID provided
Fields
| Name | Type | Format | Description |
|---|---|---|---|
precompile_id | PrecompileEnum | — | Identifier of the EVM precompile being configured |
enabled | bool | Boolean (true/false) | Whether the precompile is now enabled (true) or disabled (false) |
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 PrecompileUpdated events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.PrecompileUpdated.get(block.hash);
for (const evt of events) {
console.log("PrecompileUpdated:", evt.payload);
}
});Emitted when Yuma3 consensus is enabled or disabled for a subnet.
When it fires
- Caller is root or subnet owner
- Subnet exists
Fields
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | Subnet ID where Yuma3 was toggled |
enabled | bool | Boolean (true/false) | Whether Yuma3 consensus is now enabled (true) or disabled (false) |
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 Yuma3EnableToggled events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.Yuma3EnableToggled.get(block.hash);
for (const evt of events) {
console.log("Yuma3EnableToggled:", evt.payload);
}
});Emitted when bonds reset is enabled or disabled for a subnet.
When it fires
- Caller is root or subnet owner
- Subnet exists
Fields
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | Subnet ID where bonds reset was toggled |
enabled | bool | Boolean (true/false) | Whether bonds reset is now enabled (true) or disabled (false) |
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 BondsResetToggled events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.BondsResetToggled.get(block.hash);
for (const evt of events) {
console.log("BondsResetToggled:", evt.payload);
}
});Event emitted when the burn half-life parameter is set for a subnet.
When it fires
- Caller authorized to make changes
Fields
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
burn_half_life | u16 | Integer (0-65535) | burn_half_life (u16) |
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 BurnHalfLifeSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.BurnHalfLifeSet.get(block.hash);
for (const evt of events) {
console.log("BurnHalfLifeSet:", evt.payload);
}
});Event emitted when the burn increase multiplier is set for a subnet.
When it fires
- Caller authorized to make changes
Fields
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
burn_increase_mult | FixedU128 | — | burn_increase_mult: Unsigned substrate-fixed u64.64 via .bits codec (inner u128). Real value = bits / 2^64. Do NOT truncate to u64. |
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 BurnIncreaseMultSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.BurnIncreaseMultSet.get(block.hash);
for (const evt of events) {
console.log("BurnIncreaseMultSet:", evt.payload);
}
});Emitted when a subnet's pool-side emission switch is toggled (chain buys and pool injections).
When it fires
- sudo_set_subnet_emission_enabled succeeded
Fields
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | Subnet whose pool-side emission switch was toggled |
enabled | bool | Boolean (true/false) | Whether pool-side emission paths (chain buys, pool injections, excess_tao) are enabled |
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 SubnetEmissionEnabledSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.SubnetEmissionEnabledSet.get(block.hash);
for (const evt of events) {
console.log("SubnetEmissionEnabledSet:", evt.payload);
}
});Event emitted when the miner collateral drain ratio is set for a subnet.
When it fires
- Caller authorized to make changes
Fields
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
drain_ratio | FixedU128 | — | drain_ratio: Unsigned substrate-fixed u64.64 via .bits codec (inner u128). Real value = bits / 2^64. Do NOT truncate to u64. |
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 CollateralDrainRatioSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.CollateralDrainRatioSet.get(block.hash);
for (const evt of events) {
console.log("CollateralDrainRatioSet:", evt.payload);
}
});Emitted when governance sets BasketConcentrationCap.
When it fires
- Root origin executes sudo_set_basket_concentration_cap with cap above zero
Fields
| Name | Type | Format | Description |
|---|---|---|---|
cap | u16 | Integer (0-65535) | cap (u16) |
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 BasketConcentrationCapSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.BasketConcentrationCapSet.get(block.hash);
for (const evt of events) {
console.log("BasketConcentrationCapSet:", evt.payload);
}
});Emitted when governance enables or disables swap_basket network-wide.
When it fires
- Root origin executes sudo_set_basket_trading_enabled
Fields
| Name | Type | Format | Description |
|---|---|---|---|
enabled | bool | Boolean (true/false) | enabled (bool) |
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 BasketTradingToggled events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.BasketTradingToggled.get(block.hash);
for (const evt of events) {
console.log("BasketTradingToggled:", evt.payload);
}
});Emitted when governance freezes or unfreezes swap_basket for one validator hotkey.
When it fires
- Root origin executes sudo_set_basket_trading_frozen
Fields
| Name | Type | Format | Description |
|---|---|---|---|
hotkey | AccountId | SS58 Address | hotkey: Account address (32 bytes, SS58-encoded) |
frozen | bool | Boolean (true/false) | frozen (bool) |
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 BasketTradingFrozenSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.BasketTradingFrozenSet.get(block.hash);
for (const evt of events) {
console.log("BasketTradingFrozenSet:", evt.payload);
}
});Emitted when governance sets BasketDailyTurnoverCap.
When it fires
- Root origin executes sudo_set_basket_daily_turnover_cap with cap above zero
Fields
| Name | Type | Format | Description |
|---|---|---|---|
cap | u16 | Integer (0-65535) | cap (u16) |
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 BasketDailyTurnoverCapSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.BasketDailyTurnoverCapSet.get(block.hash);
for (const evt of events) {
console.log("BasketDailyTurnoverCapSet:", evt.payload);
}
});Emitted when governance sets BasketLiquidityCap.
When it fires
- Root origin executes sudo_set_basket_liquidity_cap with cap above zero
Fields
| Name | Type | Format | Description |
|---|---|---|---|
cap | u16 | Integer (0-65535) | cap (u16) |
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 BasketLiquidityCapSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.BasketLiquidityCapSet.get(block.hash);
for (const evt of events) {
console.log("BasketLiquidityCapSet:", evt.payload);
}
});Emitted when governance sets the four root-claim dust knobs.
When it fires
- Root origin executes sudo_set_basket_claim_dust with row_bps at most 10000
Fields
| Name | Type | Format | Description |
|---|---|---|---|
row_cap_rao | u64 | Integer | row_cap_rao (u64) |
row_bps | u16 | Integer (0-65535) | row_bps (u16) |
slice_rao | u64 | Integer | slice_rao (u64) |
forfeit_cap_rao | u64 | Integer | forfeit_cap_rao (u64) |
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 BasketClaimDustSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.BasketClaimDustSet.get(block.hash);
for (const evt of events) {
console.log("BasketClaimDustSet:", evt.payload);
}
});Emitted when root sets BasketMinTradeTao, with the new floor in rao.
When it fires
- Root origin called sudo_set_basket_min_trade_tao
Fields
| Name | Type | Format | Description |
|---|---|---|---|
min_trade_rao | u64 | Integer | min_trade_rao (u64) |
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 BasketMinTradeTaoSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.BasketMinTradeTaoSet.get(block.hash);
for (const evt of events) {
console.log("BasketMinTradeTaoSet:", evt.payload);
}
});Emitted when root writes the hashed-accounts switch. enabled is the new value of AdminUtils.HashedAccountsEnabled.
When it fires
- AdminUtils.sudo_set_hashed_accounts_enabled executed with a root origin
Fields
| Name | Type | Format | Description |
|---|---|---|---|
enabled | bool | Boolean (true/false) | enabled (bool) |
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 HashedAccountsToggled events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.HashedAccountsToggled.get(block.hash);
for (const evt of events) {
console.log("HashedAccountsToggled:", evt.payload);
}
});Emitted when root sets or removes the TAO/USD price oracle account.
When it fires
- sudo_set_tao_usd_price_oracle was dispatched with root origin
Fields
| Name | Type | Format | Description |
|---|---|---|---|
oracle | Option | — | oracle: optional Account address (32 bytes, SS58-encoded) |
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 TaoUsdPriceOracleSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.TaoUsdPriceOracleSet.get(block.hash);
for (const evt of events) {
console.log("TaoUsdPriceOracleSet:", evt.payload);
}
});Emitted when the subnet owner or root enables or disables gamma minting on a subnet.
When it fires
- sudo_set_subnet_gamma_enabled passed its origin, rate-limit and admin-freeze-window checks
- The subnet exists and is not the root subnet
Fields
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
enabled | bool | Boolean (true/false) | enabled (bool) |
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 SubnetGammaEnabledSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.SubnetGammaEnabledSet.get(block.hash);
for (const evt of events) {
console.log("SubnetGammaEnabledSet:", evt.payload);
}
});Emitted when root enables or disables gamma minting network-wide.
When it fires
- sudo_set_gamma_enabled was dispatched with root origin
Fields
| Name | Type | Format | Description |
|---|---|---|---|
enabled | bool | Boolean (true/false) | enabled (bool) |
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 GammaEnabledSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.GammaEnabledSet.get(block.hash);
for (const evt of events) {
console.log("GammaEnabledSet:", evt.payload);
}
});Emitted when root sets the reserve taken for each new hashed, ML-DSA, Falcon or protected derived account. value is the new amount in RAO (TaoBalance, u64).
When it fires
- AdminUtils.sudo_set_hashed_account_registration_deposit executed with a root origin
Fields
| Name | Type | Format | Description |
|---|---|---|---|
value | TaoBalance | — | value: TAO amount in RAO (÷10⁹ for TAO) |
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 HashedAccountRegistrationDepositSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.HashedAccountRegistrationDepositSet.get(block.hash);
for (const evt of events) {
console.log("HashedAccountRegistrationDepositSet:", evt.payload);
}
});Emitted when root adds a subnet to, or removes it from, the whitelist of gamma emission targets.
When it fires
- AdminUtils.sudo_set_subnet_gamma_emission_whitelisted was called with root origin
- The subnet exists and is not the root subnet
Fields
| Name | Type | Format | Description |
|---|---|---|---|
netuid | NetUid | — | netuid: Subnet ID (u16, 0-65535) |
whitelisted | bool | Boolean (true/false) | whitelisted (bool) |
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 SubnetGammaEmissionWhitelistedSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.AdminUtils.SubnetGammaEmissionWhitelistedSet.get(block.hash);
for (const evt of events) {
console.log("SubnetGammaEmissionWhitelistedSet:", evt.payload);
}
});Storage 2
Network-wide switch for hashed accounts. VALUE bool, source default false. True allows registration and signing for classical hashed, ML-DSA, Falcon and protected derived accounts.
bool (Boolean (true/false))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);
// Query HashedAccountsEnabled storage (no keys - plain value)
const result = await api.query.AdminUtils.HashedAccountsEnabled.getValue();
console.log("HashedAccountsEnabled:", result);Enable/disable state for EVM precompiles.
bool (Boolean (true/false))Keys
| Name | Type | Format | Description |
|---|---|---|---|
key1 | PrecompileEnum | — | — |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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);
// Query PrecompileEnable storage
const key1 = undefined as any /* PrecompileEnum — replace with real value */;
const result = await api.query.AdminUtils.PrecompileEnable.getValue(key1);
console.log("PrecompileEnable:", result);Errors 17
The specified subnet (netuid) does not exist on the network.
Common Causes
- Using an invalid or non-existent netuid
- Subnet was dissolved before the operation
- Typo in the netuid parameter
How to Fix
Query SubtensorModule.NetworksAdded to verify the subnet exists,Use a valid netuid from the active subnets list,Check if the subnet was recently removed
The max_validators parameter cannot exceed max_allowed_uids for a subnet.
Common Causes
- Setting max_validators higher than the subnet's max_allowed_uids
- Not checking current max_allowed_uids before setting validators
How to Fix
Query SubtensorModule.MaxAllowedUids for the subnet's current limit,Set max_validators to a value <= max_allowed_uids,Increase max_allowed_uids first if you need more validators
Cannot reduce max_allowed_uids below the current number of registered neurons.
Common Causes
- Trying to shrink a subnet that already has more neurons registered than the new limit
- Not checking current neuron count before reducing max_allowed_uids
How to Fix
Query SubtensorModule.SubnetworkN to check current neuron count,Set max_allowed_uids >= current neuron count,Wait for neurons to deregister naturally, or remove them first
The bonds moving average parameter exceeds the maximum allowed value.
Common Causes
- Setting bonds_moving_average above the protocol maximum
- Using an out-of-range value for the smoothing parameter
How to Fix
Use a bonds_moving_average value within the allowed range,Check documentation for valid parameter bounds
The sigmoid steepness parameter cannot be negative.
Common Causes
- Providing a negative value for sigmoid steepness
- Integer overflow resulting in negative interpretation
How to Fix
Use a positive value for sigmoid steepness,Check for integer overflow in parameter calculation
The provided parameter value is outside the acceptable range.
Common Causes
- Value too high or too low for the specific parameter
- Not checking parameter bounds before submitting
- Using percentages instead of the expected raw encoding (u16-normalized ratios, RAO, block counts)
How to Fix
Check the valid range for the specific parameter being set,Ensure value is within min/max bounds,Verify you're using the correct units (RAO vs TAO, u16-normalized ratio vs percentage)
Cannot set min_allowed_uids higher than the current number of registered neurons.
Common Causes
- Trying to set a minimum that exceeds current registration
- Not checking current neuron count before setting minimum
How to Fix
Query SubtensorModule.SubnetworkN for current neuron count,Set min_allowed_uids <= current neuron count,Wait for more neurons to register first
The min_allowed_uids cannot be greater than max_allowed_uids.
Common Causes
- Setting minimum higher than maximum
- Updating one bound without considering the other
How to Fix
Ensure min_allowed_uids <= max_allowed_uids,Update both bounds together if needed,Query current bounds before making changes
The max_allowed_uids cannot be less than min_allowed_uids.
Common Causes
- Reducing maximum below the current minimum
- Updating one bound without considering the other
How to Fix
Ensure max_allowed_uids >= min_allowed_uids,Reduce min_allowed_uids first if you need a lower max,Query current bounds before making changes
Cannot set max_allowed_uids above the network-wide default maximum.
Common Causes
- Trying to make a subnet larger than the global maximum allows
- Not checking the default max before setting subnet max
How to Fix
Query the default max_allowed_uids parameter,Set max_allowed_uids <= default maximum,Request increase to default max if larger subnets are needed
The provided value is invalid for this administrative operation.
Common Causes
- Value doesn't meet validation criteria
- Wrong data type or format
- Value conflicts with other parameters
How to Fix
Check the specific call documentation for valid values,Ensure value meets all validation requirements,Verify no conflicts with related parameters
Operation is not permitted on the root network.
Common Causes
- Signing with the wrong key (e.g., hotkey instead of coldkey)
- Parameter value outside acceptable range
- Operation requires sudo or specific owner account
How to Fix
Check which key should sign: most staking ops need coldkey, weight ops need hotkey,Verify parameter ranges match the expected constraints,For owner-only calls, confirm you own the target resource
POW Registration has been deprecated
How to Fix
Call is deprecated
How to Fix
The collateral drain ratio must be positive and at most the settable maximum.
How to Fix
A GRANDPA authority-set change was submitted with a non-zero delay. The runtime only accepts changes that take effect at the end of the current block.
Common Causes
- in_blocks was passed as something other than zero
- Porting a call from a chain that schedules authority-set changes some blocks ahead
How to Fix
Pass zero for in_blocks,Schedule the surrounding operation rather than the authority change, if the change needs to land later