diff --git a/docs/btcli/btcli.md b/docs/btcli/btcli.md index 4e28b33b3..13ce73572 100644 --- a/docs/btcli/btcli.md +++ b/docs/btcli/btcli.md @@ -32,18 +32,18 @@ btcli [OPTIONS] COMMAND [ARGS]... **Commands**: -- `config`: Config commands, aliases: `c`, `conf` -- `wallet`: Wallet commands, aliases: `wallets`, `w` -- `stake`: Stake commands, alias: `st` -- `sudo`: Sudo commands, alias: `su` -- `subnets`: Subnets commands, alias: `s`, `subnet` -- `weights`: Weights commands, aliases: `wt`, `weight` -- `proxy`: Proxy commands -- `crowd`: Crowdloan commands, aliases: `cr`, `crowdloan` -- `liquidity`: Liquidity commands, aliases: `l` -- `axon`: Axon serving commands -- `utils` -- `view`: HTML view commands +- [`config`](#btcli-config): Config commands, aliases: `c`, `conf` +- [`wallet`](#btcli-wallet): Wallet commands, aliases: `wallets`, `w` +- [`stake`](#btcli-stake): Stake commands, alias: `st` +- [`sudo`](#btcli-sudo): Sudo commands, alias: `su` +- [`subnets`](#btcli-subnets): Subnets commands, alias: `s`, `subnet` +- [`weights`](#btcli-weights): Weights commands, aliases: `wt`, `weight` +- [`proxy`](#btcli-proxy): Proxy commands +- [`crowd`](#btcli-crowd): Crowdloan commands, aliases: `cr`, `crowdloan` +- [`liquidity`](#btcli-liquidity): Liquidity commands, aliases: `l` +- [`axon`](#btcli-axon): Axon serving commands +- [`utils`](#btcli-utils) +- [`view`](#btcli-view): HTML view commands ## `btcli config` diff --git a/docs/errors/subtensor.md b/docs/errors/subtensor.md index 2d5edfb55..412f3e4ff 100644 --- a/docs/errors/subtensor.md +++ b/docs/errors/subtensor.md @@ -12,6 +12,10 @@ Related: - [Subtensor Custom Errors](./custom.md) - [Substrate Errors](https://polkadot.js.org/docs/substrate/errors/) - Errors from the underlying Substrate framework +:::info +The following outline of subtensor errors is provided for high-level reference and is not exhaustive. For a complete specification of all available errors, see the [Subtensor API reference](../subtensor-api/errors.md). +::: + ## Network and Subnet Errors ### `SubNetworkDoesNotExist` diff --git a/docs/navigating-subtensor/subtensor-extrinsics.md b/docs/navigating-subtensor/subtensor-extrinsics.md new file mode 100644 index 000000000..ddb8b2437 --- /dev/null +++ b/docs/navigating-subtensor/subtensor-extrinsics.md @@ -0,0 +1,464 @@ +--- +title: "Subtensor Pallets and Extrinsics" +--- + +# Subtensor Pallets and Extrinsics + +This document covers the dispatchable calls of all pallets included in the Subtensor runtime. For each pallet, it lists the call methods and their arguments. + +## Overview + +The Subtensor blockchain is built on the Substrate blockchain framework. The framework's development environment includes modules called pallets that define the core logic of the runtime and can be used, modified, or extended to implement the functionality required by the chain. + +Each pallet exposes functions that users or other parts of the system can call. These calls execute successfully as long as the caller has the required permissions. Because these calls originate outside the blockchain runtime, they are called _extrinsics_. + +For example, the Subtensor pallet contains functions related to Bittensor network operations, such as neuron registration, staking, or subnet management. When a user calls one of these functions—using BTCLI or another client interface—they submit an extrinsic to the chain. Some extrinsics may also trigger events on-chain, such as confirming a successful registration or updating staking balances. + +## Subtensor runtime pallets + +The Subtensor runtime is composed of multiple pallets that collectively define the behavior of the Bittensor blockchain. Each pallet manages a specific domain of the protocol. This section provides a reference table of Subtensor pallets, including their pallet indices and corresponding Rust crates. + +The runtime includes these pallets: + +| Index | Pallet name | Crate | +| ----- | -------------------------- | -------------------------------------------- | +| 0 | `System` | `frame_system` | +| 1 | `RandomnessCollectiveFlip` | `pallet_insecure_randomness_collective_flip` | +| 2 | `Timestamp` | `pallet_timestamp` | +| 3 | `Aura` | `pallet_aura` | +| 4 | `Grandpa` | `pallet_grandpa` | +| 5 | `Balances` | `pallet_balances` | +| 6 | `TransactionPayment` | `pallet_transaction_payment` | +| 7 | `SubtensorModule` | `pallet_subtensor` | +| 11 | `Utility` | `pallet_utility` | +| 12 | `Sudo` | `pallet_sudo` | +| 13 | `Multisig` | `pallet_multisig` | +| 14 | `Preimage` | `pallet_preimage` | +| 15 | `Scheduler` | `pallet_scheduler` | +| 16 | `Proxy` | `pallet_subtensor_proxy` | +| 17 | `Registry` | `pallet_registry` | +| 18 | `Commitments` | `pallet_commitments` | +| 19 | `AdminUtils` | `pallet_admin_utils` | +| 20 | `SafeMode` | `pallet_safe_mode` | +| 21 | `Ethereum` | `pallet_ethereum` | +| 22 | `EVM` | `pallet_evm` | +| 23 | `EVMChainId` | `pallet_evm_chain_id` | +| 25 | `BaseFee` | `pallet_base_fee` | +| 26 | `Drand` | `pallet_drand` | +| 27 | `Crowdloan` | `pallet_crowdloan` | +| 28 | `Swap` | `pallet_subtensor_swap` | +| 29 | `Contracts` | `pallet_contracts` | +| 30 | `MevShield` | `pallet_shield` | + +Below are key extrinsics from pallets included in the Subtensor runtime: + +:::info +The following outline of subtensor extrinsics is provided for high-level reference and is not exhaustive. For a complete specification of all available extrinsics and their associated parameters, see the [Subtensor API reference](../subtensor-api/extrinsics.md). +::: + +### `AdminUtils` + +Root and subnet-owner configuration: subnet hyperparameters, issuance, EVM, authorities. Most calls require root or subnet owner. + +| Method | Arguments | +| --------------------------------------------- | --------------------------------------------- | +| `swap_authorities` | `new_authorities` | +| `sudo_set_default_take` | `default_take` | +| `sudo_set_tx_rate_limit` | `tx_rate_limit` | +| `sudo_set_serving_rate_limit` | `netuid`, `serving_rate_limit` | +| `sudo_set_min_difficulty` | `netuid`, `min_difficulty` | +| `sudo_set_max_difficulty` | `netuid`, `max_difficulty` | +| `sudo_set_weights_version_key` | `netuid`, `weights_version_key` | +| `sudo_set_weights_set_rate_limit` | `netuid`, `weights_set_rate_limit` | +| `sudo_set_adjustment_interval` | `netuid`, `adjustment_interval` | +| `sudo_set_adjustment_alpha` | `netuid`, `adjustment_alpha` | +| `sudo_set_immunity_period` | `netuid`, `immunity_period` | +| `sudo_set_min_allowed_weights` | `netuid`, `min_allowed_weights` | +| `sudo_set_max_allowed_uids` | `netuid`, `max_allowed_uids` | +| `sudo_set_kappa` | `netuid`, `kappa` | +| `sudo_set_rho` | `netuid`, `rho` | +| `sudo_set_activity_cutoff` | `netuid`, `activity_cutoff` | +| `sudo_set_network_registration_allowed` | `netuid`, `registration_allowed` | +| `sudo_set_network_pow_registration_allowed` | `netuid`, `registration_allowed` | +| `sudo_set_target_registrations_per_interval` | `netuid`, `target_registrations_per_interval` | +| `sudo_set_min_burn` | `netuid`, `min_burn` | +| `sudo_set_max_burn` | `netuid`, `max_burn` | +| `sudo_set_difficulty` | `netuid`, `difficulty` | +| `sudo_set_max_allowed_validators` | `netuid`, `max_allowed_validators` | +| `sudo_set_bonds_moving_average` | `netuid`, `bonds_moving_average` | +| `sudo_set_bonds_penalty` | `netuid`, `bonds_penalty` | +| `sudo_set_max_registrations_per_block` | `netuid`, `max_registrations_per_block` | +| `sudo_set_subnet_owner_cut` | `subnet_owner_cut` | +| `sudo_set_network_rate_limit` | `rate_limit` | +| `sudo_set_tempo` | `netuid`, `tempo` | +| `sudo_set_total_issuance` | `total_issuance` | +| `sudo_set_network_immunity_period` | `immunity_period` | +| `sudo_set_network_min_lock_cost` | `lock_cost` | +| `sudo_set_subnet_limit` | `max_subnets` | +| `sudo_set_lock_reduction_interval` | `interval` | +| `sudo_set_rao_recycled` | `netuid`, `rao_recycled` | +| `sudo_set_stake_threshold` | `min_stake` | +| `sudo_set_nominator_min_required_stake` | `min_stake` | +| `sudo_set_tx_delegate_take_rate_limit` | `tx_rate_limit` | +| `sudo_set_min_delegate_take` | `take` | +| `sudo_set_commit_reveal_weights_enabled` | `netuid`, `enabled` | +| `sudo_set_liquid_alpha_enabled` | `netuid`, `enabled` | +| `sudo_set_alpha_values` | `netuid`, `alpha_low`, `alpha_high` | +| `sudo_set_dissolve_network_schedule_duration` | `duration` | +| `sudo_set_commit_reveal_weights_interval` | `netuid`, `interval` | +| `sudo_set_evm_chain_id` | `chain_id` | +| `schedule_grandpa_change` | `next_authorities`, `in_blocks`, `forced` | +| `sudo_set_toggle_transfer` | `netuid`, `toggle` | +| `sudo_set_recycle_or_burn` | `netuid`, `recycle_or_burn` | +| `sudo_toggle_evm_precompile` | `precompile_id`, `enabled` | +| `sudo_set_subnet_moving_alpha` | `alpha` | +| `sudo_set_subnet_owner_hotkey` | `netuid`, `hotkey` | +| `sudo_set_ema_price_halving_period` | `netuid`, `ema_halving` | +| `sudo_set_alpha_sigmoid_steepness` | `netuid`, `steepness` | +| `sudo_set_yuma3_enabled` | `netuid`, `enabled` | +| `sudo_set_bonds_reset_enabled` | `netuid`, `enabled` | +| `sudo_set_sn_owner_hotkey` | `netuid`, `hotkey` | +| `sudo_set_subtoken_enabled` | `netuid`, `subtoken_enabled` | +| `sudo_set_commit_reveal_version` | `version` | +| `sudo_set_owner_immune_neuron_limit` | `netuid`, `immune_neurons` | +| `sudo_set_ck_burn` | `burn` | +| `sudo_set_admin_freeze_window` | `window` | +| `sudo_set_owner_hparam_rate_limit` | `epochs` | +| `sudo_set_mechanism_count` | `netuid`, `mechanism_count` | +| `sudo_set_mechanism_emission_split` | `netuid`, `maybe_split` | +| `sudo_trim_to_max_allowed_uids` | `netuid`, `max_n` | +| `sudo_set_min_allowed_uids` | `netuid`, `min_allowed_uids` | +| `sudo_set_tao_flow_cutoff` | `flow_cutoff` | +| `sudo_set_tao_flow_normalization_exponent` | `exponent` | +| `sudo_set_tao_flow_smoothing_factor` | `smoothing_factor` | +| `sudo_set_min_non_immune_uids` | `netuid`, `min` | +| `sudo_set_start_call_delay` | `delay` | +| `sudo_set_coldkey_swap_announcement_delay` | `duration` | +| `sudo_set_coldkey_swap_reannouncement_delay` | `duration` | +| `sudo_set_max_mechanism_count` | `max_mechanism_count` | + +### `Balances` + +TAO transfers and balance operations. + +| Method | Arguments | +| ----------------------------- | ------------------------- | +| `transfer_allow_death` | `dest`, `value` | +| `force_transfer` | `source`, `dest`, `value` | +| `transfer_keep_alive` | `dest`, `value` | +| `transfer_all` | `dest`, `keep_alive` | +| `force_unreserve` | `who`, `amount` | +| `upgrade_accounts` | `who` | +| `force_set_balance` | `who`, `new_free` | +| `force_adjust_total_issuance` | `direction`, `delta` | +| `burn` | `value`, `keep_alive` | + +### `BaseFee` + +Base fee configuration for EVM-style transactions. + +| Method | Arguments | +| ---------------------- | ------------ | +| `set_base_fee_per_gas` | `new` | +| `set_elasticity` | `elasticity` | + +### `Commitments` + +Commitment/reveal data for subtensor (e.g. registration). + +| Method | Arguments | +| ---------------- | ---------------- | +| `set_commitment` | `netuid`, `info` | +| `set_max_space` | `new_limit` | + +### `Contracts` + +WASM smart contracts. + +| Method | Arguments | +| ----------------------- | -------------------------------------------------------------------------- | +| `instantiate_with_code` | `value`, `gas_limit`, `storage_deposit_limit`, `code`, `data`, `salt` | +| `instantiate` | `value`, `gas_limit`, `storage_deposit_limit`, `code_hash`, `data`, `salt` | +| `call` | `dest`, `value`, `gas_limit`, `storage_deposit_limit`, `data` | +| `upload_code` | `code`, `storage_deposit_limit`, `determinism` | +| `remove_code` | `code_hash` | +| `set_code` | `dest`, `code_hash` | + +### `Crowdloan` + +Crowdloans and subnet leasing. + +| Method | Arguments | +| ------------------------- | --------------------------------------------------- | +| `create` | `deposit`, `min_contribution`, `cap`, `end`, `call` | +| `contribute` | `crowdloan_id`, `amount` | +| `withdraw` | `crowdloan_id` | +| `finalize` | `crowdloan_id` | +| `refund` | `crowdloan_id` | +| `dissolve` | `crowdloan_id` | +| `update_min_contribution` | `crowdloan_id`, `new_min_contribution` | +| `update_end` | `crowdloan_id`, `new_end` | +| `update_cap` | `crowdloan_id`, `new_cap` | + +### `Drand` + +Drand randomness beacon. + +| Method | Arguments | +| ------------------------- | ------------------------------ | +| `write_pulse` | `pulses_payload`, `_signature` | +| `set_beacon_config` | `config_payload`, `_signature` | +| `set_oldest_stored_round` | `oldest_round` | + +### `Ethereum` + +Ethereum transaction compatibility (Frontier). + +| Method | Arguments | +| ---------- | ------------- | +| `transact` | `transaction` | + +### `EVM` + +EVM execution and bridge to Substrate accounts. + +| Method | Arguments | +| ---------- | --------------------------------------------------------------------------------------------------------- | +| `call` | `source`, `target`, `input`, `value`, `gas_limit`, `max_fee_per_gas`, `max_priority_fee_per_gas`, `nonce` | +| `create` | `source`, `init`, `value`, `gas_limit`, `max_fee_per_gas`, `max_priority_fee_per_gas`, `nonce` | +| `withdraw` | `address`, `value` | + +### `Grandpa` + +Finality gadget; authority changes are triggered via `AdminUtils::schedule_grandpa_change`. + +| Method | Arguments | +| ------------------------------ | --------------------------------------- | +| `note_stalled` | `delay`, `best_finalized_block_number` | +| `report_equivocation` | `equivocation_proof`, `key_owner_proof` | +| `report_equivocation_unsigned` | `equivocation_proof`, `key_owner_proof` | + +### `MevShield` + +MEV protection / encrypted transactions. + +| Method | Arguments | +| ------------------- | ------------ | +| `announce_next_key` | `enc_key` | +| `submit_encrypted` | `ciphertext` | + +### `Multisig` + +Multi-signature approvals around arbitrary calls. + +| Method | Arguments | +| ---------------------- | ------------------------------------------------------------------------------ | +| `as_multi` | `threshold`, `other_signatories`, `maybe_timepoint`, `call`, `max_weight` | +| `as_multi_threshold_1` | `other_signatories`, `call` | +| `approve_as_multi` | `threshold`, `other_signatories`, `maybe_timepoint`, `call_hash`, `max_weight` | +| `cancel_as_multi` | `threshold`, `other_signatories`, `timepoint`, `call_hash` | +| `poke_deposit` | `threshold`, `other_signatories`, `call_hash` | + +### `Preimage` + +Preimage management for governance / other pallets. + +| Method | Arguments | +| -------------------- | --------- | +| `note_preimage` | `bytes` | +| `unnote_preimage` | `hash` | +| `request_preimage` | `hash` | +| `unrequest_preimage` | `hash` | +| `ensure_updated` | `hashes` | + +### `Proxy` + +Proxy and delegate management. + +| Method | Arguments | +| --------------------- | ------------------------------------------------------- | +| `proxy` | `real`, `force_proxy_type`, `call` | +| `add_proxy` | `delegate`, `proxy_type`, `delay` | +| `remove_proxy` | `delegate`, `proxy_type`, `delay` | +| `remove_proxies` | — | +| `create_pure` | `proxy_type`, `delay`, `index` | +| `kill_pure` | `spawner`, `proxy_type`, `index`, `height`, `ext_index` | +| `announce` | `real`, `call_hash` | +| `remove_announcement` | `real`, `call_hash` | +| `reject_announcement` | `delegate`, `call_hash` | +| `proxy_announced` | `delegate`, `real`, `force_proxy_type`, `call` | +| `poke_deposit` | — | +| `set_real_pays_fee` | `delegate`, `pays_fee` | + +### `Registry` + +On-chain identity (Registry identity, not Subtensor neuron identity). + +| Method | Arguments | +| ---------------- | -------------------- | +| `set_identity` | `identified`, `info` | +| `clear_identity` | `identified` | + +### `SafeMode` + +Chain safety controls (emergency switch-style behavior). + +| Method | Arguments | +| ------------- | --------- | +| `enter` | — | +| `extend` | — | +| `force_enter` | — | +| `force_exit` | — | + +### `Scheduler` + +Schedule calls for future execution. + +| Method | Arguments | +| ---------------- | -------------------------------------------------- | +| `schedule` | `when`, `maybe_periodic`, `priority`, `call` | +| `cancel` | `when`, `index` | +| `schedule_named` | `id`, `when`, `maybe_periodic`, `priority`, `call` | +| `cancel_named` | `id` | + +### `SubtensorModule` + +Core Bittensor logic: subnets, registration, staking, weights, serving, Alpha/TAO operations. + +| Method | Arguments | +| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `set_weights` | `netuid`, `dests`, `weights`, `version_key` | +| `set_mechanism_weights` | `netuid`, `mecid`, `dests`, `weights`, `version_key` | +| `batch_set_weights` | `netuids`, `weights`, `version_keys` | +| `commit_weights` | `netuid`, `commit_hash` | +| `commit_mechanism_weights` | `netuid`, `mecid`, `commit_hash` | +| `batch_commit_weights` | `netuids`, `commit_hashes` | +| `reveal_weights` | `netuid`, `uids`, `values`, `salt`, `version_key` | +| `reveal_mechanism_weights` | `netuid`, `mecid`, `uids`, `values`, `salt`, `version_key` | +| `commit_crv3_mechanism_weights` | `netuid`, `mecid`, `commit`, `reveal_round` | +| `batch_reveal_weights` | `netuid`, `uids_list`, `values_list`, `salts_list`, `version_keys` | +| `commit_timelocked_weights` | `netuid`, `commit`, `reveal_round`, `commit_reveal_version` | +| `commit_timelocked_mechanism_weights` | `netuid`, `mecid`, `commit`, `reveal_round`, `commit_reveal_version` | +| `add_stake` | `hotkey`, `netuid`, `amount_staked` | +| `add_stake_limit` | `hotkey`, `netuid`, `amount_staked`, `limit_price`, `allow_partial` | +| `remove_stake` | `hotkey`, `netuid`, `amount_unstaked` | +| `remove_stake_limit` | `hotkey`, `netuid`, `amount_unstaked`, `limit_price`, `allow_partial` | +| `remove_stake_full_limit` | `hotkey`, `netuid`, `limit_price` | +| `move_stake` | `origin_hotkey`, `destination_hotkey`, `origin_netuid`, `destination_netuid`, `alpha_amount` | +| `transfer_stake` | `destination_coldkey`, `hotkey`, `origin_netuid`, `destination_netuid`, `alpha_amount` | +| `swap_stake` | `hotkey`, `origin_netuid`, `destination_netuid`, `alpha_amount` | +| `swap_stake_limit` | `hotkey`, `origin_netuid`, `destination_netuid`, `alpha_amount`, `limit_price` | +| `unstake_all` | `hotkey` | +| `unstake_all_alpha` | `hotkey` | +| `add_stake_burn` | `hotkey`, `netuid`, `amount`, `limit` | +| `decrease_take` | `hotkey`, `take` | +| `increase_take` | `hotkey`, `take` | +| `serve_axon` | `netuid`, `version`, `ip`, `port`, `ip_type`, `protocol`, `placeholder1`, `placeholder2` | +| `serve_axon_tls` | `netuid`, `version`, `ip`, `port`, `ip_type`, `protocol`, `placeholder1`, `placeholder2`, `certificate` | +| `serve_prometheus` | `netuid`, `version`, `ip`, `port`, `ip_type` | +| `register` | `netuid`, `block_number`, `nonce`, `work`, `hotkey` | +| `root_register` | `hotkey` | +| `burned_register` | `netuid`, `hotkey` | +| `register_network` | `hotkey` | +| `register_network_with_identity` | `hotkey`, `identity` | +| `dissolve_network` | `_coldkey`, `netuid` | +| `root_dissolve_network` | `netuid` | +| `faucet` | `block_number`, `nonce`, `work` | +| `start_call` | `netuid` | +| `update_symbol` | `netuid`, `symbol` | +| `swap_hotkey` | `hotkey`, `new_hotkey`, `netuid` | +| `swap_coldkey` | `old_coldkey`, `new_coldkey`, `swap_cost` | +| `announce_coldkey_swap` | `new_coldkey_hash` | +| `swap_coldkey_announced` | `new_coldkey` | +| `dispute_coldkey_swap` | — | +| `reset_coldkey_swap` | `coldkey` | +| `clear_coldkey_swap_announcement` | - | +| `set_identity` | `name`, `url`, `github_repo`, `image`, `discord`, `description`, `additional` | +| `set_subnet_identity` | `netuid`, `subnet_name`, `github_repo`, `subnet_contact`, `subnet_url`, `discord`, `description`, `logo_url`, `additional` | +| `set_children` | `hotkey`, `netuid`, `children` | +| `set_childkey_take` | `hotkey`, `netuid`, `take` | +| `try_associate_hotkey` | `hotkey` | +| `associate_evm_key` | `netuid`, `evm_key`, `block_number`, `signature` | +| `schedule_swap_coldkey` | `_new_coldkey` — **Deprecated** | +| `set_pending_childkey_cooldown` | `cooldown` | +| `sudo_set_tx_childkey_take_rate_limit` | `tx_rate_limit` | +| `sudo_set_min_childkey_take` | `take` | +| `sudo_set_max_childkey_take` | `take` | +| `recycle_alpha` | `hotkey`, `amount`, `netuid` | +| `burn_alpha` | `hotkey`, `amount`, `netuid` | +| `register_leased_network` | `emissions_share`, `end_block` | +| `terminate_lease` | `lease_id`, `hotkey` | +| `claim_root` | `subnets` | +| `set_root_claim_type` | `new_root_claim_type` | +| `set_coldkey_auto_stake_hotkey` | `netuid`, `hotkey` | +| `sudo_set_num_root_claims` | `new_value` | +| `sudo_set_root_claim_threshold` | `netuid`, `new_value` | +| `sudo_set_voting_power_ema_alpha` | `netuid`, `alpha` | +| `enable_voting_power_tracking` | `netuid` | +| `disable_voting_power_tracking` | `netuid` | + +### `Sudo` + +Root-only superuser dispatch. + +| Method | Arguments | +| ----------------------- | ---------------- | +| `sudo` | `call` | +| `sudo_unchecked_weight` | `call`, `weight` | +| `set_key` | `new` | +| `sudo_as` | `who`, `call` | +| `remove_key` | — | + +### `Swap` + +TAO/Alpha AMM and liquidity. + +| Method | Arguments | +| ----------------------- | ------------------------------------------------------------- | +| `set_fee_rate` | `netuid`, `rate` | +| `toggle_user_liquidity` | `netuid`, `enable` | +| `add_liquidity` | `_hotkey`, `_netuid`, `_tick_low`, `_tick_high`, `_liquidity` | +| `remove_liquidity` | `hotkey`, `netuid`, `position_id` | +| `modify_position` | `hotkey`, `netuid`, `position_id`, `liquidity_delta` | +| `disable_lp` | — | + +### `System` + +Core system pallet for accounts, blocks, and execution. + +| Method | Arguments | +| ---------------------------------- | ------------------- | +| `remark` | `remark` | +| `set_heap_pages` | `pages` | +| `set_code` | `code` | +| `set_code_without_checks` | `code` | +| `set_storage` | `items` | +| `kill_storage` | `keys` | +| `kill_prefix` | `prefix`, `subkeys` | +| `remark_with_event` | `remark` | +| `authorize_upgrade` | `code_hash` | +| `authorize_upgrade_without_checks` | `code_hash` | +| `apply_authorized_upgrade` | `code` | + +### `Timestamp` + +Block timestamp management. + +| Method | Arguments | +| ------ | --------- | +| `set` | `now` | + +### `Utility` + +Batch and dispatch helpers. + +| Method | Arguments | +| ---------------------- | ------------------- | +| `batch` | `calls` | +| `as_derivative` | `index`, `call` | +| `batch_all` | `calls` | +| `dispatch_as` | `as_origin`, `call` | +| `force_batch` | `calls` | +| `with_weight` | `call`, `weight` | +| `if_else` | `main`, `fallback` | +| `dispatch_as_fallible` | `as_origin`, `call` | diff --git a/docs/subtensor-api/constants.md b/docs/subtensor-api/constants.md new file mode 100644 index 000000000..3a7057d13 --- /dev/null +++ b/docs/subtensor-api/constants.md @@ -0,0 +1,913 @@ +# Constants + +Compile-time runtime constants for the Bittensor (Subtensor) runtime. Accessible via `api.consts..`. Values read live from node. + +:::info +Generated from a live snapshot of the Subtensor runtime on **2026-04-02**. Connected to: `wss://entrypoint-finney.opentensor.ai:443` +::: + + +- **[aura](#aura)** +- **[balances](#balances)** +- **[commitments](#commitments)** +- **[contracts](#contracts)** +- **[crowdloan](#crowdloan)** +- **[drand](#drand)** +- **[grandpa](#grandpa)** +- **[multisig](#multisig)** +- **[proxy](#proxy)** +- **[registry](#registry)** +- **[safeMode](#safemode)** +- **[scheduler](#scheduler)** +- **[subtensorModule](#subtensormodule)** +- **[swap](#swap)** +- **[system](#system)** +- **[timestamp](#timestamp)** +- **[transactionPayment](#transactionpayment)** +- **[utility](#utility)** + +## `aura` + +### `slotDuration`: `u64` + +- **interface**: `api.consts.aura.slotDuration` +- **value**: `12000` +- **summary**: The slot duration Aura should run with, expressed in milliseconds. The effective value of this type should not change while the chain is running. + + For backwards compatibility either use [`MinimumPeriodTimesTwo`] or a const. + + +## `balances` + +### `existentialDeposit`: `u64` + +- **interface**: `api.consts.balances.existentialDeposit` +- **value**: `500` +- **summary**: The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO! + + If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for this pallet. However, you do so at your own risk: this will open up a major DoS vector. In case you have multiple sources of provider references, you may also get unexpected behaviour if you set this to zero. + + Bottom line: Do yourself a favour and make it at least one! + +### `maxFreezes`: `u32` + +- **interface**: `api.consts.balances.maxFreezes` +- **value**: `50` +- **summary**: The maximum number of individual freeze locks that can exist on an account at any time. + +### `maxLocks`: `u32` + +- **interface**: `api.consts.balances.maxLocks` +- **value**: `50` +- **summary**: The maximum number of locks that should exist on an account. Not strictly enforced, but used for weight estimation. + + Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/` + +### `maxReserves`: `u32` + +- **interface**: `api.consts.balances.maxReserves` +- **value**: `50` +- **summary**: The maximum number of named reserves that can exist on an account. + + Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/` + + +## `commitments` + +### `fieldDeposit`: `u64` + +- **interface**: `api.consts.commitments.fieldDeposit` +- **value**: `0` +- **summary**: The amount held on deposit per additional field for a registered identity. + +### `initialDeposit`: `u64` + +- **interface**: `api.consts.commitments.initialDeposit` +- **value**: `0` +- **summary**: The amount held on deposit for a registered identity + +### `maxFields`: `u32` + +- **interface**: `api.consts.commitments.maxFields` +- **value**: `3` +- **summary**: The maximum number of additional fields that can be added to a commitment + + +## `contracts` + +### `apiVersion`: `u16` + +- **interface**: `api.consts.contracts.apiVersion` +- **value**: `4` +- **summary**: The version of the HostFn APIs that are available in the runtime. + + Only valid value is `()`. + +### `codeHashLockupDepositPercent`: `Perbill` + +- **interface**: `api.consts.contracts.codeHashLockupDepositPercent` +- **value**: `300000000` +- **summary**: The percentage of the storage deposit that should be held for using a code hash. Instantiating a contract, or calling [`chain_extension::Ext::lock_delegate_dependency`] protects the code from being removed. In order to prevent abuse these actions are protected with a percentage of the code deposit. + +### `defaultDepositLimit`: `u64` + +- **interface**: `api.consts.contracts.defaultDepositLimit` +- **value**: `31534080` +- **summary**: Fallback value to limit the storage deposit if it's not being set by the caller. + +### `depositPerByte`: `u64` + +- **interface**: `api.consts.contracts.depositPerByte` +- **value**: `30` +- **summary**: The amount of balance a caller has to pay for each byte of storage. + + **Note:** + + Changing this value for an existing chain might need a storage migration. + +### `depositPerItem`: `u64` + +- **interface**: `api.consts.contracts.depositPerItem` +- **value**: `75` +- **summary**: The amount of balance a caller has to pay for each storage item. + + **Note:** + + Changing this value for an existing chain might need a storage migration. + +### `environment`: `{"_alias":{"hash_":"hash"},"accountId":"Null","balance":"PalletContractsEnvironmentType","hash_":"PalletContractsEnvironmentTypeH256","hasher":"PalletContractsEnvironmentTypeBlakeTwo256","timestamp":"PalletContractsEnvironmentTypeU64","blockNumber":"PalletContractsEnvironmentTypeU32"}` + +- **interface**: `api.consts.contracts.environment` +- **value**: `{"accountId":null,"balance":null,"hash":null,"hasher":null,"timestamp":null,"blockNumber":null}` +- **summary**: Type that bundles together all the runtime configurable interface types. + + This is not a real config. We just mention the type here as constant so that its type appears in the metadata. Only valid value is `()`. + +### `maxCodeLen`: `u32` + +- **interface**: `api.consts.contracts.maxCodeLen` +- **value**: `131072` +- **summary**: The maximum length of a contract code in bytes. + + The value should be chosen carefully taking into the account the overall memory limit your runtime has, as well as the [maximum allowed callstack depth](#associatedtype.CallStack). Look into the `integrity_test()` for some insights. + +### `maxDebugBufferLen`: `u32` + +- **interface**: `api.consts.contracts.maxDebugBufferLen` +- **value**: `2097152` +- **summary**: The maximum length of the debug buffer in bytes. + +### `maxDelegateDependencies`: `u32` + +- **interface**: `api.consts.contracts.maxDelegateDependencies` +- **value**: `32` +- **summary**: The maximum number of delegate_dependencies that a contract can lock with [`chain_extension::Ext::lock_delegate_dependency`]. + +### `maxStorageKeyLen`: `u32` + +- **interface**: `api.consts.contracts.maxStorageKeyLen` +- **value**: `128` +- **summary**: The maximum allowable length in bytes for storage keys. + +### `maxTransientStorageSize`: `u32` + +- **interface**: `api.consts.contracts.maxTransientStorageSize` +- **value**: `1048576` +- **summary**: The maximum size of the transient storage in bytes. This includes keys, values, and previous entries used for storage rollback. + +### `schedule`: `{"limits":"PalletContractsScheduleLimits","instructionWeights":"PalletContractsScheduleInstructionWeights"}` + +- **interface**: `api.consts.contracts.schedule` +- **value**: `{"limits":{"eventTopics":4,"memoryPages":16,"subjectLen":32,"payloadLen":16384,"runtimeMemory":1073741824,"validatorRuntimeMemory":2147483648,"eventRefTime":60000},"instructionWeights":{"base":1259}}` +- **summary**: Cost schedule and limits. + +### `unsafeUnstableInterface`: `bool` + +- **interface**: `api.consts.contracts.unsafeUnstableInterface` +- **value**: `false` +- **summary**: Make contract callable functions marked as `#[unstable]` available. + + Contracts that use `#[unstable]` functions won't be able to be uploaded unless this is set to `true`. This is only meant for testnets and dev nodes in order to experiment with new features. + + **Warning:** + + Do **not** set to `true` on productions chains. + + +## `crowdloan` + +### `absoluteMinimumContribution`: `u64` + +- **interface**: `api.consts.crowdloan.absoluteMinimumContribution` +- **value**: `100000000` +- **summary**: The absolute minimum contribution required to contribute to a crowdloan. + +### `maxContributors`: `u32` + +- **interface**: `api.consts.crowdloan.maxContributors` +- **value**: `500` + +### `maximumBlockDuration`: `u32` + +- **interface**: `api.consts.crowdloan.maximumBlockDuration` +- **value**: `432000` +- **summary**: The maximum block duration for a crowdloan. + +### `minimumBlockDuration`: `u32` + +- **interface**: `api.consts.crowdloan.minimumBlockDuration` +- **value**: `50400` +- **summary**: The minimum block duration for a crowdloan. + +### `minimumDeposit`: `u64` + +- **interface**: `api.consts.crowdloan.minimumDeposit` +- **value**: `10000000000` +- **summary**: The minimum deposit required to create a crowdloan. + +### `palletId`: `[u8;8]` + +- **interface**: `api.consts.crowdloan.palletId` +- **value**: `0x62742f636c6f616e` +- **summary**: The pallet id that will be used to derive crowdloan account ids. + +### `refundContributorsLimit`: `u32` + +- **interface**: `api.consts.crowdloan.refundContributorsLimit` +- **value**: `50` +- **summary**: The maximum number of contributors that can be refunded in a single refund. + + +## `drand` + +### `httpFetchTimeout`: `u64` + +- **interface**: `api.consts.drand.httpFetchTimeout` +- **value**: `1000` +- **summary**: The maximum number of milliseconds we are willing to wait for the HTTP request to complete. + +### `unsignedPriority`: `u64` + +- **interface**: `api.consts.drand.unsignedPriority` +- **value**: `1048576` +- **summary**: A configuration for base priority of unsigned transactions. + + This is exposed so that it can be tuned for particular runtime, when multiple pallets send unsigned transactions. + + +## `grandpa` + +### `maxAuthorities`: `u32` + +- **interface**: `api.consts.grandpa.maxAuthorities` +- **value**: `32` +- **summary**: Max Authorities in use + +### `maxNominators`: `u32` + +- **interface**: `api.consts.grandpa.maxNominators` +- **value**: `20` +- **summary**: The maximum number of nominators for each validator. + +### `maxSetIdSessionEntries`: `u64` + +- **interface**: `api.consts.grandpa.maxSetIdSessionEntries` +- **value**: `0` +- **summary**: The maximum number of entries to keep in the set id to session index mapping. + + Since the `SetIdSession` map is only used for validating equivocations this value should relate to the bonding duration of whatever staking system is being used (if any). If equivocation handling is not enabled then this value can be zero. + + +## `multisig` + +### `depositBase`: `u64` + +- **interface**: `api.consts.multisig.depositBase` +- **value**: `132000000` +- **summary**: The base amount of currency needed to reserve for creating a multisig execution or to store a dispatch call for later. + + This is held for an additional storage item whose value size is `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is `32 + sizeof(AccountId)` bytes. + +### `depositFactor`: `u64` + +- **interface**: `api.consts.multisig.depositFactor` +- **value**: `32000000` +- **summary**: The amount of currency needed per unit threshold when creating a multisig execution. + + This is held for adding 32 bytes more into a pre-existing storage value. + +### `maxSignatories`: `u32` + +- **interface**: `api.consts.multisig.maxSignatories` +- **value**: `100` +- **summary**: The maximum amount of signatories allowed in the multisig. + + +## `proxy` + +### `announcementDepositBase`: `u64` + +- **interface**: `api.consts.proxy.announcementDepositBase` +- **value**: `36000000` +- **summary**: The base amount of currency needed to reserve for creating an announcement. + + This is held when a new storage item holding a `Balance` is created (typically 16 bytes). + +### `announcementDepositFactor`: `u64` + +- **interface**: `api.consts.proxy.announcementDepositFactor` +- **value**: `68000000` +- **summary**: The amount of currency needed per announcement made. + + This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes) into a pre-existing storage value. + +### `maxPending`: `u32` + +- **interface**: `api.consts.proxy.maxPending` +- **value**: `75` +- **summary**: The maximum amount of time-delayed announcements that are allowed to be pending. + +### `maxProxies`: `u32` + +- **interface**: `api.consts.proxy.maxProxies` +- **value**: `20` +- **summary**: The maximum amount of proxies allowed for a single account. + +### `proxyDepositBase`: `u64` + +- **interface**: `api.consts.proxy.proxyDepositBase` +- **value**: `60000000` +- **summary**: The base amount of currency needed to reserve for creating a proxy. + + This is held for an additional storage item whose value size is `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes. + +### `proxyDepositFactor`: `u64` + +- **interface**: `api.consts.proxy.proxyDepositFactor` +- **value**: `33000000` +- **summary**: The amount of currency needed per proxy added. + + This is held for adding 32 bytes plus an instance of `ProxyType` more into a pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take into account `32 + proxy_type.encode().len()` bytes of data. + + +## `registry` + +### `fieldDeposit`: `u64` + +- **interface**: `api.consts.registry.fieldDeposit` +- **value**: `100000000` +- **summary**: The amount held on deposit per additional field for a registered identity. + +### `initialDeposit`: `u64` + +- **interface**: `api.consts.registry.initialDeposit` +- **value**: `100000000` +- **summary**: The amount held on deposit for a registered identity + +### `maxAdditionalFields`: `u32` + +- **interface**: `api.consts.registry.maxAdditionalFields` +- **value**: `1` +- **summary**: Configuration fields Maximum user-configured additional fields + + +## `safeMode` + +### `enterDepositAmount`: `Option` + +- **interface**: `api.consts.safeMode.enterDepositAmount` +- **value**: `` +- **summary**: The amount that will be reserved upon calling [`Pallet::enter`]. + + `None` disallows permissionlessly enabling the safe-mode and is a sane default. + +### `enterDuration`: `u32` + +- **interface**: `api.consts.safeMode.enterDuration` +- **value**: `0` +- **summary**: For how many blocks the safe-mode will be entered by [`Pallet::enter`]. + +### `extendDepositAmount`: `Option` + +- **interface**: `api.consts.safeMode.extendDepositAmount` +- **value**: `` +- **summary**: The amount that will be reserved upon calling [`Pallet::extend`]. + + `None` disallows permissionlessly extending the safe-mode and is a sane default. + +### `extendDuration`: `u32` + +- **interface**: `api.consts.safeMode.extendDuration` +- **value**: `0` +- **summary**: For how many blocks the safe-mode can be extended by each [`Pallet::extend`] call. + + This does not impose a hard limit as the safe-mode can be extended multiple times. + +### `releaseDelay`: `Option` + +- **interface**: `api.consts.safeMode.releaseDelay` +- **value**: `` +- **summary**: The minimal duration a deposit will remain reserved after safe-mode is entered or extended, unless [`Pallet::force_release_deposit`] is successfully called sooner. + + Every deposit is tied to a specific activation or extension, thus each deposit can be released independently after the delay for it has passed. + + `None` disallows permissionlessly releasing the safe-mode deposits and is a sane default. + + +## `scheduler` + +### `maximumWeight`: `{"refTime":"Compact","proofSize":"Compact"}` + +- **interface**: `api.consts.scheduler.maximumWeight` +- **value**: `{"refTime":3200000000000,"proofSize":"0xcccccccccccccccc"}` +- **summary**: The maximum weight that may be scheduled per block for any dispatchables. + +### `maxScheduledPerBlock`: `u32` + +- **interface**: `api.consts.scheduler.maxScheduledPerBlock` +- **value**: `50` +- **summary**: The maximum number of scheduled calls in the queue for a single block. + + **NOTE:** + + + Dependent pallets' benchmarks might require a higher limit for the setting. Set a higher limit under `runtime-benchmarks` feature. + + +## `subtensorModule` + +### `alphaHigh`: `u16` + +- **interface**: `api.consts.subtensorModule.alphaHigh` +- **value**: `58982` +- **summary**: The upper bound for the alpha parameter. Used for Liquid Alpha. + +### `alphaLow`: `u16` + +- **interface**: `api.consts.subtensorModule.alphaLow` +- **value**: `45875` +- **summary**: The lower bound for the alpha parameter. Used for Liquid Alpha. + +### `hotkeySwapOnSubnetInterval`: `u64` + +- **interface**: `api.consts.subtensorModule.hotkeySwapOnSubnetInterval` +- **value**: `7200` +- **summary**: Block number for a coldkey swap the hotkey in specific subnet. + +### `initialActivityCutoff`: `u16` + +- **interface**: `api.consts.subtensorModule.initialActivityCutoff` +- **value**: `5000` +- **summary**: Activity constant. + +### `initialAdjustmentAlpha`: `u64` + +- **interface**: `api.consts.subtensorModule.initialAdjustmentAlpha` +- **value**: `0` +- **summary**: Initial adjustment alpha on burn and pow. + +### `initialAdjustmentInterval`: `u16` + +- **interface**: `api.consts.subtensorModule.initialAdjustmentInterval` +- **value**: `100` +- **summary**: Initial adjustment interval. + +### `initialAlphaSigmoidSteepness`: `i16` + +- **interface**: `api.consts.subtensorModule.initialAlphaSigmoidSteepness` +- **value**: `1000` +- **summary**: AlphaSigmoidSteepness constant. + +### `initialBondsMovingAverage`: `u64` + +- **interface**: `api.consts.subtensorModule.initialBondsMovingAverage` +- **value**: `900000` +- **summary**: Initial bonds moving average. + +### `initialBondsPenalty`: `u16` + +- **interface**: `api.consts.subtensorModule.initialBondsPenalty` +- **value**: `65535` +- **summary**: Initial bonds penalty. + +### `initialBondsResetOn`: `bool` + +- **interface**: `api.consts.subtensorModule.initialBondsResetOn` +- **value**: `false` +- **summary**: Initial bonds reset. + +### `initialBurn`: `u64` + +- **interface**: `api.consts.subtensorModule.initialBurn` +- **value**: `100000000` +- **summary**: Initial Burn. + +### `initialColdkeySwapAnnouncementDelay`: `u32` + +- **interface**: `api.consts.subtensorModule.initialColdkeySwapAnnouncementDelay` +- **value**: `36000` +- **summary**: Coldkey swap announcement delay. + +### `initialColdkeySwapReannouncementDelay`: `u32` + +- **interface**: `api.consts.subtensorModule.initialColdkeySwapReannouncementDelay` +- **value**: `7200` +- **summary**: Coldkey swap reannouncement delay. + +### `initialDefaultChildKeyTake`: `u16` + +- **interface**: `api.consts.subtensorModule.initialDefaultChildKeyTake` +- **value**: `0` +- **summary**: Initial default childkey take. + +### `initialDefaultDelegateTake`: `u16` + +- **interface**: `api.consts.subtensorModule.initialDefaultDelegateTake` +- **value**: `11796` +- **summary**: Initial default delegation take. + +### `initialDifficulty`: `u64` + +- **interface**: `api.consts.subtensorModule.initialDifficulty` +- **value**: `10000000` +- **summary**: Initial Difficulty. + +### `initialDissolveNetworkScheduleDuration`: `u32` + +- **interface**: `api.consts.subtensorModule.initialDissolveNetworkScheduleDuration` +- **value**: `36000` +- **summary**: Dissolve network schedule duration + +### `initialEmaPriceHalvingPeriod`: `u64` + +- **interface**: `api.consts.subtensorModule.initialEmaPriceHalvingPeriod` +- **value**: `201600` +- **summary**: Initial EMA price halving period + +### `initialEmissionValue`: `u16` + +- **interface**: `api.consts.subtensorModule.initialEmissionValue` +- **value**: `0` +- **summary**: Initial Emission Ratio. + +### `initialImmunityPeriod`: `u16` + +- **interface**: `api.consts.subtensorModule.initialImmunityPeriod` +- **value**: `4096` +- **summary**: Immunity Period Constant. + +### `initialIssuance`: `u64` + +- **interface**: `api.consts.subtensorModule.initialIssuance` +- **value**: `0` +- **summary**: ================================= ==== Initial Value Constants ==== ================================= Initial currency issuance. + +### `initialKappa`: `u16` + +- **interface**: `api.consts.subtensorModule.initialKappa` +- **value**: `32767` +- **summary**: Kappa constant. + +### `initialMaxAllowedUids`: `u16` + +- **interface**: `api.consts.subtensorModule.initialMaxAllowedUids` +- **value**: `256` +- **summary**: Initial maximum allowed network UIDs + +### `initialMaxAllowedValidators`: `u16` + +- **interface**: `api.consts.subtensorModule.initialMaxAllowedValidators` +- **value**: `128` +- **summary**: Initial maximum allowed validators per network. + +### `initialMaxBurn`: `u64` + +- **interface**: `api.consts.subtensorModule.initialMaxBurn` +- **value**: `100000000000` +- **summary**: Initial Max Burn. + +### `initialMaxChildKeyTake`: `u16` + +- **interface**: `api.consts.subtensorModule.initialMaxChildKeyTake` +- **value**: `11796` +- **summary**: Initial maximum childkey take. + +### `initialMaxDifficulty`: `u64` + +- **interface**: `api.consts.subtensorModule.initialMaxDifficulty` +- **value**: `4611686018427387903` +- **summary**: Initial Max Difficulty. + +### `initialMaxRegistrationsPerBlock`: `u16` + +- **interface**: `api.consts.subtensorModule.initialMaxRegistrationsPerBlock` +- **value**: `1` +- **summary**: Initial max registrations per block. + +### `initialMinAllowedUids`: `u16` + +- **interface**: `api.consts.subtensorModule.initialMinAllowedUids` +- **value**: `64` +- **summary**: Initial minimum allowed network UIDs + +### `initialMinAllowedWeights`: `u16` + +- **interface**: `api.consts.subtensorModule.initialMinAllowedWeights` +- **value**: `1024` +- **summary**: Initial min allowed weights setting. + +### `initialMinBurn`: `u64` + +- **interface**: `api.consts.subtensorModule.initialMinBurn` +- **value**: `500000` +- **summary**: Initial Min Burn. + +### `initialMinChildKeyTake`: `u16` + +- **interface**: `api.consts.subtensorModule.initialMinChildKeyTake` +- **value**: `0` +- **summary**: Initial minimum childkey take. + +### `initialMinDelegateTake`: `u16` + +- **interface**: `api.consts.subtensorModule.initialMinDelegateTake` +- **value**: `0` +- **summary**: Initial minimum delegation take. + +### `initialMinDifficulty`: `u64` + +- **interface**: `api.consts.subtensorModule.initialMinDifficulty` +- **value**: `10000000` +- **summary**: Initial Min Difficulty. + +### `initialNetworkImmunityPeriod`: `u64` + +- **interface**: `api.consts.subtensorModule.initialNetworkImmunityPeriod` +- **value**: `1296000` +- **summary**: Initial network immunity period + +### `initialNetworkLockReductionInterval`: `u64` + +- **interface**: `api.consts.subtensorModule.initialNetworkLockReductionInterval` +- **value**: `100800` +- **summary**: Initial lock reduction interval. + +### `initialNetworkMinLockCost`: `u64` + +- **interface**: `api.consts.subtensorModule.initialNetworkMinLockCost` +- **value**: `1000000000000` +- **summary**: Initial network minimum burn cost + +### `initialNetworkRateLimit`: `u64` + +- **interface**: `api.consts.subtensorModule.initialNetworkRateLimit` +- **value**: `7200` +- **summary**: Initial network creation rate limit + +### `initialPruningScore`: `u16` + +- **interface**: `api.consts.subtensorModule.initialPruningScore` +- **value**: `65535` +- **summary**: Initial pruning score for each neuron. + +### `initialRAORecycledForRegistration`: `u64` + +- **interface**: `api.consts.subtensorModule.initialRAORecycledForRegistration` +- **value**: `0` +- **summary**: Initial RAO Recycled. + +### `initialRho`: `u16` + +- **interface**: `api.consts.subtensorModule.initialRho` +- **value**: `10` +- **summary**: Rho constant. + +### `initialScalingLawPower`: `u16` + +- **interface**: `api.consts.subtensorModule.initialScalingLawPower` +- **value**: `50` +- **summary**: Initial scaling law power. + +### `initialServingRateLimit`: `u64` + +- **interface**: `api.consts.subtensorModule.initialServingRateLimit` +- **value**: `50` +- **summary**: Initial serving rate limit. + +### `initialStartCallDelay`: `u64` + +- **interface**: `api.consts.subtensorModule.initialStartCallDelay` +- **value**: `0` +- **summary**: Delay after which a new subnet can dispatch start call extrinsic. + +### `initialSubnetOwnerCut`: `u16` + +- **interface**: `api.consts.subtensorModule.initialSubnetOwnerCut` +- **value**: `11796` +- **summary**: Initial network subnet cut. + +### `initialTaoWeight`: `u64` + +- **interface**: `api.consts.subtensorModule.initialTaoWeight` +- **value**: `971718665099567868` +- **summary**: Initial TAO weight. + +### `initialTargetRegistrationsPerInterval`: `u16` + +- **interface**: `api.consts.subtensorModule.initialTargetRegistrationsPerInterval` +- **value**: `2` +- **summary**: Initial target registrations per interval. + +### `initialTempo`: `u16` + +- **interface**: `api.consts.subtensorModule.initialTempo` +- **value**: `360` +- **summary**: Tempo for each network. + +### `initialTxChildKeyTakeRateLimit`: `u64` + +- **interface**: `api.consts.subtensorModule.initialTxChildKeyTakeRateLimit` +- **value**: `216000` +- **summary**: Initial childkey take transaction rate limit. + +### `initialTxDelegateTakeRateLimit`: `u64` + +- **interface**: `api.consts.subtensorModule.initialTxDelegateTakeRateLimit` +- **value**: `216000` +- **summary**: Initial delegate take transaction rate limit. + +### `initialTxRateLimit`: `u64` + +- **interface**: `api.consts.subtensorModule.initialTxRateLimit` +- **value**: `1000` +- **summary**: Initial transaction rate limit. + +### `initialValidatorPruneLen`: `u64` + +- **interface**: `api.consts.subtensorModule.initialValidatorPruneLen` +- **value**: `1` +- **summary**: Initial validator context pruning length. + +### `initialWeightsVersionKey`: `u64` + +- **interface**: `api.consts.subtensorModule.initialWeightsVersionKey` +- **value**: `0` +- **summary**: Initial weights version key. + +### `keySwapCost`: `u64` + +- **interface**: `api.consts.subtensorModule.keySwapCost` +- **value**: `100000000` +- **summary**: Cost of swapping a hotkey. + +### `keySwapOnSubnetCost`: `u64` + +- **interface**: `api.consts.subtensorModule.keySwapOnSubnetCost` +- **value**: `1000000` +- **summary**: Cost of swapping a hotkey in a subnet. + +### `leaseDividendsDistributionInterval`: `u32` + +- **interface**: `api.consts.subtensorModule.leaseDividendsDistributionInterval` +- **value**: `100` +- **summary**: Number of blocks between dividends distribution. + +### `liquidAlphaOn`: `bool` + +- **interface**: `api.consts.subtensorModule.liquidAlphaOn` +- **value**: `false` +- **summary**: A flag to indicate if Liquid Alpha is enabled. + +### `maxBurnLowerBound`: `u64` + +- **interface**: `api.consts.subtensorModule.maxBurnLowerBound` +- **value**: `100000000` +- **summary**: Max burn lower bound. + +### `maxImmuneUidsPercentage`: `Percent` + +- **interface**: `api.consts.subtensorModule.maxImmuneUidsPercentage` +- **value**: `80` +- **summary**: Maximum percentage of immune UIDs. + +### `minBurnUpperBound`: `u64` + +- **interface**: `api.consts.subtensorModule.minBurnUpperBound` +- **value**: `1000000000` +- **summary**: Min burn upper bound. + +### `yuma3On`: `bool` + +- **interface**: `api.consts.subtensorModule.yuma3On` +- **value**: `false` +- **summary**: A flag to indicate if Yuma3 is enabled. + + +## `swap` + +### `maxFeeRate`: `u16` + +- **interface**: `api.consts.swap.maxFeeRate` +- **value**: `10000` +- **summary**: The maximum fee rate that can be set + +### `maxPositions`: `u32` + +- **interface**: `api.consts.swap.maxPositions` +- **value**: `100` +- **summary**: The maximum number of positions a user can have + +### `minimumLiquidity`: `u64` + +- **interface**: `api.consts.swap.minimumLiquidity` +- **value**: `1000` +- **summary**: Minimum liquidity that is safe for rounding and integer math. + +### `minimumReserve`: `u64` + +- **interface**: `api.consts.swap.minimumReserve` +- **value**: `1000000` +- **summary**: Minimum reserve for tao and alpha + +### `protocolId`: `[u8;8]` + +- **interface**: `api.consts.swap.protocolId` +- **value**: `0x74656e2f73776170` +- **summary**: This type is used to derive protocol accoun ID. + + +## `system` + +### `blockHashCount`: `u32` + +- **interface**: `api.consts.system.blockHashCount` +- **value**: `2400` +- **summary**: Maximum number of block number to block hash mappings to keep (oldest pruned first). + +### `blockLength`: `{"max":"FrameSupportDispatchPerDispatchClassU32"}` + +- **interface**: `api.consts.system.blockLength` +- **value**: `{"max":{"normal":7864320,"operational":10485760,"mandatory":10485760}}` +- **summary**: The maximum length of a block (in bytes). + +### `blockWeights`: `{"baseBlock":"SpWeightsWeightV2Weight","maxBlock":"SpWeightsWeightV2Weight","perClass":"FrameSupportDispatchPerDispatchClassWeightsPerClass"}` + +- **interface**: `api.consts.system.blockWeights` +- **value**: `{"baseBlock":{"refTime":431614000,"proofSize":0},"maxBlock":{"refTime":4000000000000,"proofSize":"0xffffffffffffffff"},"perClass":{"normal":{"baseExtrinsic":{"refTime":108157000,"proofSize":0},"maxExtrinsic":{"refTime":2599891843000,"proofSize":"0xa666666666666666"},"maxTotal":{"refTime":3000000000000,"proofSize":"0xbfffffffffffffff"},"reserved":{"refTime":0,"proofSize":0}},"operational":{"baseExtrinsic":{"refTime":108157000,"proofSize":0},"maxExtrinsic":{"refTime":3599891843000,"proofSize":"0xe666666666666666"},"maxTotal":{"refTime":4000000000000,"proofSize":"0xffffffffffffffff"},"reserved":{"refTime":1000000000000,"proofSize":"0x4000000000000000"}},"mandatory":{"baseExtrinsic":{"refTime":108157000,"proofSize":0},"maxExtrinsic":null,"maxTotal":null,"reserved":null}}}` +- **summary**: Block & extrinsics weights: base values and limits. + +### `dbWeight`: `{"read":"u64","write":"u64"}` + +- **interface**: `api.consts.system.dbWeight` +- **value**: `{"read":25000000,"write":100000000}` +- **summary**: The weight of runtime database operations the runtime can invoke. + +### `ss58Prefix`: `u16` + +- **interface**: `api.consts.system.ss58Prefix` +- **value**: `42` +- **summary**: The designated SS58 prefix of this chain. + + This replaces the "ss58Format" property declared in the chain spec. Reason is that the runtime should know about the prefix in order to make use of it as an identifier of the chain. + +### `version`: `{"specName":"Text","implName":"Text","authoringVersion":"u32","specVersion":"u32","implVersion":"u32","apis":"Vec<([u8;8],u32)>","transactionVersion":"u32","systemVersion":"u8"}` + +- **interface**: `api.consts.system.version` +- **value**: `{"specName":"node-subtensor","implName":"node-subtensor","authoringVersion":1,"specVersion":393,"implVersion":1,"apis":[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xfbc577b9d747efd6",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xdd718d5cc53262d4",1],["0xab3c0572291feb8b",1],["0xed99c5acb25eedf5",3],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x582211f65bb14b89",6],["0xe65b00e46cedd0aa",2],["0x68b66ba122c93fa7",2],["0x42e62be4a39e5b60",1],["0x806df4ccaa9ed485",1],["0x8375104b299b74c5",1],["0x5d1fbfbe852f2807",1],["0xc6886e2f8e598b0a",1],["0xcbca25e39f142387",2],["0xa8b093e6508d9e9c",1],["0x1c4585bd5c707202",1]],"transactionVersion":1,"systemVersion":1}` +- **summary**: Get the chain's in-code version. + + +## `timestamp` + +### `minimumPeriod`: `u64` + +- **interface**: `api.consts.timestamp.minimumPeriod` +- **value**: `6000` +- **summary**: The minimum period between blocks. + + Be aware that this is different to the *expected* period that the block production apparatus provides. Your chosen consensus system will generally work with this to determine a sensible block time. For example, in the Aura pallet it will be double this period on default settings. + + +## `transactionPayment` + +### `operationalFeeMultiplier`: `u8` + +- **interface**: `api.consts.transactionPayment.operationalFeeMultiplier` +- **value**: `5` +- **summary**: A fee multiplier for `Operational` extrinsics to compute "virtual tip" to boost their `priority` + + This value is multiplied by the `final_fee` to obtain a "virtual tip" that is later added to a tip component in regular `priority` calculations. It means that a `Normal` transaction can front-run a similarly-sized `Operational` extrinsic (with no tip), by including a tip value greater than the virtual tip. + + ```rust,ignore // For `Normal` let priority = priority_calc(tip); + + // For `Operational` let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier; let priority = priority_calc(tip + virtual_tip); ``` + + Note that since we use `final_fee` the multiplier applies also to the regular `tip` sent with the transaction. So, not only does the transaction get a priority bump based on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational` transactions. + + +## `utility` + +### `batchedCallsLimit`: `u32` + +- **interface**: `api.consts.utility.batchedCallsLimit` +- **value**: `10922` +- **summary**: The limit on the number of batched calls. diff --git a/docs/subtensor-api/errors.md b/docs/subtensor-api/errors.md new file mode 100644 index 000000000..61baac166 --- /dev/null +++ b/docs/subtensor-api/errors.md @@ -0,0 +1,1730 @@ +# Errors + +Error variants returned by the Bittensor (Subtensor) runtime. Accessible via `api.errors..`. + +:::info +Generated from a live snapshot of the Subtensor runtime on **2026-04-02**. Connected to: `wss://entrypoint-finney.opentensor.ai:443` +::: + + +- **[adminUtils](#adminutils)** +- **[balances](#balances)** +- **[commitments](#commitments)** +- **[contracts](#contracts)** +- **[crowdloan](#crowdloan)** +- **[drand](#drand)** +- **[ethereum](#ethereum)** +- **[evm](#evm)** +- **[grandpa](#grandpa)** +- **[mevShield](#mevshield)** +- **[multisig](#multisig)** +- **[preimage](#preimage)** +- **[proxy](#proxy)** +- **[registry](#registry)** +- **[safeMode](#safemode)** +- **[scheduler](#scheduler)** +- **[subtensorModule](#subtensormodule)** +- **[sudo](#sudo)** +- **[swap](#swap)** +- **[system](#system)** +- **[utility](#utility)** + +## `adminUtils` + +### `BondsMovingAverageMaxReached` + +- **interface**: `api.errors.adminUtils.BondsMovingAverageMaxReached` +- **summary**: The maximum value for bonds moving average is reached + +### `InvalidValue` + +- **interface**: `api.errors.adminUtils.InvalidValue` +- **summary**: Bad parameter value + +### `MaxAllowedUidsGreaterThanDefaultMaxAllowedUids` + +- **interface**: `api.errors.adminUtils.MaxAllowedUidsGreaterThanDefaultMaxAllowedUids` +- **summary**: The maximum allowed UIDs must be less than the default maximum allowed UIDs. + +### `MaxAllowedUIdsLessThanCurrentUIds` + +- **interface**: `api.errors.adminUtils.MaxAllowedUIdsLessThanCurrentUIds` +- **summary**: The maximum number of subnet validators must be more than the current number of UIDs already in the subnet. + +### `MaxAllowedUidsLessThanMinAllowedUids` + +- **interface**: `api.errors.adminUtils.MaxAllowedUidsLessThanMinAllowedUids` +- **summary**: The maximum allowed UIDs must be greater than the minimum allowed UIDs. + +### `MaxValidatorsLargerThanMaxUIds` + +- **interface**: `api.errors.adminUtils.MaxValidatorsLargerThanMaxUIds` +- **summary**: The maximum number of subnet validators must be less than the maximum number of allowed UIDs in the subnet. + +### `MinAllowedUidsGreaterThanCurrentUids` + +- **interface**: `api.errors.adminUtils.MinAllowedUidsGreaterThanCurrentUids` +- **summary**: The minimum allowed UIDs must be less than the current number of UIDs in the subnet. + +### `MinAllowedUidsGreaterThanMaxAllowedUids` + +- **interface**: `api.errors.adminUtils.MinAllowedUidsGreaterThanMaxAllowedUids` +- **summary**: The minimum allowed UIDs must be less than the maximum allowed UIDs. + +### `NegativeSigmoidSteepness` + +- **interface**: `api.errors.adminUtils.NegativeSigmoidSteepness` +- **summary**: Only root can set negative sigmoid steepness values + +### `SubnetDoesNotExist` + +- **interface**: `api.errors.adminUtils.SubnetDoesNotExist` +- **summary**: The subnet does not exist, check the netuid parameter + +### `ValueNotInBounds` + +- **interface**: `api.errors.adminUtils.ValueNotInBounds` +- **summary**: Value not in allowed bounds. + + +## `balances` + +### `DeadAccount` + +- **interface**: `api.errors.balances.DeadAccount` +- **summary**: Beneficiary account must pre-exist. + +### `DeltaZero` + +- **interface**: `api.errors.balances.DeltaZero` +- **summary**: The delta cannot be zero. + +### `ExistentialDeposit` + +- **interface**: `api.errors.balances.ExistentialDeposit` +- **summary**: Value too low to create account due to existential deposit. + +### `ExistingVestingSchedule` + +- **interface**: `api.errors.balances.ExistingVestingSchedule` +- **summary**: A vesting schedule already exists for this account. + +### `Expendability` + +- **interface**: `api.errors.balances.Expendability` +- **summary**: Transfer/payment would kill account. + +### `InsufficientBalance` + +- **interface**: `api.errors.balances.InsufficientBalance` +- **summary**: Balance too low to send value. + +### `IssuanceDeactivated` + +- **interface**: `api.errors.balances.IssuanceDeactivated` +- **summary**: The issuance cannot be modified since it is already deactivated. + +### `LiquidityRestrictions` + +- **interface**: `api.errors.balances.LiquidityRestrictions` +- **summary**: Account liquidity restrictions prevent withdrawal. + +### `TooManyFreezes` + +- **interface**: `api.errors.balances.TooManyFreezes` +- **summary**: Number of freezes exceed `MaxFreezes`. + +### `TooManyHolds` + +- **interface**: `api.errors.balances.TooManyHolds` +- **summary**: Number of holds exceed `VariantCountOf`. + +### `TooManyReserves` + +- **interface**: `api.errors.balances.TooManyReserves` +- **summary**: Number of named reserves exceed `MaxReserves`. + +### `VestingBalance` + +- **interface**: `api.errors.balances.VestingBalance` +- **summary**: Vesting balance too high to send value. + + +## `commitments` + +### `AccountNotAllowedCommit` + +- **interface**: `api.errors.commitments.AccountNotAllowedCommit` +- **summary**: Account is not allowed to make commitments to the chain + +### `SpaceLimitExceeded` + +- **interface**: `api.errors.commitments.SpaceLimitExceeded` +- **summary**: Space Limit Exceeded for the current interval + +### `TooManyFieldsInCommitmentInfo` + +- **interface**: `api.errors.commitments.TooManyFieldsInCommitmentInfo` +- **summary**: Account passed too many additional fields to their commitment + +### `UnexpectedUnreserveLeftover` + +- **interface**: `api.errors.commitments.UnexpectedUnreserveLeftover` +- **summary**: Indicates that unreserve returned a leftover, which is unexpected. + + +## `contracts` + +### `CannotAddSelfAsDelegateDependency` + +- **interface**: `api.errors.contracts.CannotAddSelfAsDelegateDependency` +- **summary**: Can not add a delegate dependency to the code hash of the contract itself. + +### `CodeInfoNotFound` + +- **interface**: `api.errors.contracts.CodeInfoNotFound` +- **summary**: No code info could be found at the supplied code hash. + +### `CodeInUse` + +- **interface**: `api.errors.contracts.CodeInUse` +- **summary**: Code removal was denied because the code is still in use by at least one contract. + +### `CodeNotFound` + +- **interface**: `api.errors.contracts.CodeNotFound` +- **summary**: No code could be found at the supplied code hash. + +### `CodeRejected` + +- **interface**: `api.errors.contracts.CodeRejected` +- **summary**: The contract's code was found to be invalid during validation. + + The most likely cause of this is that an API was used which is not supported by the node. This happens if an older node is used with a new version of ink!. Try updating your node to the newest available version. + + A more detailed error can be found on the node console if debug messages are enabled by supplying `-lruntime::contracts=debug`. + +### `CodeTooLarge` + +- **interface**: `api.errors.contracts.CodeTooLarge` +- **summary**: The code supplied to `instantiate_with_code` exceeds the limit specified in the current schedule. + +### `ContractNotFound` + +- **interface**: `api.errors.contracts.ContractNotFound` +- **summary**: No contract was found at the specified address. + +### `ContractReverted` + +- **interface**: `api.errors.contracts.ContractReverted` +- **summary**: The contract ran to completion but decided to revert its storage changes. Please note that this error is only returned from extrinsics. When called directly or via RPC an `Ok` will be returned. In this case the caller needs to inspect the flags to determine whether a reversion has taken place. + +### `ContractTrapped` + +- **interface**: `api.errors.contracts.ContractTrapped` +- **summary**: Contract trapped during execution. + +### `DecodingFailed` + +- **interface**: `api.errors.contracts.DecodingFailed` +- **summary**: Input passed to a contract API function failed to decode as expected type. + +### `DelegateDependencyAlreadyExists` + +- **interface**: `api.errors.contracts.DelegateDependencyAlreadyExists` +- **summary**: The contract already depends on the given delegate dependency. + +### `DelegateDependencyNotFound` + +- **interface**: `api.errors.contracts.DelegateDependencyNotFound` +- **summary**: The dependency was not found in the contract's delegate dependencies. + +### `DuplicateContract` + +- **interface**: `api.errors.contracts.DuplicateContract` +- **summary**: A contract with the same AccountId already exists. + +### `Indeterministic` + +- **interface**: `api.errors.contracts.Indeterministic` +- **summary**: An indeterministic code was used in a context where this is not permitted. + +### `InputForwarded` + +- **interface**: `api.errors.contracts.InputForwarded` +- **summary**: `seal_call` forwarded this contracts input. It therefore is no longer available. + +### `InvalidCallFlags` + +- **interface**: `api.errors.contracts.InvalidCallFlags` +- **summary**: Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`. + +### `InvalidSchedule` + +- **interface**: `api.errors.contracts.InvalidSchedule` +- **summary**: Invalid schedule supplied, e.g. with zero weight of a basic operation. + +### `MaxCallDepthReached` + +- **interface**: `api.errors.contracts.MaxCallDepthReached` +- **summary**: Performing a call was denied because the calling depth reached the limit of what is specified in the schedule. + +### `MaxDelegateDependenciesReached` + +- **interface**: `api.errors.contracts.MaxDelegateDependenciesReached` +- **summary**: The contract has reached its maximum number of delegate dependencies. + +### `MigrationInProgress` + +- **interface**: `api.errors.contracts.MigrationInProgress` +- **summary**: A pending migration needs to complete before the extrinsic can be called. + +### `NoChainExtension` + +- **interface**: `api.errors.contracts.NoChainExtension` +- **summary**: The chain does not provide a chain extension. Calling the chain extension results in this error. Note that this usually shouldn't happen as deploying such contracts is rejected. + +### `NoMigrationPerformed` + +- **interface**: `api.errors.contracts.NoMigrationPerformed` +- **summary**: Migrate dispatch call was attempted but no migration was performed. + +### `OutOfBounds` + +- **interface**: `api.errors.contracts.OutOfBounds` +- **summary**: A buffer outside of sandbox memory was passed to a contract API function. + +### `OutOfGas` + +- **interface**: `api.errors.contracts.OutOfGas` +- **summary**: The executed contract exhausted its gas limit. + +### `OutOfTransientStorage` + +- **interface**: `api.errors.contracts.OutOfTransientStorage` +- **summary**: Can not add more data to transient storage. + +### `OutputBufferTooSmall` + +- **interface**: `api.errors.contracts.OutputBufferTooSmall` +- **summary**: The output buffer supplied to a contract API call was too small. + +### `RandomSubjectTooLong` + +- **interface**: `api.errors.contracts.RandomSubjectTooLong` +- **summary**: The subject passed to `seal_random` exceeds the limit. + +### `ReentranceDenied` + +- **interface**: `api.errors.contracts.ReentranceDenied` +- **summary**: A call tried to invoke a contract that is flagged as non-reentrant. The only other cause is that a call from a contract into the runtime tried to call back into `pallet-contracts`. This would make the whole pallet reentrant with regard to contract code execution which is not supported. + +### `StateChangeDenied` + +- **interface**: `api.errors.contracts.StateChangeDenied` +- **summary**: A contract attempted to invoke a state modifying API while being in read-only mode. + +### `StorageDepositLimitExhausted` + +- **interface**: `api.errors.contracts.StorageDepositLimitExhausted` +- **summary**: More storage was created than allowed by the storage deposit limit. + +### `StorageDepositNotEnoughFunds` + +- **interface**: `api.errors.contracts.StorageDepositNotEnoughFunds` +- **summary**: Origin doesn't have enough balance to pay the required storage deposits. + +### `TerminatedInConstructor` + +- **interface**: `api.errors.contracts.TerminatedInConstructor` +- **summary**: A contract self destructed in its constructor. + + This can be triggered by a call to `seal_terminate`. + +### `TerminatedWhileReentrant` + +- **interface**: `api.errors.contracts.TerminatedWhileReentrant` +- **summary**: Termination of a contract is not allowed while the contract is already on the call stack. Can be triggered by `seal_terminate`. + +### `TooManyTopics` + +- **interface**: `api.errors.contracts.TooManyTopics` +- **summary**: The amount of topics passed to `seal_deposit_events` exceeds the limit. + +### `TransferFailed` + +- **interface**: `api.errors.contracts.TransferFailed` +- **summary**: Performing the requested transfer failed. Probably because there isn't enough free balance in the sender's account. + +### `ValueTooLarge` + +- **interface**: `api.errors.contracts.ValueTooLarge` +- **summary**: The size defined in `T::MaxValueSize` was exceeded. + +### `XCMDecodeFailed` + +- **interface**: `api.errors.contracts.XCMDecodeFailed` +- **summary**: Failed to decode the XCM program. + + +## `crowdloan` + +### `AlreadyFinalized` + +- **interface**: `api.errors.crowdloan.AlreadyFinalized` +- **summary**: The crowdloan has already been finalized. + +### `BlockDurationTooLong` + +- **interface**: `api.errors.crowdloan.BlockDurationTooLong` +- **summary**: The block duration is too long. + +### `BlockDurationTooShort` + +- **interface**: `api.errors.crowdloan.BlockDurationTooShort` +- **summary**: The crowdloan block duration is too short. + +### `CallUnavailable` + +- **interface**: `api.errors.crowdloan.CallUnavailable` +- **summary**: Call to dispatch was not found in the preimage storage. + +### `CannotEndInPast` + +- **interface**: `api.errors.crowdloan.CannotEndInPast` +- **summary**: The crowdloan cannot end in the past. + +### `CapNotRaised` + +- **interface**: `api.errors.crowdloan.CapNotRaised` +- **summary**: The crowdloan cap has not been raised. + +### `CapRaised` + +- **interface**: `api.errors.crowdloan.CapRaised` +- **summary**: The crowdloan cap has been fully raised. + +### `CapTooLow` + +- **interface**: `api.errors.crowdloan.CapTooLow` +- **summary**: The crowdloan cap is too low. + +### `ContributionPeriodEnded` + +- **interface**: `api.errors.crowdloan.ContributionPeriodEnded` +- **summary**: The contribution period has ended. + +### `ContributionPeriodNotEnded` + +- **interface**: `api.errors.crowdloan.ContributionPeriodNotEnded` +- **summary**: The crowdloan contribution period has not ended yet. + +### `ContributionTooLow` + +- **interface**: `api.errors.crowdloan.ContributionTooLow` +- **summary**: The contribution is too low. + +### `DepositCannotBeWithdrawn` + +- **interface**: `api.errors.crowdloan.DepositCannotBeWithdrawn` +- **summary**: The deposit cannot be withdrawn from the crowdloan. + +### `DepositTooLow` + +- **interface**: `api.errors.crowdloan.DepositTooLow` +- **summary**: The crowdloan initial deposit is too low. + +### `InsufficientBalance` + +- **interface**: `api.errors.crowdloan.InsufficientBalance` +- **summary**: The account does not have enough balance to pay for the initial deposit/contribution. + +### `InvalidCrowdloanId` + +- **interface**: `api.errors.crowdloan.InvalidCrowdloanId` +- **summary**: The crowdloan id is invalid. + +### `InvalidOrigin` + +- **interface**: `api.errors.crowdloan.InvalidOrigin` +- **summary**: The origin of this call is invalid. + +### `MaxContributorsReached` + +- **interface**: `api.errors.crowdloan.MaxContributorsReached` +- **summary**: The maximum number of contributors has been reached. + +### `MinimumContributionTooLow` + +- **interface**: `api.errors.crowdloan.MinimumContributionTooLow` +- **summary**: The minimum contribution is too low. + +### `NoContribution` + +- **interface**: `api.errors.crowdloan.NoContribution` +- **summary**: The contributor has no contribution for this crowdloan. + +### `NotReadyToDissolve` + +- **interface**: `api.errors.crowdloan.NotReadyToDissolve` +- **summary**: The crowdloan is not ready to be dissolved, it still has contributions. + +### `Overflow` + +- **interface**: `api.errors.crowdloan.Overflow` +- **summary**: An overflow occurred. + +### `Underflow` + +- **interface**: `api.errors.crowdloan.Underflow` +- **summary**: An underflow occurred. + + +## `drand` + +### `DrandConnectionFailure` + +- **interface**: `api.errors.drand.DrandConnectionFailure` +- **summary**: failed to connect to the + +### `InvalidRoundNumber` + +- **interface**: `api.errors.drand.InvalidRoundNumber` +- **summary**: the round number did not increment + +### `NoneValue` + +- **interface**: `api.errors.drand.NoneValue` +- **summary**: The value retrieved was `None` as no value was previously set. + +### `PulseVerificationError` + +- **interface**: `api.errors.drand.PulseVerificationError` +- **summary**: the pulse could not be verified + +### `StorageOverflow` + +- **interface**: `api.errors.drand.StorageOverflow` +- **summary**: There was an attempt to increment the value in storage over `u32::MAX`. + +### `UnverifiedPulse` + +- **interface**: `api.errors.drand.UnverifiedPulse` +- **summary**: the pulse is invalid + + +## `ethereum` + +### `InvalidSignature` + +- **interface**: `api.errors.ethereum.InvalidSignature` +- **summary**: Signature is invalid. + +### `PreLogExists` + +- **interface**: `api.errors.ethereum.PreLogExists` +- **summary**: Pre-log is present, therefore transact is not allowed. + + +## `evm` + +### `BalanceLow` + +- **interface**: `api.errors.evm.BalanceLow` +- **summary**: Not enough balance to perform action + +### `CreateOriginNotAllowed` + +- **interface**: `api.errors.evm.CreateOriginNotAllowed` +- **summary**: Address not allowed to deploy contracts either via CREATE or CALL(CREATE). + +### `FeeOverflow` + +- **interface**: `api.errors.evm.FeeOverflow` +- **summary**: Calculating total fee overflowed + +### `GasLimitTooHigh` + +- **interface**: `api.errors.evm.GasLimitTooHigh` +- **summary**: Gas limit is too high. + +### `GasLimitTooLow` + +- **interface**: `api.errors.evm.GasLimitTooLow` +- **summary**: Gas limit is too low. + +### `GasPriceTooLow` + +- **interface**: `api.errors.evm.GasPriceTooLow` +- **summary**: Gas price is too low. + +### `InvalidChainId` + +- **interface**: `api.errors.evm.InvalidChainId` +- **summary**: The chain id is invalid. + +### `InvalidNonce` + +- **interface**: `api.errors.evm.InvalidNonce` +- **summary**: Nonce is invalid + +### `InvalidSignature` + +- **interface**: `api.errors.evm.InvalidSignature` +- **summary**: the signature is invalid. + +### `NotAllowed` + +- **interface**: `api.errors.evm.NotAllowed` +- **summary**: Origin is not allowed to perform the operation. + +### `PaymentOverflow` + +- **interface**: `api.errors.evm.PaymentOverflow` +- **summary**: Calculating total payment overflowed + +### `Reentrancy` + +- **interface**: `api.errors.evm.Reentrancy` +- **summary**: EVM reentrancy + +### `TransactionMustComeFromEOA` + +- **interface**: `api.errors.evm.TransactionMustComeFromEOA` +- **summary**: EIP-3607, + +### `Undefined` + +- **interface**: `api.errors.evm.Undefined` +- **summary**: Undefined error. + +### `WithdrawFailed` + +- **interface**: `api.errors.evm.WithdrawFailed` +- **summary**: Withdraw fee failed + + +## `grandpa` + +### `ChangePending` + +- **interface**: `api.errors.grandpa.ChangePending` +- **summary**: Attempt to signal GRANDPA change with one already pending. + +### `DuplicateOffenceReport` + +- **interface**: `api.errors.grandpa.DuplicateOffenceReport` +- **summary**: A given equivocation report is valid but already previously reported. + +### `InvalidEquivocationProof` + +- **interface**: `api.errors.grandpa.InvalidEquivocationProof` +- **summary**: An equivocation proof provided as part of an equivocation report is invalid. + +### `InvalidKeyOwnershipProof` + +- **interface**: `api.errors.grandpa.InvalidKeyOwnershipProof` +- **summary**: A key ownership proof provided as part of an equivocation report is invalid. + +### `PauseFailed` + +- **interface**: `api.errors.grandpa.PauseFailed` +- **summary**: Attempt to signal GRANDPA pause when the authority set isn't live (either paused or already pending pause). + +### `ResumeFailed` + +- **interface**: `api.errors.grandpa.ResumeFailed` +- **summary**: Attempt to signal GRANDPA resume when the authority set isn't paused (either live or already pending resume). + +### `TooSoon` + +- **interface**: `api.errors.grandpa.TooSoon` +- **summary**: Cannot signal forced change so soon after last. + + +## `mevShield` + +### `BadEncKeyLen` + +- **interface**: `api.errors.mevShield.BadEncKeyLen` +- **summary**: The announced ML‑KEM encapsulation key length is invalid. + +### `Unreachable` + +- **interface**: `api.errors.mevShield.Unreachable` +- **summary**: Unreachable. + + +## `multisig` + +### `AlreadyApproved` + +- **interface**: `api.errors.multisig.AlreadyApproved` +- **summary**: Call is already approved by this signatory. + +### `AlreadyStored` + +- **interface**: `api.errors.multisig.AlreadyStored` +- **summary**: The data to be stored is already stored. + +### `MaxWeightTooLow` + +- **interface**: `api.errors.multisig.MaxWeightTooLow` +- **summary**: The maximum weight information provided was too low. + +### `MinimumThreshold` + +- **interface**: `api.errors.multisig.MinimumThreshold` +- **summary**: Threshold must be 2 or greater. + +### `NoApprovalsNeeded` + +- **interface**: `api.errors.multisig.NoApprovalsNeeded` +- **summary**: Call doesn't need any (more) approvals. + +### `NotFound` + +- **interface**: `api.errors.multisig.NotFound` +- **summary**: Multisig operation not found in storage. + +### `NoTimepoint` + +- **interface**: `api.errors.multisig.NoTimepoint` +- **summary**: No timepoint was given, yet the multisig operation is already underway. + +### `NotOwner` + +- **interface**: `api.errors.multisig.NotOwner` +- **summary**: Only the account that originally created the multisig is able to cancel it or update its deposits. + +### `SenderInSignatories` + +- **interface**: `api.errors.multisig.SenderInSignatories` +- **summary**: The sender was contained in the other signatories; it shouldn't be. + +### `SignatoriesOutOfOrder` + +- **interface**: `api.errors.multisig.SignatoriesOutOfOrder` +- **summary**: The signatories were provided out of order; they should be ordered. + +### `TooFewSignatories` + +- **interface**: `api.errors.multisig.TooFewSignatories` +- **summary**: There are too few signatories in the list. + +### `TooManySignatories` + +- **interface**: `api.errors.multisig.TooManySignatories` +- **summary**: There are too many signatories in the list. + +### `UnexpectedTimepoint` + +- **interface**: `api.errors.multisig.UnexpectedTimepoint` +- **summary**: A timepoint was given, yet no multisig operation is underway. + +### `WrongTimepoint` + +- **interface**: `api.errors.multisig.WrongTimepoint` +- **summary**: A different timepoint was given to the multisig operation that is underway. + + +## `preimage` + +### `AlreadyNoted` + +- **interface**: `api.errors.preimage.AlreadyNoted` +- **summary**: Preimage has already been noted on-chain. + +### `NotAuthorized` + +- **interface**: `api.errors.preimage.NotAuthorized` +- **summary**: The user is not authorized to perform this action. + +### `NotNoted` + +- **interface**: `api.errors.preimage.NotNoted` +- **summary**: The preimage cannot be removed since it has not yet been noted. + +### `NotRequested` + +- **interface**: `api.errors.preimage.NotRequested` +- **summary**: The preimage request cannot be removed since no outstanding requests exist. + +### `Requested` + +- **interface**: `api.errors.preimage.Requested` +- **summary**: A preimage may not be removed when there are outstanding requests. + +### `TooBig` + +- **interface**: `api.errors.preimage.TooBig` +- **summary**: Preimage is too large to store on-chain. + +### `TooFew` + +- **interface**: `api.errors.preimage.TooFew` +- **summary**: Too few hashes were requested to be upgraded (i.e. zero). + +### `TooMany` + +- **interface**: `api.errors.preimage.TooMany` +- **summary**: More than `MAX_HASH_UPGRADE_BULK_COUNT` hashes were requested to be upgraded at once. + + +## `proxy` + +### `AnnouncementDepositInvariantViolated` + +- **interface**: `api.errors.proxy.AnnouncementDepositInvariantViolated` +- **summary**: Invariant violated: deposit recomputation returned None after updating announcements. + +### `Duplicate` + +- **interface**: `api.errors.proxy.Duplicate` +- **summary**: Account is already a proxy. + +### `InvalidDerivedAccountId` + +- **interface**: `api.errors.proxy.InvalidDerivedAccountId` +- **summary**: Failed to derive a valid account id from the provided entropy. + +### `NoPermission` + +- **interface**: `api.errors.proxy.NoPermission` +- **summary**: Call may not be made by proxy because it may escalate its privileges. + +### `NoSelfProxy` + +- **interface**: `api.errors.proxy.NoSelfProxy` +- **summary**: Cannot add self as proxy. + +### `NotFound` + +- **interface**: `api.errors.proxy.NotFound` +- **summary**: Proxy registration not found. + +### `NotProxy` + +- **interface**: `api.errors.proxy.NotProxy` +- **summary**: Sender is not a proxy of the account to be proxied. + +### `TooMany` + +- **interface**: `api.errors.proxy.TooMany` +- **summary**: There are too many proxies registered or too many announcements pending. + +### `Unannounced` + +- **interface**: `api.errors.proxy.Unannounced` +- **summary**: Announcement, if made at all, was made too recently. + +### `Unproxyable` + +- **interface**: `api.errors.proxy.Unproxyable` +- **summary**: A call which is incompatible with the proxy type's filter was attempted. + + +## `registry` + +### `CannotRegister` + +- **interface**: `api.errors.registry.CannotRegister` +- **summary**: Account attempted to register an identity but does not meet the requirements. + +### `NotRegistered` + +- **interface**: `api.errors.registry.NotRegistered` +- **summary**: Account doesn't have a registered identity + +### `TooManyFieldsInIdentityInfo` + +- **interface**: `api.errors.registry.TooManyFieldsInIdentityInfo` +- **summary**: Account passed too many additional fields to their identity + + +## `safeMode` + +### `AlreadyDeposited` + +- **interface**: `api.errors.safeMode.AlreadyDeposited` +- **summary**: The account already has a deposit reserved and can therefore not enter or extend again. + +### `CannotReleaseYet` + +- **interface**: `api.errors.safeMode.CannotReleaseYet` +- **summary**: This deposit cannot be released yet. + +### `CurrencyError` + +- **interface**: `api.errors.safeMode.CurrencyError` +- **summary**: An error from the underlying `Currency`. + +### `Entered` + +- **interface**: `api.errors.safeMode.Entered` +- **summary**: The safe-mode is (already or still) entered. + +### `Exited` + +- **interface**: `api.errors.safeMode.Exited` +- **summary**: The safe-mode is (already or still) exited. + +### `NoDeposit` + +- **interface**: `api.errors.safeMode.NoDeposit` +- **summary**: There is no balance reserved. + +### `NotConfigured` + +- **interface**: `api.errors.safeMode.NotConfigured` +- **summary**: This functionality of the pallet is disabled by the configuration. + + +## `scheduler` + +### `FailedToSchedule` + +- **interface**: `api.errors.scheduler.FailedToSchedule` +- **summary**: Failed to schedule a call + +### `Named` + +- **interface**: `api.errors.scheduler.Named` +- **summary**: Attempt to use a non-named function on a named task. + +### `NotFound` + +- **interface**: `api.errors.scheduler.NotFound` +- **summary**: Cannot find the scheduled call. + +### `RescheduleNoChange` + +- **interface**: `api.errors.scheduler.RescheduleNoChange` +- **summary**: Reschedule failed because it does not change scheduled time. + +### `TargetBlockNumberInPast` + +- **interface**: `api.errors.scheduler.TargetBlockNumberInPast` +- **summary**: Given target block number is in the past. + + +## `subtensorModule` + +### `ActivityCutoffTooLow` + +- **interface**: `api.errors.subtensorModule.ActivityCutoffTooLow` +- **summary**: Activity cutoff is being set too low. + +### `AddStakeBurnRateLimitExceeded` + +- **interface**: `api.errors.subtensorModule.AddStakeBurnRateLimitExceeded` +- **summary**: "Add stake and burn" exceeded the operation rate limit + +### `AdminActionProhibitedDuringWeightsWindow` + +- **interface**: `api.errors.subtensorModule.AdminActionProhibitedDuringWeightsWindow` +- **summary**: Admin operation is prohibited during the protected weights window + +### `AllNetworksInImmunity` + +- **interface**: `api.errors.subtensorModule.AllNetworksInImmunity` +- **summary**: All subnets are in the immunity period. + +### `AlphaHighTooLow` + +- **interface**: `api.errors.subtensorModule.AlphaHighTooLow` +- **summary**: Alpha high is too low: alpha_high > 0.8 + +### `AlphaLowOutOfRange` + +- **interface**: `api.errors.subtensorModule.AlphaLowOutOfRange` +- **summary**: Alpha low is out of range: alpha_low > 0 && alpha_low \< 0.8 + +### `AmountTooLow` + +- **interface**: `api.errors.subtensorModule.AmountTooLow` +- **summary**: Stake amount is too low. + +### `AnnouncedColdkeyHashDoesNotMatch` + +- **interface**: `api.errors.subtensorModule.AnnouncedColdkeyHashDoesNotMatch` +- **summary**: The announced coldkey hash does not match the new coldkey hash. + +### `BalanceWithdrawalError` + +- **interface**: `api.errors.subtensorModule.BalanceWithdrawalError` +- **summary**: The caller is trying to add stake, but for some reason the requested amount could not be withdrawn from the coldkey account. + +### `BeneficiaryDoesNotOwnHotkey` + +- **interface**: `api.errors.subtensorModule.BeneficiaryDoesNotOwnHotkey` +- **summary**: Beneficiary does not own hotkey. + +### `CallDisabled` + +- **interface**: `api.errors.subtensorModule.CallDisabled` +- **summary**: Call is disabled + +### `CannotAffordLockCost` + +- **interface**: `api.errors.subtensorModule.CannotAffordLockCost` +- **summary**: Insufficient funds to meet the subnet lock cost + +### `CannotBurnOrRecycleOnRootSubnet` + +- **interface**: `api.errors.subtensorModule.CannotBurnOrRecycleOnRootSubnet` +- **summary**: Cannot burn or recycle TAO from root subnet + +### `CanNotSetRootNetworkWeights` + +- **interface**: `api.errors.subtensorModule.CanNotSetRootNetworkWeights` +- **summary**: Can not set weights for the root network. + +### `CannotUnstakeLock` + +- **interface**: `api.errors.subtensorModule.CannotUnstakeLock` +- **summary**: Trying to unstake your lock amount. + +### `ChildParentInconsistency` + +- **interface**: `api.errors.subtensorModule.ChildParentInconsistency` +- **summary**: Violating the rules of Childkey-Parentkey consistency + +### `ColdKeyAlreadyAssociated` + +- **interface**: `api.errors.subtensorModule.ColdKeyAlreadyAssociated` +- **summary**: The coldkey has already been swapped + +### `ColdkeySwapAlreadyDisputed` + +- **interface**: `api.errors.subtensorModule.ColdkeySwapAlreadyDisputed` +- **summary**: Coldkey swap already disputed + +### `ColdkeySwapAnnounced` + +- **interface**: `api.errors.subtensorModule.ColdkeySwapAnnounced` +- **summary**: A coldkey swap has been announced for this account. + +### `ColdkeySwapAnnouncementNotFound` + +- **interface**: `api.errors.subtensorModule.ColdkeySwapAnnouncementNotFound` +- **summary**: Coldkey swap announcement not found + +### `ColdkeySwapClearTooEarly` + +- **interface**: `api.errors.subtensorModule.ColdkeySwapClearTooEarly` +- **summary**: Coldkey swap clear too early. + +### `ColdkeySwapDisputed` + +- **interface**: `api.errors.subtensorModule.ColdkeySwapDisputed` +- **summary**: A coldkey swap for this account is under dispute. + +### `ColdkeySwapReannouncedTooEarly` + +- **interface**: `api.errors.subtensorModule.ColdkeySwapReannouncedTooEarly` +- **summary**: Coldkey swap reannounced too early. + +### `ColdkeySwapTooEarly` + +- **interface**: `api.errors.subtensorModule.ColdkeySwapTooEarly` +- **summary**: Coldkey swap too early. + +### `CommitRevealDisabled` + +- **interface**: `api.errors.subtensorModule.CommitRevealDisabled` +- **summary**: Attemtping to commit/reveal weights when disabled. + +### `CommitRevealEnabled` + +- **interface**: `api.errors.subtensorModule.CommitRevealEnabled` +- **summary**: Attempting to call set_weights when commit/reveal is enabled + +### `CommittingWeightsTooFast` + +- **interface**: `api.errors.subtensorModule.CommittingWeightsTooFast` +- **summary**: A transactor exceeded the rate limit for setting weights. + +### `DelegateTakeTooHigh` + +- **interface**: `api.errors.subtensorModule.DelegateTakeTooHigh` +- **summary**: Delegate take is too high. + +### `DelegateTakeTooLow` + +- **interface**: `api.errors.subtensorModule.DelegateTakeTooLow` +- **summary**: Delegate take is too low. + +### `DelegateTxRateLimitExceeded` + +- **interface**: `api.errors.subtensorModule.DelegateTxRateLimitExceeded` +- **summary**: A transactor exceeded the rate limit for delegate transaction. + +### `Deprecated` + +- **interface**: `api.errors.subtensorModule.Deprecated` +- **summary**: Deprecated call. + +### `DisabledTemporarily` + +- **interface**: `api.errors.subtensorModule.DisabledTemporarily` +- **summary**: Disabled temporarily. + +### `DuplicateChild` + +- **interface**: `api.errors.subtensorModule.DuplicateChild` +- **summary**: Duplicate child when setting children. + +### `DuplicateUids` + +- **interface**: `api.errors.subtensorModule.DuplicateUids` +- **summary**: The caller is attempting to set weights with duplicate UIDs in the weight matrix. + +### `EvmKeyAssociateRateLimitExceeded` + +- **interface**: `api.errors.subtensorModule.EvmKeyAssociateRateLimitExceeded` +- **summary**: exceeded the rate limit for associating an EVM key. + +### `ExpectedBeneficiaryOrigin` + +- **interface**: `api.errors.subtensorModule.ExpectedBeneficiaryOrigin` +- **summary**: Expected beneficiary origin. + +### `ExpiredWeightCommit` + +- **interface**: `api.errors.subtensorModule.ExpiredWeightCommit` +- **summary**: Attempted to reveal weights that are expired. + +### `FaucetDisabled` + +- **interface**: `api.errors.subtensorModule.FaucetDisabled` +- **summary**: Faucet is disabled. + +### `FirstEmissionBlockNumberAlreadySet` + +- **interface**: `api.errors.subtensorModule.FirstEmissionBlockNumberAlreadySet` +- **summary**: FirstEmissionBlockNumber is already set. + +### `HotKeyAccountNotExists` + +- **interface**: `api.errors.subtensorModule.HotKeyAccountNotExists` +- **summary**: The hotkey does not exists + +### `HotKeyAlreadyDelegate` + +- **interface**: `api.errors.subtensorModule.HotKeyAlreadyDelegate` +- **summary**: The hotkey is attempting to become a delegate when the hotkey is already a delegate. + +### `HotKeyAlreadyRegisteredInSubNet` + +- **interface**: `api.errors.subtensorModule.HotKeyAlreadyRegisteredInSubNet` +- **summary**: The caller is requesting registering a neuron which already exists in the active set. + +### `HotKeyNotRegisteredInNetwork` + +- **interface**: `api.errors.subtensorModule.HotKeyNotRegisteredInNetwork` +- **summary**: The hotkey is not registered in any subnet. + +### `HotKeyNotRegisteredInSubNet` + +- **interface**: `api.errors.subtensorModule.HotKeyNotRegisteredInSubNet` +- **summary**: The hotkey is not registered in subnet + +### `HotKeySetTxRateLimitExceeded` + +- **interface**: `api.errors.subtensorModule.HotKeySetTxRateLimitExceeded` +- **summary**: A transactor exceeded the rate limit for setting or swapping hotkey. + +### `HotKeySwapOnSubnetIntervalNotPassed` + +- **interface**: `api.errors.subtensorModule.HotKeySwapOnSubnetIntervalNotPassed` +- **summary**: Too frequent hotkey swap on subnet + +### `IncorrectCommitRevealVersion` + +- **interface**: `api.errors.subtensorModule.IncorrectCommitRevealVersion` +- **summary**: Incorrect commit-reveal version. + +### `IncorrectWeightVersionKey` + +- **interface**: `api.errors.subtensorModule.IncorrectWeightVersionKey` +- **summary**: A validator is attempting to set weights from a validator with incorrect weight version. + +### `InputLengthsUnequal` + +- **interface**: `api.errors.subtensorModule.InputLengthsUnequal` +- **summary**: Attempted to batch reveal weights with mismatched vector input lenghts. + +### `InsufficientBalance` + +- **interface**: `api.errors.subtensorModule.InsufficientBalance` +- **summary**: The caller does not have enough balance for the operation. + +### `InsufficientLiquidity` + +- **interface**: `api.errors.subtensorModule.InsufficientLiquidity` +- **summary**: Not enough liquidity. + +### `InvalidChild` + +- **interface**: `api.errors.subtensorModule.InvalidChild` +- **summary**: Attempting to set an invalid child for a hotkey on a network. + +### `InvalidChildkeyTake` + +- **interface**: `api.errors.subtensorModule.InvalidChildkeyTake` +- **summary**: Childkey take is invalid. + +### `InvalidDifficulty` + +- **interface**: `api.errors.subtensorModule.InvalidDifficulty` +- **summary**: The supplied PoW hash block does not meet the network difficulty. + +### `InvalidIdentity` + +- **interface**: `api.errors.subtensorModule.InvalidIdentity` +- **summary**: Invalid identity. + +### `InvalidIpAddress` + +- **interface**: `api.errors.subtensorModule.InvalidIpAddress` +- **summary**: An invalid IP address is passed to the serve function. + +### `InvalidIpType` + +- **interface**: `api.errors.subtensorModule.InvalidIpType` +- **summary**: The user is trying to serve an axon which is not of type 4 (IPv4) or 6 (IPv6). + +### `InvalidLeaseBeneficiary` + +- **interface**: `api.errors.subtensorModule.InvalidLeaseBeneficiary` +- **summary**: Invalid lease beneficiary to register the leased network. + +### `InvalidNumRootClaim` + +- **interface**: `api.errors.subtensorModule.InvalidNumRootClaim` +- **summary**: Invalid number of root claims + +### `InvalidPort` + +- **interface**: `api.errors.subtensorModule.InvalidPort` +- **summary**: An invalid port is passed to the serve function. + +### `InvalidRecoveredPublicKey` + +- **interface**: `api.errors.subtensorModule.InvalidRecoveredPublicKey` +- **summary**: Recovered public key is invalid. + +### `InvalidRevealCommitHashNotMatch` + +- **interface**: `api.errors.subtensorModule.InvalidRevealCommitHashNotMatch` +- **summary**: Committed hash does not equal the hashed reveal data. + +### `InvalidRootClaimThreshold` + +- **interface**: `api.errors.subtensorModule.InvalidRootClaimThreshold` +- **summary**: Invalid value of root claim threshold + +### `InvalidSeal` + +- **interface**: `api.errors.subtensorModule.InvalidSeal` +- **summary**: The supplied PoW hash seal does not match the supplied work. + +### `InvalidSubnetNumber` + +- **interface**: `api.errors.subtensorModule.InvalidSubnetNumber` +- **summary**: Exceeded subnet limit number or zero. + +### `InvalidValue` + +- **interface**: `api.errors.subtensorModule.InvalidValue` +- **summary**: Generic error for out-of-range parameter value + +### `InvalidVotingPowerEmaAlpha` + +- **interface**: `api.errors.subtensorModule.InvalidVotingPowerEmaAlpha` +- **summary**: Invalid voting power EMA alpha value (must be \<= 10^18). + +### `InvalidWorkBlock` + +- **interface**: `api.errors.subtensorModule.InvalidWorkBlock` +- **summary**: The supplied PoW hash block is in the future or negative. + +### `LeaseCannotEndInThePast` + +- **interface**: `api.errors.subtensorModule.LeaseCannotEndInThePast` +- **summary**: Lease cannot end in the past. + +### `LeaseDoesNotExist` + +- **interface**: `api.errors.subtensorModule.LeaseDoesNotExist` +- **summary**: Lease does not exist. + +### `LeaseHasNoEndBlock` + +- **interface**: `api.errors.subtensorModule.LeaseHasNoEndBlock` +- **summary**: Lease has no end block. + +### `LeaseHasNotEnded` + +- **interface**: `api.errors.subtensorModule.LeaseHasNotEnded` +- **summary**: Lease has not ended. + +### `LeaseNetuidNotFound` + +- **interface**: `api.errors.subtensorModule.LeaseNetuidNotFound` +- **summary**: Couldn't find the lease netuid. + +### `LiquidAlphaDisabled` + +- **interface**: `api.errors.subtensorModule.LiquidAlphaDisabled` +- **summary**: Attempting to set alpha high/low while disabled + +### `MaxWeightExceeded` + +- **interface**: `api.errors.subtensorModule.MaxWeightExceeded` +- **summary**: The dispatch is attempting to set weights on chain with weight value exceeding the configured max weight limit (currently `u16::MAX`). + +### `MechanismDoesNotExist` + +- **interface**: `api.errors.subtensorModule.MechanismDoesNotExist` +- **summary**: Subnet mechanism does not exist. + +### `NeedWaitingMoreBlocksToStarCall` + +- **interface**: `api.errors.subtensorModule.NeedWaitingMoreBlocksToStarCall` +- **summary**: need wait for more blocks to accept the start call extrinsic. + +### `NetworkTxRateLimitExceeded` + +- **interface**: `api.errors.subtensorModule.NetworkTxRateLimitExceeded` +- **summary**: A transactor exceeded the rate limit for add network transaction. + +### `NeuronNoValidatorPermit` + +- **interface**: `api.errors.subtensorModule.NeuronNoValidatorPermit` +- **summary**: The caller is attempting to set non-self weights without being a permitted validator. + +### `NewColdKeyIsHotkey` + +- **interface**: `api.errors.subtensorModule.NewColdKeyIsHotkey` +- **summary**: New coldkey is hotkey + +### `NewHotKeyIsSameWithOld` + +- **interface**: `api.errors.subtensorModule.NewHotKeyIsSameWithOld` +- **summary**: The new hotkey is the same as old one + +### `NonAssociatedColdKey` + +- **interface**: `api.errors.subtensorModule.NonAssociatedColdKey` +- **summary**: Request to stake, unstake or subscribe is made by a coldkey that is not associated with the hotkey account. + +### `NoNeuronIdAvailable` + +- **interface**: `api.errors.subtensorModule.NoNeuronIdAvailable` +- **summary**: No neuron ID is available. + +### `NotEnoughAlphaOutToRecycle` + +- **interface**: `api.errors.subtensorModule.NotEnoughAlphaOutToRecycle` +- **summary**: Not enough AlphaOut on the subnet to recycle + +### `NotEnoughBalanceToPaySwapColdKey` + +- **interface**: `api.errors.subtensorModule.NotEnoughBalanceToPaySwapColdKey` +- **summary**: The coldkey balance is not enough to pay for the swap + +### `NotEnoughBalanceToPaySwapHotKey` + +- **interface**: `api.errors.subtensorModule.NotEnoughBalanceToPaySwapHotKey` +- **summary**: Not enough balance to pay swapping hotkey. + +### `NotEnoughBalanceToStake` + +- **interface**: `api.errors.subtensorModule.NotEnoughBalanceToStake` +- **summary**: The caller is requesting adding more stake than there exists in the coldkey account. See: "[add_stake()]" + +### `NotEnoughStake` + +- **interface**: `api.errors.subtensorModule.NotEnoughStake` +- **summary**: DEPRECATED: Stake amount to withdraw is zero. The caller does not have enought stake to perform this action. + +### `NotEnoughStakeToSetChildkeys` + +- **interface**: `api.errors.subtensorModule.NotEnoughStakeToSetChildkeys` +- **summary**: The parent hotkey doesn't have enough own stake to set childkeys. + +### `NotEnoughStakeToSetWeights` + +- **interface**: `api.errors.subtensorModule.NotEnoughStakeToSetWeights` +- **summary**: The caller is requesting to set weights but the caller has less than minimum stake required to set weights (less than WeightsMinStake). + +### `NotEnoughStakeToWithdraw` + +- **interface**: `api.errors.subtensorModule.NotEnoughStakeToWithdraw` +- **summary**: The caller is requesting removing more stake than there exists in the staking account. See: "[remove_stake()]". + +### `NotRootSubnet` + +- **interface**: `api.errors.subtensorModule.NotRootSubnet` +- **summary**: Netuid does not match for setting root network weights. + +### `NotSubnetOwner` + +- **interface**: `api.errors.subtensorModule.NotSubnetOwner` +- **summary**: Not a subnet owner. + +### `NoWeightsCommitFound` + +- **interface**: `api.errors.subtensorModule.NoWeightsCommitFound` +- **summary**: No commit found for the provided hotkey+netuid combination when attempting to reveal the weights. + +### `Overflow` + +- **interface**: `api.errors.subtensorModule.Overflow` +- **summary**: An overflow occurred. + +### `PrecisionLoss` + +- **interface**: `api.errors.subtensorModule.PrecisionLoss` +- **summary**: Unintended precision loss when unstaking alpha + +### `ProportionOverflow` + +- **interface**: `api.errors.subtensorModule.ProportionOverflow` +- **summary**: Proportion overflow when setting children. + +### `RegistrationNotPermittedOnRootSubnet` + +- **interface**: `api.errors.subtensorModule.RegistrationNotPermittedOnRootSubnet` +- **summary**: Operation is not permitted on the root subnet. + +### `RevealPeriodTooLarge` + +- **interface**: `api.errors.subtensorModule.RevealPeriodTooLarge` +- **summary**: Reveal period is too large. + +### `RevealPeriodTooSmall` + +- **interface**: `api.errors.subtensorModule.RevealPeriodTooSmall` +- **summary**: Reveal period is too small. + +### `RevealTooEarly` + +- **interface**: `api.errors.subtensorModule.RevealTooEarly` +- **summary**: Attempted to reveal weights too early. + +### `RootNetworkDoesNotExist` + +- **interface**: `api.errors.subtensorModule.RootNetworkDoesNotExist` +- **summary**: The root network does not exist. + +### `SameAutoStakeHotkeyAlreadySet` + +- **interface**: `api.errors.subtensorModule.SameAutoStakeHotkeyAlreadySet` +- **summary**: Same auto stake hotkey already set + +### `SameNetuid` + +- **interface**: `api.errors.subtensorModule.SameNetuid` +- **summary**: Invalid netuid duplication + +### `ServingRateLimitExceeded` + +- **interface**: `api.errors.subtensorModule.ServingRateLimitExceeded` +- **summary**: An axon or prometheus serving exceeded the rate limit for a registered neuron. + +### `SettingWeightsTooFast` + +- **interface**: `api.errors.subtensorModule.SettingWeightsTooFast` +- **summary**: A transactor exceeded the rate limit for setting weights. + +### `SlippageTooHigh` + +- **interface**: `api.errors.subtensorModule.SlippageTooHigh` +- **summary**: Slippage is too high for the transaction. + +### `StakeTooLowForRoot` + +- **interface**: `api.errors.subtensorModule.StakeTooLowForRoot` +- **summary**: A hotkey with too little stake is attempting to join the root subnet. + +### `StakingOperationRateLimitExceeded` + +- **interface**: `api.errors.subtensorModule.StakingOperationRateLimitExceeded` +- **summary**: Too frequent staking operations + +### `StakingRateLimitExceeded` + +- **interface**: `api.errors.subtensorModule.StakingRateLimitExceeded` +- **summary**: A transactor exceeded the rate limit for staking. + +### `SubnetLimitReached` + +- **interface**: `api.errors.subtensorModule.SubnetLimitReached` +- **summary**: Subnet limit reached & there is no eligible subnet to prune + +### `SubnetNotExists` + +- **interface**: `api.errors.subtensorModule.SubnetNotExists` +- **summary**: Trying to perform action on non-existent subnet. + +### `SubNetRegistrationDisabled` + +- **interface**: `api.errors.subtensorModule.SubNetRegistrationDisabled` +- **summary**: Registration is disabled. + +### `SubtokenDisabled` + +- **interface**: `api.errors.subtensorModule.SubtokenDisabled` +- **summary**: SubToken disabled now + +### `SymbolAlreadyInUse` + +- **interface**: `api.errors.subtensorModule.SymbolAlreadyInUse` +- **summary**: Symbol already in use. + +### `SymbolDoesNotExist` + +- **interface**: `api.errors.subtensorModule.SymbolDoesNotExist` +- **summary**: Symbol does not exist. + +### `TooManyChildren` + +- **interface**: `api.errors.subtensorModule.TooManyChildren` +- **summary**: Too many children MAX 5. + +### `TooManyRegistrationsThisBlock` + +- **interface**: `api.errors.subtensorModule.TooManyRegistrationsThisBlock` +- **summary**: Number of registrations in this block exceeds the allowed number (i.e., exceeds the subnet hyperparameter "max_regs_per_block"). + +### `TooManyRegistrationsThisInterval` + +- **interface**: `api.errors.subtensorModule.TooManyRegistrationsThisInterval` +- **summary**: The number of registration attempts exceeded the allowed number in the interval. + +### `TooManyUIDsPerMechanism` + +- **interface**: `api.errors.subtensorModule.TooManyUIDsPerMechanism` +- **summary**: The maximum allowed UIDs times mechanism count should not exceed 256. + +### `TooManyUnrevealedCommits` + +- **interface**: `api.errors.subtensorModule.TooManyUnrevealedCommits` +- **summary**: Maximum commit limit reached + +### `TransactorAccountShouldBeHotKey` + +- **interface**: `api.errors.subtensorModule.TransactorAccountShouldBeHotKey` +- **summary**: The hotkey is required to be the origin. + +### `TransferDisallowed` + +- **interface**: `api.errors.subtensorModule.TransferDisallowed` +- **summary**: Subnet disallows transfer. + +### `TrimmingWouldExceedMaxImmunePercentage` + +- **interface**: `api.errors.subtensorModule.TrimmingWouldExceedMaxImmunePercentage` +- **summary**: Trimming would exceed the max immune neurons percentage + +### `TxChildkeyTakeRateLimitExceeded` + +- **interface**: `api.errors.subtensorModule.TxChildkeyTakeRateLimitExceeded` +- **summary**: Childkey take rate limit exceeded. + +### `TxRateLimitExceeded` + +- **interface**: `api.errors.subtensorModule.TxRateLimitExceeded` +- **summary**: Default transaction rate limit exceeded. + +### `UidMapCouldNotBeCleared` + +- **interface**: `api.errors.subtensorModule.UidMapCouldNotBeCleared` +- **summary**: The UID map for the subnet could not be cleared + +### `UidsLengthExceedUidsInSubNet` + +- **interface**: `api.errors.subtensorModule.UidsLengthExceedUidsInSubNet` +- **summary**: The caller is attempting to set weights with more UIDs than allowed. + +### `UidVecContainInvalidOne` + +- **interface**: `api.errors.subtensorModule.UidVecContainInvalidOne` +- **summary**: The caller is attempting to set weight to at least one UID that does not exist in the metagraph. + +### `UnableToRecoverPublicKey` + +- **interface**: `api.errors.subtensorModule.UnableToRecoverPublicKey` +- **summary**: Public key cannot be recovered. + +### `VotingPowerTrackingNotEnabled` + +- **interface**: `api.errors.subtensorModule.VotingPowerTrackingNotEnabled` +- **summary**: Voting power tracking is not enabled for this subnet. + +### `WeightVecLengthIsLow` + +- **interface**: `api.errors.subtensorModule.WeightVecLengthIsLow` +- **summary**: The dispatch is attempting to set weights on chain with fewer elements than are allowed. + +### `WeightVecNotEqualSize` + +- **interface**: `api.errors.subtensorModule.WeightVecNotEqualSize` +- **summary**: The caller is attempting to set the weight keys and values but these vectors have different size. + +### `ZeroBalanceAfterWithdrawn` + +- **interface**: `api.errors.subtensorModule.ZeroBalanceAfterWithdrawn` +- **summary**: Unsuccessfully withdraw, balance could be zero (can not make account exist) after withdrawal. + +### `ZeroMaxStakeAmount` + +- **interface**: `api.errors.subtensorModule.ZeroMaxStakeAmount` +- **summary**: Zero max stake amount + + +## `sudo` + +### `RequireSudo` + +- **interface**: `api.errors.sudo.RequireSudo` +- **summary**: Sender must be the Sudo account. + + +## `swap` + +### `FeeRateTooHigh` + +- **interface**: `api.errors.swap.FeeRateTooHigh` +- **summary**: The fee rate is too high + +### `InsufficientBalance` + +- **interface**: `api.errors.swap.InsufficientBalance` +- **summary**: The caller does not have enough balance for the operation. + +### `InsufficientInputAmount` + +- **interface**: `api.errors.swap.InsufficientInputAmount` +- **summary**: The provided amount is insufficient for the swap. + +### `InsufficientLiquidity` + +- **interface**: `api.errors.swap.InsufficientLiquidity` +- **summary**: The provided liquidity is insufficient for the operation. + +### `InvalidLiquidityValue` + +- **interface**: `api.errors.swap.InvalidLiquidityValue` +- **summary**: Provided liquidity parameter is invalid (likely too small) + +### `InvalidTickRange` + +- **interface**: `api.errors.swap.InvalidTickRange` +- **summary**: The provided tick range is invalid. + +### `LiquidityNotFound` + +- **interface**: `api.errors.swap.LiquidityNotFound` +- **summary**: Attempted to remove liquidity that does not exist. + +### `MaxPositionsExceeded` + +- **interface**: `api.errors.swap.MaxPositionsExceeded` +- **summary**: Maximum user positions exceeded + +### `MechanismDoesNotExist` + +- **interface**: `api.errors.swap.MechanismDoesNotExist` +- **summary**: The subnet does not exist. + +### `PriceLimitExceeded` + +- **interface**: `api.errors.swap.PriceLimitExceeded` +- **summary**: The operation would exceed the price limit. + +### `ReservesTooLow` + +- **interface**: `api.errors.swap.ReservesTooLow` +- **summary**: Reserves too low for operation. + +### `SubtokenDisabled` + +- **interface**: `api.errors.swap.SubtokenDisabled` +- **summary**: The subnet does not have subtoken enabled + +### `TooManySwapSteps` + +- **interface**: `api.errors.swap.TooManySwapSteps` +- **summary**: Too many swap steps + +### `UserLiquidityDisabled` + +- **interface**: `api.errors.swap.UserLiquidityDisabled` +- **summary**: User liquidity operations are disabled for this subnet + + +## `system` + +### `CallFiltered` + +- **interface**: `api.errors.system.CallFiltered` +- **summary**: The origin filter prevent the call to be dispatched. + +### `FailedToExtractRuntimeVersion` + +- **interface**: `api.errors.system.FailedToExtractRuntimeVersion` +- **summary**: Failed to extract the runtime version from the new runtime. + + Either calling `Core_version` or decoding `RuntimeVersion` failed. + +### `InvalidSpecName` + +- **interface**: `api.errors.system.InvalidSpecName` +- **summary**: The name of specification does not match between the current runtime and the new runtime. + +### `MultiBlockMigrationsOngoing` + +- **interface**: `api.errors.system.MultiBlockMigrationsOngoing` +- **summary**: A multi-block migration is ongoing and prevents the current code from being replaced. + +### `NonDefaultComposite` + +- **interface**: `api.errors.system.NonDefaultComposite` +- **summary**: Suicide called when the account has non-default composite data. + +### `NonZeroRefCount` + +- **interface**: `api.errors.system.NonZeroRefCount` +- **summary**: There is a non-zero reference count preventing the account from being purged. + +### `NothingAuthorized` + +- **interface**: `api.errors.system.NothingAuthorized` +- **summary**: No upgrade authorized. + +### `SpecVersionNeedsToIncrease` + +- **interface**: `api.errors.system.SpecVersionNeedsToIncrease` +- **summary**: The specification version is not allowed to decrease between the current runtime and the new runtime. + +### `Unauthorized` + +- **interface**: `api.errors.system.Unauthorized` +- **summary**: The submitted code is not authorized. + + +## `utility` + +### `InvalidDerivedAccount` + +- **interface**: `api.errors.utility.InvalidDerivedAccount` +- **summary**: Bad input data for derived account ID + +### `TooManyCalls` + +- **interface**: `api.errors.utility.TooManyCalls` +- **summary**: Too many calls batched. diff --git a/docs/subtensor-api/events.md b/docs/subtensor-api/events.md new file mode 100644 index 000000000..de62d1f4d --- /dev/null +++ b/docs/subtensor-api/events.md @@ -0,0 +1,1428 @@ +# Events + +Runtime events emitted by the Bittensor (Subtensor) runtime. Accessible via `api.events..`. + +:::info +Generated from a live snapshot of the Subtensor runtime on **2026-04-02**. Connected to: `wss://entrypoint-finney.opentensor.ai:443` +::: + + +- **[adminUtils](#adminutils)** +- **[balances](#balances)** +- **[baseFee](#basefee)** +- **[commitments](#commitments)** +- **[contracts](#contracts)** +- **[crowdloan](#crowdloan)** +- **[drand](#drand)** +- **[ethereum](#ethereum)** +- **[evm](#evm)** +- **[grandpa](#grandpa)** +- **[mevShield](#mevshield)** +- **[multisig](#multisig)** +- **[preimage](#preimage)** +- **[proxy](#proxy)** +- **[registry](#registry)** +- **[safeMode](#safemode)** +- **[scheduler](#scheduler)** +- **[subtensorModule](#subtensormodule)** +- **[sudo](#sudo)** +- **[swap](#swap)** +- **[system](#system)** +- **[transactionPayment](#transactionpayment)** +- **[utility](#utility)** + +## `adminUtils` + +### `BondsResetToggled(NetUid, bool)` + +- **interface**: `api.events.adminUtils.BondsResetToggled` +- **summary**: Event emitted when Bonds Reset is toggled. + +### `PrecompileUpdated(PrecompileEnum, bool)` + +- **interface**: `api.events.adminUtils.PrecompileUpdated` +- **summary**: Event emitted when a precompile operation is updated. + +### `Yuma3EnableToggled(NetUid, bool)` + +- **interface**: `api.events.adminUtils.Yuma3EnableToggled` +- **summary**: Event emitted when the Yuma3 enable is toggled. + + +## `balances` + +### `BalanceSet(AccountId, u128)` + +- **interface**: `api.events.balances.BalanceSet` +- **summary**: A balance was set by root. + +### `Burned(AccountId, u128)` + +- **interface**: `api.events.balances.Burned` +- **summary**: Some amount was burned from an account. + +### `Deposit(AccountId, u128)` + +- **interface**: `api.events.balances.Deposit` +- **summary**: Some amount was deposited (e.g. for transaction fees). + +### `DustLost(AccountId, u128)` + +- **interface**: `api.events.balances.DustLost` +- **summary**: An account was removed whose balance was non-zero but below ExistentialDeposit, resulting in an outright loss. + +### `Endowed(AccountId, u128)` + +- **interface**: `api.events.balances.Endowed` +- **summary**: An account was created with some free balance. + +### `Frozen(AccountId, u128)` + +- **interface**: `api.events.balances.Frozen` +- **summary**: Some balance was frozen. + +### `Issued(u128)` + +- **interface**: `api.events.balances.Issued` +- **summary**: Total issuance was increased by `amount`, creating a credit to be balanced. + +### `Locked(AccountId, u128)` + +- **interface**: `api.events.balances.Locked` +- **summary**: Some balance was locked. + +### `Minted(AccountId, u128)` + +- **interface**: `api.events.balances.Minted` +- **summary**: Some amount was minted into an account. + +### `Rescinded(u128)` + +- **interface**: `api.events.balances.Rescinded` +- **summary**: Total issuance was decreased by `amount`, creating a debt to be balanced. + +### `Reserved(AccountId, u128)` + +- **interface**: `api.events.balances.Reserved` +- **summary**: Some balance was reserved (moved from free to reserved). + +### `ReserveRepatriated(AccountId, AccountId, u128, Status)` + +- **interface**: `api.events.balances.ReserveRepatriated` +- **summary**: Some balance was moved from the reserve of the first account to the second account. Final argument indicates the destination balance type. + +### `Restored(AccountId, u128)` + +- **interface**: `api.events.balances.Restored` +- **summary**: Some amount was restored into an account. + +### `Slashed(AccountId, u128)` + +- **interface**: `api.events.balances.Slashed` +- **summary**: Some amount was removed from the account (e.g. for misbehavior). + +### `Suspended(AccountId, u128)` + +- **interface**: `api.events.balances.Suspended` +- **summary**: Some amount was suspended from an account (it can be restored later). + +### `Thawed(AccountId, u128)` + +- **interface**: `api.events.balances.Thawed` +- **summary**: Some balance was thawed. + +### `TotalIssuanceForced(u128, u128)` + +- **interface**: `api.events.balances.TotalIssuanceForced` +- **summary**: The `TotalIssuance` was forcefully changed. + +### `Transfer(AccountId, AccountId, u128)` + +- **interface**: `api.events.balances.Transfer` +- **summary**: Transfer succeeded. + +### `Unlocked(AccountId, u128)` + +- **interface**: `api.events.balances.Unlocked` +- **summary**: Some balance was unlocked. + +### `Unreserved(AccountId, u128)` + +- **interface**: `api.events.balances.Unreserved` +- **summary**: Some balance was unreserved (moved from reserved to free). + +### `Upgraded(AccountId)` + +- **interface**: `api.events.balances.Upgraded` +- **summary**: An account was upgraded. + +### `Withdraw(AccountId, u128)` + +- **interface**: `api.events.balances.Withdraw` +- **summary**: Some amount was withdrawn from the account (e.g. for transaction fees). + + +## `baseFee` + +### `BaseFeeOverflow()` + +- **interface**: `api.events.baseFee.BaseFeeOverflow` + +### `NewBaseFeePerGas(U256)` + +- **interface**: `api.events.baseFee.NewBaseFeePerGas` + +### `NewElasticity(Permill)` + +- **interface**: `api.events.baseFee.NewElasticity` + + +## `commitments` + +### `Commitment(NetUid, AccountId)` + +- **interface**: `api.events.commitments.Commitment` +- **summary**: A commitment was set + +### `CommitmentRevealed(NetUid, AccountId)` + +- **interface**: `api.events.commitments.CommitmentRevealed` +- **summary**: A timelock-encrypted commitment was auto-revealed + +### `TimelockCommitment(NetUid, AccountId, u64)` + +- **interface**: `api.events.commitments.TimelockCommitment` +- **summary**: A timelock-encrypted commitment was set + + +## `contracts` + +### `Called(Origin, AccountId)` + +- **interface**: `api.events.contracts.Called` +- **summary**: A contract was called either by a plain account or another contract. + + **Note:** + + Please keep in mind that like all events this is only emitted for successful calls. This is because on failure all storage changes including events are rolled back. + +### `CodeRemoved(H256, u128, AccountId)` + +- **interface**: `api.events.contracts.CodeRemoved` +- **summary**: A code with the specified hash was removed. + +### `CodeStored(H256, u128, AccountId)` + +- **interface**: `api.events.contracts.CodeStored` +- **summary**: Code with the specified hash has been stored. + +### `ContractCodeUpdated(AccountId, H256, H256)` + +- **interface**: `api.events.contracts.ContractCodeUpdated` +- **summary**: A contract's code was updated. + +### `ContractEmitted(AccountId, Vec)` + +- **interface**: `api.events.contracts.ContractEmitted` +- **summary**: A custom event emitted by the contract. + +### `DelegateCalled(AccountId, CodeHash)` + +- **interface**: `api.events.contracts.DelegateCalled` +- **summary**: A contract delegate called a code hash. + + **Note:** + + Please keep in mind that like all events this is only emitted for successful calls. This is because on failure all storage changes including events are rolled back. + +### `Instantiated(AccountId, AccountId)` + +- **interface**: `api.events.contracts.Instantiated` +- **summary**: Contract deployed by address at the specified address. + +### `StorageDepositTransferredAndHeld(AccountId, AccountId, u128)` + +- **interface**: `api.events.contracts.StorageDepositTransferredAndHeld` +- **summary**: Some funds have been transferred and held as storage deposit. + +### `StorageDepositTransferredAndReleased(AccountId, AccountId, u128)` + +- **interface**: `api.events.contracts.StorageDepositTransferredAndReleased` +- **summary**: Some storage deposit funds have been transferred and released. + +### `Terminated(AccountId, AccountId)` + +- **interface**: `api.events.contracts.Terminated` +- **summary**: Contract has been removed. + + **Note:** + + The only way for a contract to be removed and emitting this event is by calling `seal_terminate`. + + +## `crowdloan` + +### `AllRefunded(CrowdloanId)` + +- **interface**: `api.events.crowdloan.AllRefunded` +- **summary**: A refund was fully processed for a failed crowdloan. + +### `CapUpdated(CrowdloanId, u128)` + +- **interface**: `api.events.crowdloan.CapUpdated` +- **summary**: The cap was updated. + +### `Contributed(CrowdloanId, AccountId, u128)` + +- **interface**: `api.events.crowdloan.Contributed` +- **summary**: A contribution was made to an active crowdloan. + +### `Created(CrowdloanId, AccountId, u32, u128)` + +- **interface**: `api.events.crowdloan.Created` +- **summary**: A crowdloan was created. + +### `Dissolved(CrowdloanId)` + +- **interface**: `api.events.crowdloan.Dissolved` +- **summary**: A crowdloan was dissolved. + +### `EndUpdated(CrowdloanId, u32)` + +- **interface**: `api.events.crowdloan.EndUpdated` +- **summary**: The end was updated. + +### `Finalized(CrowdloanId)` + +- **interface**: `api.events.crowdloan.Finalized` +- **summary**: A crowdloan was finalized, funds were transferred and the call was dispatched. + +### `MinContributionUpdated(CrowdloanId, u128)` + +- **interface**: `api.events.crowdloan.MinContributionUpdated` +- **summary**: The minimum contribution was updated. + +### `PartiallyRefunded(CrowdloanId)` + +- **interface**: `api.events.crowdloan.PartiallyRefunded` +- **summary**: A refund was partially processed for a failed crowdloan. + +### `Withdrew(CrowdloanId, AccountId, u128)` + +- **interface**: `api.events.crowdloan.Withdrew` +- **summary**: A contribution was withdrawn from a failed crowdloan. + + +## `drand` + +### `BeaconConfigChanged()` + +- **interface**: `api.events.drand.BeaconConfigChanged` +- **summary**: Beacon Configuration has changed. + +### `NewPulse(Vec)` + +- **interface**: `api.events.drand.NewPulse` +- **summary**: Successfully set a new pulse(s). + +### `SetOldestStoredRound(u64)` + +- **interface**: `api.events.drand.SetOldestStoredRound` +- **summary**: Oldest Stored Round has been set. + + +## `ethereum` + +### `Executed(H160, H160, H256, ExitReason, Vec)` + +- **interface**: `api.events.ethereum.Executed` +- **summary**: An ethereum transaction was successfully executed. + + +## `evm` + +### `Created(H160)` + +- **interface**: `api.events.evm.Created` +- **summary**: A contract has been created at given address. + +### `CreatedFailed(H160)` + +- **interface**: `api.events.evm.CreatedFailed` +- **summary**: A contract was attempted to be created, but the execution failed. + +### `Executed(H160)` + +- **interface**: `api.events.evm.Executed` +- **summary**: A contract has been executed successfully with states applied. + +### `ExecutedFailed(H160)` + +- **interface**: `api.events.evm.ExecutedFailed` +- **summary**: A contract has been executed with errors. States are reverted with only gas fees applied. + +### `Log(Log)` + +- **interface**: `api.events.evm.Log` +- **summary**: Ethereum events from contracts. + + +## `grandpa` + +### `NewAuthorities(AuthorityList)` + +- **interface**: `api.events.grandpa.NewAuthorities` +- **summary**: New authority set has been applied. + +### `Paused()` + +- **interface**: `api.events.grandpa.Paused` +- **summary**: Current authority set has been paused. + +### `Resumed()` + +- **interface**: `api.events.grandpa.Resumed` +- **summary**: Current authority set has been resumed. + + +## `mevShield` + +### `EncryptedSubmitted(H256, AccountId)` + +- **interface**: `api.events.mevShield.EncryptedSubmitted` +- **summary**: Encrypted wrapper accepted. + + +## `multisig` + +### `DepositPoked(AccountId, CallHash, u128, u128)` + +- **interface**: `api.events.multisig.DepositPoked` +- **summary**: The deposit for a multisig operation has been updated/poked. + +### `MultisigApproval(AccountId, Timepoint>, AccountId, CallHash)` + +- **interface**: `api.events.multisig.MultisigApproval` +- **summary**: A multisig operation has been approved by someone. + +### `MultisigCancelled(AccountId, Timepoint>, AccountId, CallHash)` + +- **interface**: `api.events.multisig.MultisigCancelled` +- **summary**: A multisig operation has been cancelled. + +### `MultisigExecuted(AccountId, Timepoint>, AccountId, CallHash, DispatchResult)` + +- **interface**: `api.events.multisig.MultisigExecuted` +- **summary**: A multisig operation has been executed. + +### `NewMultisig(AccountId, AccountId, CallHash)` + +- **interface**: `api.events.multisig.NewMultisig` +- **summary**: A new multisig operation has begun. + + +## `preimage` + +### `Cleared(H256)` + +- **interface**: `api.events.preimage.Cleared` +- **summary**: A preimage has ben cleared. + +### `Noted(H256)` + +- **interface**: `api.events.preimage.Noted` +- **summary**: A preimage has been noted. + +### `Requested(H256)` + +- **interface**: `api.events.preimage.Requested` +- **summary**: A preimage has been requested. + + +## `proxy` + +### `Announced(AccountId, AccountId, CallHashOf)` + +- **interface**: `api.events.proxy.Announced` +- **summary**: An announcement was placed to make a call in the future. + +### `DepositPoked(AccountId, DepositKind, u128, u128)` + +- **interface**: `api.events.proxy.DepositPoked` +- **summary**: A deposit stored for proxies or announcements was poked / updated. + +### `ProxyAdded(AccountId, AccountId, T::ProxyType, u32)` + +- **interface**: `api.events.proxy.ProxyAdded` +- **summary**: A proxy was added. + +### `ProxyExecuted(DispatchResult)` + +- **interface**: `api.events.proxy.ProxyExecuted` +- **summary**: A proxy was executed correctly, with the given. + +### `ProxyRemoved(AccountId, AccountId, T::ProxyType, u32)` + +- **interface**: `api.events.proxy.ProxyRemoved` +- **summary**: A proxy was removed. + +### `PureCreated(AccountId, AccountId, T::ProxyType, u16)` + +- **interface**: `api.events.proxy.PureCreated` +- **summary**: A pure account has been created by new proxy with given disambiguation index and proxy type. + +### `PureKilled(AccountId, AccountId, T::ProxyType, u16)` + +- **interface**: `api.events.proxy.PureKilled` +- **summary**: A pure proxy was killed by its spawner. + +### `RealPaysFeeSet(AccountId, AccountId, bool)` + +- **interface**: `api.events.proxy.RealPaysFeeSet` +- **summary**: The real-pays-fee setting was updated for a proxy relationship. + + +## `registry` + +### `IdentityDissolved(AccountId)` + +- **interface**: `api.events.registry.IdentityDissolved` +- **summary**: Emitted when a user dissolves an identity + +### `IdentitySet(AccountId)` + +- **interface**: `api.events.registry.IdentitySet` +- **summary**: Emitted when a user registers an identity + + +## `safeMode` + +### `CannotDeposit()` + +- **interface**: `api.events.safeMode.CannotDeposit` +- **summary**: Could not hold funds for entering or extending the safe-mode. + + This error comes from the underlying `Currency`. + +### `CannotRelease()` + +- **interface**: `api.events.safeMode.CannotRelease` +- **summary**: Could not release funds for entering or extending the safe-mode. + + This error comes from the underlying `Currency`. + +### `DepositPlaced(AccountId, u128)` + +- **interface**: `api.events.safeMode.DepositPlaced` +- **summary**: An account reserved funds for either entering or extending the safe-mode. + +### `DepositReleased(AccountId, u128)` + +- **interface**: `api.events.safeMode.DepositReleased` +- **summary**: An account had a reserve released that was reserved. + +### `DepositSlashed(AccountId, u128)` + +- **interface**: `api.events.safeMode.DepositSlashed` +- **summary**: An account had reserve slashed that was reserved. + +### `Entered(u32)` + +- **interface**: `api.events.safeMode.Entered` +- **summary**: The safe-mode was entered until inclusively this block. + +### `Exited(ExitReason)` + +- **interface**: `api.events.safeMode.Exited` +- **summary**: Exited the safe-mode for a specific reason. + +### `Extended(u32)` + +- **interface**: `api.events.safeMode.Extended` +- **summary**: The safe-mode was extended until inclusively this block. + + +## `scheduler` + +### `AgendaIncomplete(u32)` + +- **interface**: `api.events.scheduler.AgendaIncomplete` +- **summary**: Agenda is incomplete from `when`. + +### `CallUnavailable(TaskAddress>, Option)` + +- **interface**: `api.events.scheduler.CallUnavailable` +- **summary**: The call for the provided hash was not found so the task has been aborted. + +### `Canceled(u32, u32)` + +- **interface**: `api.events.scheduler.Canceled` +- **summary**: Canceled some task. + +### `Dispatched(TaskAddress>, Option, DispatchResult)` + +- **interface**: `api.events.scheduler.Dispatched` +- **summary**: Dispatched some task. + +### `PeriodicFailed(TaskAddress>, Option)` + +- **interface**: `api.events.scheduler.PeriodicFailed` +- **summary**: The given task was unable to be renewed since the agenda is full at that block. + +### `PermanentlyOverweight(TaskAddress>, Option)` + +- **interface**: `api.events.scheduler.PermanentlyOverweight` +- **summary**: The given task can never be executed since it is overweight. + +### `RetryCancelled(TaskAddress>, Option)` + +- **interface**: `api.events.scheduler.RetryCancelled` +- **summary**: Cancel a retry configuration for some task. + +### `RetryFailed(TaskAddress>, Option)` + +- **interface**: `api.events.scheduler.RetryFailed` +- **summary**: The given task was unable to be retried since the agenda is full at that block or there was not enough weight to reschedule it. + +### `RetrySet(TaskAddress>, Option, u32, u8)` + +- **interface**: `api.events.scheduler.RetrySet` +- **summary**: Set a retry configuration for some task. + +### `Scheduled(u32, u32)` + +- **interface**: `api.events.scheduler.Scheduled` +- **summary**: Scheduled some task. + + +## `subtensorModule` + +### `ActivityCutoffSet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.ActivityCutoffSet` +- **summary**: an activity cutoff is set for a subnet. + +### `AddStakeBurn(NetUid, AccountId, TaoBalance, AlphaBalance)` + +- **interface**: `api.events.subtensorModule.AddStakeBurn` +- **summary**: "Add stake and burn" event: alpha token was purchased and burned. + +### `AdjustmentAlphaSet(NetUid, u64)` + +- **interface**: `api.events.subtensorModule.AdjustmentAlphaSet` +- **summary**: setting the adjustment alpha on a subnet. + +### `AdjustmentIntervalSet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.AdjustmentIntervalSet` +- **summary**: the adjustment interval is set for a subnet. + +### `AdminFreezeWindowSet(u16)` + +- **interface**: `api.events.subtensorModule.AdminFreezeWindowSet` +- **summary**: setting the admin freeze window length (last N blocks of tempo) + +### `AllBalanceUnstakedAndTransferredToNewColdkey(AccountId, AccountId, AccountId,>>::Balance)` + +- **interface**: `api.events.subtensorModule.AllBalanceUnstakedAndTransferredToNewColdkey` +- **summary**: All balance of a hotkey has been unstaked and transferred to a new coldkey + +### `AlphaBurned(AccountId, AccountId, AlphaBalance, NetUid)` + +- **interface**: `api.events.subtensorModule.AlphaBurned` +- **summary**: Alpha have been burned without reducing AlphaOut. + + **Parameters:** + + (coldkey, hotkey, amount, subnet_id) + +### `AlphaRecycled(AccountId, AccountId, AlphaBalance, NetUid)` + +- **interface**: `api.events.subtensorModule.AlphaRecycled` +- **summary**: Alpha has been recycled, reducing AlphaOut on a subnet. + + **Parameters:** + + (coldkey, hotkey, amount, subnet_id) + +### `AlphaSigmoidSteepnessSet(NetUid, i16)` + +- **interface**: `api.events.subtensorModule.AlphaSigmoidSteepnessSet` +- **summary**: steepness of the sigmoid used to compute alpha values. + +### `ArbitrationPeriodExtended(AccountId)` + +- **interface**: `api.events.subtensorModule.ArbitrationPeriodExtended` +- **summary**: The arbitration period has been extended + +### `AutoStakeAdded(NetUid, AccountId, AccountId, AccountId, AlphaBalance)` + +- **interface**: `api.events.subtensorModule.AutoStakeAdded` +- **summary**: Auto-staking hotkey received stake + +### `AutoStakeDestinationSet(AccountId, NetUid, AccountId)` + +- **interface**: `api.events.subtensorModule.AutoStakeDestinationSet` +- **summary**: The auto stake destination has been set. + + - **coldkey**: The account ID of the coldkey. + - **netuid**: The network identifier. + - **hotkey**: The account ID of the hotkey. + +### `AxonServed(NetUid, AccountId)` + +- **interface**: `api.events.subtensorModule.AxonServed` +- **summary**: the axon server information is added to the network. + +### `BatchCompletedWithErrors()` + +- **interface**: `api.events.subtensorModule.BatchCompletedWithErrors` +- **summary**: A batch extrinsic completed but with some errors. + +### `BatchWeightItemFailed(sp_runtime::DispatchError)` + +- **interface**: `api.events.subtensorModule.BatchWeightItemFailed` +- **summary**: A weight set among a batch of weights failed. + + - **error**: The dispatch error emitted by the failed item. + +### `BatchWeightsCompleted(Vec>, AccountId)` + +- **interface**: `api.events.subtensorModule.BatchWeightsCompleted` +- **summary**: A batch of weights (or commits) have been force-set. + + - **netuids**: The netuids these weights were successfully set/committed for. + - **who**: The hotkey that set this batch. + +### `BondsMovingAverageSet(NetUid, u64)` + +- **interface**: `api.events.subtensorModule.BondsMovingAverageSet` +- **summary**: bonds moving average is set for a subnet. + +### `BondsPenaltySet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.BondsPenaltySet` +- **summary**: bonds penalty is set for a subnet. + +### `BondsResetOnSet(NetUid, bool)` + +- **interface**: `api.events.subtensorModule.BondsResetOnSet` +- **summary**: bonds reset is set for a subnet. + +### `BulkBalancesSet(u16, u16)` + +- **interface**: `api.events.subtensorModule.BulkBalancesSet` +- **summary**: FIXME: Not used yet + +### `BulkNeuronsRegistered(u16, u16)` + +- **interface**: `api.events.subtensorModule.BulkNeuronsRegistered` +- **summary**: multiple uids have been concurrently registered. + +### `BurnSet(NetUid, TaoBalance)` + +- **interface**: `api.events.subtensorModule.BurnSet` +- **summary**: setting burn on a network. + +### `ChainIdentitySet(AccountId)` + +- **interface**: `api.events.subtensorModule.ChainIdentitySet` +- **summary**: The identity of a coldkey has been set + +### `ChildKeyTakeSet(AccountId, u16)` + +- **interface**: `api.events.subtensorModule.ChildKeyTakeSet` +- **summary**: childkey take set + +### `ColdkeySwapAnnounced(AccountId, H256)` + +- **interface**: `api.events.subtensorModule.ColdkeySwapAnnounced` +- **summary**: A coldkey swap announcement has been made. + +### `ColdkeySwapAnnouncementDelaySet(u32)` + +- **interface**: `api.events.subtensorModule.ColdkeySwapAnnouncementDelaySet` +- **summary**: The coldkey swap announcement delay has been set. + +### `ColdkeySwapCleared(AccountId)` + +- **interface**: `api.events.subtensorModule.ColdkeySwapCleared` +- **summary**: A coldkey swap announcement has been cleared. + +### `ColdkeySwapDisputed(AccountId)` + +- **interface**: `api.events.subtensorModule.ColdkeySwapDisputed` +- **summary**: A coldkey swap has been disputed. + +### `ColdkeySwapped(AccountId, AccountId)` + +- **interface**: `api.events.subtensorModule.ColdkeySwapped` +- **summary**: A coldkey has been swapped. + +### `ColdkeySwapReannouncementDelaySet(u32)` + +- **interface**: `api.events.subtensorModule.ColdkeySwapReannouncementDelaySet` +- **summary**: The coldkey swap reannouncement delay has been set. + +### `ColdkeySwapReset(AccountId)` + +- **interface**: `api.events.subtensorModule.ColdkeySwapReset` +- **summary**: A coldkey swap has been reset. + +### `CommitRevealEnabled(NetUid, bool)` + +- **interface**: `api.events.subtensorModule.CommitRevealEnabled` +- **summary**: Commit-Reveal has been successfully toggled. + + - **netuid**: The network identifier. + - **Enabled**: Is Commit-Reveal enabled. + +### `CommitRevealPeriodsSet(NetUid, u64)` + +- **interface**: `api.events.subtensorModule.CommitRevealPeriodsSet` +- **summary**: Commit-Reveal periods has been successfully set. + + - **netuid**: The network identifier. + - **periods**: The number of epochs before the reveal. + +### `CommitRevealVersionSet(u16)` + +- **interface**: `api.events.subtensorModule.CommitRevealVersionSet` +- **summary**: Commit Reveal Weights version has been updated. + + - **version**: The required version. + +### `CRV3WeightsCommitted(AccountId, NetUidStorageIndex, H256)` + +- **interface**: `api.events.subtensorModule.CRV3WeightsCommitted` +- **summary**: Commit-reveal v3 weights have been successfully committed. + + - **who**: The account ID of the user committing the weights. + - **netuid**: The network identifier. + - **commit_hash**: The hash representing the committed weights. + +### `CRV3WeightsRevealed(NetUid, AccountId)` + +- **interface**: `api.events.subtensorModule.CRV3WeightsRevealed` +- **summary**: CRV3 Weights have been successfully revealed. + + - **netuid**: The network identifier. + - **who**: The account ID of the user revealing the weights. + +### `DefaultTakeSet(u16)` + +- **interface**: `api.events.subtensorModule.DefaultTakeSet` +- **summary**: the default take is set. + +### `DelegateAdded(AccountId, AccountId, u16)` + +- **interface**: `api.events.subtensorModule.DelegateAdded` +- **summary**: a hotkey has become a delegate. + +### `DifficultySet(NetUid, u64)` + +- **interface**: `api.events.subtensorModule.DifficultySet` +- **summary**: the difficulty has been set for a subnet. + +### `DissolveNetworkScheduled(AccountId, NetUid, u32)` + +- **interface**: `api.events.subtensorModule.DissolveNetworkScheduled` +- **summary**: A dissolve network extrinsic scheduled. + +### `DissolveNetworkScheduleDurationSet(u32)` + +- **interface**: `api.events.subtensorModule.DissolveNetworkScheduleDurationSet` +- **summary**: The duration of dissolve network has been set + +### `EvmKeyAssociated(NetUid, AccountId, H160, u64)` + +- **interface**: `api.events.subtensorModule.EvmKeyAssociated` +- **summary**: An EVM key has been associated with a hotkey. + +### `Faucet(AccountId, u64)` + +- **interface**: `api.events.subtensorModule.Faucet` +- **summary**: the faucet it called on the test net. + +### `FirstEmissionBlockNumberSet(NetUid, u64)` + +- **interface**: `api.events.subtensorModule.FirstEmissionBlockNumberSet` +- **summary**: FirstEmissionBlockNumber is set via start call extrinsic + + **Parameters:** + + netuid block number + +### `HotkeySwapped(AccountId, AccountId, AccountId)` + +- **interface**: `api.events.subtensorModule.HotkeySwapped` +- **summary**: the hotkey is swapped + +### `HotkeySwappedOnSubnet(AccountId, AccountId, AccountId, NetUid)` + +- **interface**: `api.events.subtensorModule.HotkeySwappedOnSubnet` +- **summary**: the hotkey is swapped + +### `ImmunityPeriodSet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.ImmunityPeriodSet` +- **summary**: immunity period is set for a subnet. + +### `IncentiveAlphaEmittedToMiners(NetUidStorageIndex, Vec)` + +- **interface**: `api.events.subtensorModule.IncentiveAlphaEmittedToMiners` +- **summary**: End-of-epoch miner incentive alpha by UID + +### `KappaSet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.KappaSet` +- **summary**: Kappa is set for a subnet. + +### `MaxAllowedUidsSet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.MaxAllowedUidsSet` +- **summary**: max allowed uids has been set for a subnetwork. + +### `MaxAllowedValidatorsSet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.MaxAllowedValidatorsSet` +- **summary**: setting the max number of allowed validators on a subnet. + +### `MaxBurnSet(NetUid, TaoBalance)` + +- **interface**: `api.events.subtensorModule.MaxBurnSet` +- **summary**: setting max burn on a network. + +### `MaxChildKeyTakeSet(u16)` + +- **interface**: `api.events.subtensorModule.MaxChildKeyTakeSet` +- **summary**: maximum childkey take set + +### `MaxDelegateTakeSet(u16)` + +- **interface**: `api.events.subtensorModule.MaxDelegateTakeSet` +- **summary**: maximum delegate take is set by sudo/admin transaction + +### `MaxDifficultySet(NetUid, u64)` + +- **interface**: `api.events.subtensorModule.MaxDifficultySet` +- **summary**: setting max difficulty on a network. + +### `MaxRegistrationsPerBlockSet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.MaxRegistrationsPerBlockSet` +- **summary**: we set max registrations per block. + +### `MaxWeightLimitSet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.MaxWeightLimitSet` +- **summary**: DEPRECATED: max weight limit updates are no longer supported. + +### `MinAllowedUidsSet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.MinAllowedUidsSet` +- **summary**: The minimum allowed UIDs for a subnet have been set. + +### `MinAllowedWeightSet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.MinAllowedWeightSet` +- **summary**: minimum allowed weight is set for a subnet. + +### `MinBurnSet(NetUid, TaoBalance)` + +- **interface**: `api.events.subtensorModule.MinBurnSet` +- **summary**: setting min burn on a network. + +### `MinChildKeyTakeSet(u16)` + +- **interface**: `api.events.subtensorModule.MinChildKeyTakeSet` +- **summary**: minimum childkey take set + +### `MinDelegateTakeSet(u16)` + +- **interface**: `api.events.subtensorModule.MinDelegateTakeSet` +- **summary**: minimum delegate take is set by sudo/admin transaction + +### `MinDifficultySet(NetUid, u64)` + +- **interface**: `api.events.subtensorModule.MinDifficultySet` +- **summary**: setting min difficulty on a network. + +### `MinNonImmuneUidsSet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.MinNonImmuneUidsSet` +- **summary**: The minimum allowed non-Immune UIDs has been set. + +### `NetworkAdded(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.NetworkAdded` +- **summary**: a new network is added. + +### `NetworkImmunityPeriodSet(u64)` + +- **interface**: `api.events.subtensorModule.NetworkImmunityPeriodSet` +- **summary**: the network immunity period is set. + +### `NetworkLockCostReductionIntervalSet(u64)` + +- **interface**: `api.events.subtensorModule.NetworkLockCostReductionIntervalSet` +- **summary**: the lock cost reduction is set + +### `NetworkMinLockCostSet(TaoBalance)` + +- **interface**: `api.events.subtensorModule.NetworkMinLockCostSet` +- **summary**: the network minimum locking cost is set. + +### `NetworkRateLimitSet(u64)` + +- **interface**: `api.events.subtensorModule.NetworkRateLimitSet` +- **summary**: the network creation rate limit is set. + +### `NetworkRemoved(NetUid)` + +- **interface**: `api.events.subtensorModule.NetworkRemoved` +- **summary**: a network is removed. + +### `NeuronRegistered(NetUid, u16, AccountId)` + +- **interface**: `api.events.subtensorModule.NeuronRegistered` +- **summary**: a new neuron account has been registered to the chain. + +### `OwnerHyperparamRateLimitSet(u16)` + +- **interface**: `api.events.subtensorModule.OwnerHyperparamRateLimitSet` +- **summary**: setting the owner hyperparameter rate limit in epochs + +### `PowRegistrationAllowed(NetUid, bool)` + +- **interface**: `api.events.subtensorModule.PowRegistrationAllowed` +- **summary**: POW registration is allowed/disallowed for a subnet. + +### `PrometheusServed(NetUid, AccountId)` + +- **interface**: `api.events.subtensorModule.PrometheusServed` +- **summary**: the prometheus server information is added to the network. + +### `RAORecycledForRegistrationSet(NetUid, TaoBalance)` + +- **interface**: `api.events.subtensorModule.RAORecycledForRegistrationSet` +- **summary**: setting the RAO recycled for registration. + +### `RegistrationAllowed(NetUid, bool)` + +- **interface**: `api.events.subtensorModule.RegistrationAllowed` +- **summary**: registration is allowed/disallowed for a subnet. + +### `RegistrationPerIntervalSet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.RegistrationPerIntervalSet` +- **summary**: registration per interval is set for a subnet. + +### `RhoSet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.RhoSet` +- **summary**: Rho value is set. + +### `RootClaimed(AccountId)` + +- **interface**: `api.events.subtensorModule.RootClaimed` +- **summary**: Root emissions have been claimed for a coldkey on all subnets and hotkeys. + + **Parameters:** + + (coldkey) + +### `RootClaimTypeSet(AccountId, RootClaimTypeEnum)` + +- **interface**: `api.events.subtensorModule.RootClaimTypeSet` +- **summary**: Root claim type for a coldkey has been set. + + **Parameters:** + + (coldkey, u8) + +### `ScalingLawPowerSet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.ScalingLawPowerSet` +- **summary**: the scaling law power has been set for a subnet. + +### `ServingRateLimitSet(NetUid, u64)` + +- **interface**: `api.events.subtensorModule.ServingRateLimitSet` +- **summary**: setting the prometheus serving rate limit. + +### `SetChildren(AccountId, NetUid, Vec<(u64, T::AccountId)>)` + +- **interface**: `api.events.subtensorModule.SetChildren` +- **summary**: The children of a hotkey have been set + +### `SetChildrenScheduled(AccountId, NetUid, u64, Vec<(u64, T::AccountId)>)` + +- **interface**: `api.events.subtensorModule.SetChildrenScheduled` +- **summary**: Setting of children of a hotkey have been scheduled + +### `StakeAdded(AccountId, AccountId, TaoBalance, AlphaBalance, NetUid, u64)` + +- **interface**: `api.events.subtensorModule.StakeAdded` +- **summary**: stake has been transferred from the a coldkey account onto the hotkey staking account. + +### `StakeMoved(AccountId, AccountId, NetUid, AccountId, NetUid, TaoBalance)` + +- **interface**: `api.events.subtensorModule.StakeMoved` +- **summary**: stake has been moved from origin (hotkey, subnet ID) to destination (hotkey, subnet ID) of this amount (in TAO). + +### `StakeRemoved(AccountId, AccountId, TaoBalance, AlphaBalance, NetUid, u64)` + +- **interface**: `api.events.subtensorModule.StakeRemoved` +- **summary**: stake has been removed from the hotkey staking account onto the coldkey account. + +### `StakeSwapped(AccountId, AccountId, NetUid, NetUid, TaoBalance)` + +- **interface**: `api.events.subtensorModule.StakeSwapped` +- **summary**: Stake has been swapped from one subnet to another for the same coldkey-hotkey pair. + + **Parameters:** + + (coldkey, hotkey, origin_netuid, destination_netuid, amount) + +### `StakeThresholdSet(u64)` + +- **interface**: `api.events.subtensorModule.StakeThresholdSet` +- **summary**: min stake is set for validators to set weights. + +### `StakeTransferred(AccountId, AccountId, AccountId, NetUid, NetUid, TaoBalance)` + +- **interface**: `api.events.subtensorModule.StakeTransferred` +- **summary**: Stake has been transferred from one coldkey to another on the same subnet. + + **Parameters:** + + (origin_coldkey, destination_coldkey, hotkey, origin_netuid, destination_netuid, amount) + +### `StartCallDelaySet(u64)` + +- **interface**: `api.events.subtensorModule.StartCallDelaySet` +- **summary**: the start call delay is set. + +### `SubnetIdentityRemoved(NetUid)` + +- **interface**: `api.events.subtensorModule.SubnetIdentityRemoved` +- **summary**: The identity of a subnet has been removed + +### `SubnetIdentitySet(NetUid)` + +- **interface**: `api.events.subtensorModule.SubnetIdentitySet` +- **summary**: The identity of a subnet has been set + +### `SubnetLeaseCreated(AccountId, LeaseId, NetUid, Option>)` + +- **interface**: `api.events.subtensorModule.SubnetLeaseCreated` +- **summary**: A subnet lease has been created. + +### `SubnetLeaseDividendsDistributed(LeaseId, AccountId, AlphaBalance)` + +- **interface**: `api.events.subtensorModule.SubnetLeaseDividendsDistributed` +- **summary**: Subnet lease dividends have been distributed. + +### `SubnetLeaseTerminated(AccountId, NetUid)` + +- **interface**: `api.events.subtensorModule.SubnetLeaseTerminated` +- **summary**: A subnet lease has been terminated. + +### `SubnetLimitSet(u16)` + +- **interface**: `api.events.subtensorModule.SubnetLimitSet` +- **summary**: the maximum number of subnets is set + +### `SubnetOwnerCutSet(u16)` + +- **interface**: `api.events.subtensorModule.SubnetOwnerCutSet` +- **summary**: the subnet owner cut is set. + +### `SubnetOwnerHotkeySet(NetUid, AccountId)` + +- **interface**: `api.events.subtensorModule.SubnetOwnerHotkeySet` +- **summary**: The owner hotkey for a subnet has been set. + + **Parameters:** + + (netuid, new_hotkey) + +### `Sudid(DispatchResult)` + +- **interface**: `api.events.subtensorModule.Sudid` +- **summary**: a sudo call is done. + +### `SymbolUpdated(NetUid, Vec)` + +- **interface**: `api.events.subtensorModule.SymbolUpdated` +- **summary**: The symbol for a subnet has been updated. + +### `TakeDecreased(AccountId, AccountId, u16)` + +- **interface**: `api.events.subtensorModule.TakeDecreased` +- **summary**: the take for a delegate is decreased. + +### `TakeIncreased(AccountId, AccountId, u16)` + +- **interface**: `api.events.subtensorModule.TakeIncreased` +- **summary**: the take for a delegate is increased. + +### `TempoSet(NetUid, u16)` + +- **interface**: `api.events.subtensorModule.TempoSet` +- **summary**: setting tempo on a network + +### `TimelockedWeightsCommitted(AccountId, NetUidStorageIndex, H256, u64)` + +- **interface**: `api.events.subtensorModule.TimelockedWeightsCommitted` +- **summary**: Timelocked weights have been successfully committed. + + - **who**: The account ID of the user committing the weights. + - **netuid**: The network identifier. + - **commit_hash**: The hash representing the committed weights. + - **reveal_round**: The round at which weights can be revealed. + +### `TimelockedWeightsRevealed(NetUidStorageIndex, AccountId)` + +- **interface**: `api.events.subtensorModule.TimelockedWeightsRevealed` +- **summary**: Timelocked Weights have been successfully revealed. + + - **netuid**: The network identifier. + - **who**: The account ID of the user revealing the weights. + +### `TransferToggle(NetUid, bool)` + +- **interface**: `api.events.subtensorModule.TransferToggle` +- **summary**: Event called when transfer is toggled on a subnet. + + **Parameters:** + + (netuid, bool) + +### `TxChildKeyTakeRateLimitSet(u64)` + +- **interface**: `api.events.subtensorModule.TxChildKeyTakeRateLimitSet` +- **summary**: setting the childkey take transaction rate limit. + +### `TxDelegateTakeRateLimitSet(u64)` + +- **interface**: `api.events.subtensorModule.TxDelegateTakeRateLimitSet` +- **summary**: setting the delegate take transaction rate limit. + +### `TxRateLimitSet(u64)` + +- **interface**: `api.events.subtensorModule.TxRateLimitSet` +- **summary**: setting the transaction rate limit. + +### `ValidatorPruneLenSet(NetUid, u64)` + +- **interface**: `api.events.subtensorModule.ValidatorPruneLenSet` +- **summary**: the validator pruning length has been set. + +### `VotingPowerEmaAlphaSet(NetUid, u64)` + +- **interface**: `api.events.subtensorModule.VotingPowerEmaAlphaSet` +- **summary**: Voting power EMA alpha has been set for a subnet. + +### `VotingPowerTrackingDisabled(NetUid)` + +- **interface**: `api.events.subtensorModule.VotingPowerTrackingDisabled` +- **summary**: Voting power tracking has been fully disabled and entries cleared. + +### `VotingPowerTrackingDisableScheduled(NetUid, u64)` + +- **interface**: `api.events.subtensorModule.VotingPowerTrackingDisableScheduled` +- **summary**: Voting power tracking has been scheduled for disabling. Tracking will continue until disable_at_block, then stop and clear entries. + +### `VotingPowerTrackingEnabled(NetUid)` + +- **interface**: `api.events.subtensorModule.VotingPowerTrackingEnabled` +- **summary**: Voting power tracking has been enabled for a subnet. + +### `WeightsBatchRevealed(AccountId, NetUid, Vec)` + +- **interface**: `api.events.subtensorModule.WeightsBatchRevealed` +- **summary**: Weights have been successfully batch revealed. + + - **who**: The account ID of the user revealing the weights. + - **netuid**: The network identifier. + - **revealed_hashes**: A vector of hashes representing each revealed weight set. + +### `WeightsCommitted(AccountId, NetUidStorageIndex, H256)` + +- **interface**: `api.events.subtensorModule.WeightsCommitted` +- **summary**: Weights have been successfully committed. + + - **who**: The account ID of the user committing the weights. + - **netuid**: The network identifier. + - **commit_hash**: The hash representing the committed weights. + +### `WeightsRevealed(AccountId, NetUidStorageIndex, H256)` + +- **interface**: `api.events.subtensorModule.WeightsRevealed` +- **summary**: Weights have been successfully revealed. + + - **who**: The account ID of the user revealing the weights. + - **netuid**: The network identifier. + - **commit_hash**: The hash of the revealed weights. + +### `WeightsSet(NetUidStorageIndex, u16)` + +- **interface**: `api.events.subtensorModule.WeightsSet` +- **summary**: a caller successfully sets their weights on a subnetwork. + +### `WeightsSetRateLimitSet(NetUid, u64)` + +- **interface**: `api.events.subtensorModule.WeightsSetRateLimitSet` +- **summary**: weights set rate limit has been set for a subnet. + +### `WeightsVersionKeySet(NetUid, u64)` + +- **interface**: `api.events.subtensorModule.WeightsVersionKeySet` +- **summary**: weights version key is set for a network. + + +## `sudo` + +### `KeyChanged(Option, AccountId)` + +- **interface**: `api.events.sudo.KeyChanged` +- **summary**: The sudo key has been updated. + +### `KeyRemoved()` + +- **interface**: `api.events.sudo.KeyRemoved` +- **summary**: The key was permanently removed. + +### `Sudid(DispatchResult)` + +- **interface**: `api.events.sudo.Sudid` +- **summary**: A sudo call just took place. + +### `SudoAsDone(DispatchResult)` + +- **interface**: `api.events.sudo.SudoAsDone` +- **summary**: A sudo_as call just took place. + + +## `swap` + +### `FeeRateSet(NetUid, u16)` + +- **interface**: `api.events.swap.FeeRateSet` +- **summary**: Event emitted when the fee rate has been updated for a subnet + +### `LiquidityAdded(AccountId, AccountId, NetUid, PositionId, u64, TaoBalance, AlphaBalance, TickIndex, TickIndex)` + +- **interface**: `api.events.swap.LiquidityAdded` +- **summary**: Event emitted when a liquidity position is added to a subnet's liquidity pool. + +### `LiquidityModified(AccountId, AccountId, NetUid, PositionId, i64, i64, i64, TaoBalance, AlphaBalance, TickIndex, TickIndex)` + +- **interface**: `api.events.swap.LiquidityModified` +- **summary**: Event emitted when a liquidity position is modified in a subnet's liquidity pool. Modifying causes the fees to be claimed. + +### `LiquidityRemoved(AccountId, AccountId, NetUid, PositionId, u64, TaoBalance, AlphaBalance, TaoBalance, AlphaBalance, TickIndex, TickIndex)` + +- **interface**: `api.events.swap.LiquidityRemoved` +- **summary**: Event emitted when a liquidity position is removed from a subnet's liquidity pool. + +### `UserLiquidityToggled(NetUid, bool)` + +- **interface**: `api.events.swap.UserLiquidityToggled` +- **summary**: Event emitted when user liquidity operations are enabled for a subnet. First enable even indicates a switch from V2 to V3 swap. + + +## `system` + +### `CodeUpdated()` + +- **interface**: `api.events.system.CodeUpdated` +- **summary**: `:code` was updated. + +### `ExtrinsicFailed(DispatchError, DispatchEventInfo)` + +- **interface**: `api.events.system.ExtrinsicFailed` +- **summary**: An extrinsic failed. + +### `ExtrinsicSuccess(DispatchEventInfo)` + +- **interface**: `api.events.system.ExtrinsicSuccess` +- **summary**: An extrinsic completed successfully. + +### `KilledAccount(AccountId)` + +- **interface**: `api.events.system.KilledAccount` +- **summary**: An account was reaped. + +### `NewAccount(AccountId)` + +- **interface**: `api.events.system.NewAccount` +- **summary**: A new account was created. + +### `RejectedInvalidAuthorizedUpgrade(H256, DispatchError)` + +- **interface**: `api.events.system.RejectedInvalidAuthorizedUpgrade` +- **summary**: An invalid authorized upgrade was rejected while trying to apply it. + +### `Remarked(AccountId, H256)` + +- **interface**: `api.events.system.Remarked` +- **summary**: On on-chain remark happened. + +### `UpgradeAuthorized(H256, bool)` + +- **interface**: `api.events.system.UpgradeAuthorized` +- **summary**: An upgrade was authorized. + + +## `transactionPayment` + +### `TransactionFeePaid(AccountId, u128, u128)` + +- **interface**: `api.events.transactionPayment.TransactionFeePaid` +- **summary**: A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee, has been paid by `who`. + + +## `utility` + +### `BatchCompleted()` + +- **interface**: `api.events.utility.BatchCompleted` +- **summary**: Batch of dispatches completed fully with no error. + +### `BatchCompletedWithErrors()` + +- **interface**: `api.events.utility.BatchCompletedWithErrors` +- **summary**: Batch of dispatches completed but has errors. + +### `BatchInterrupted(u32, DispatchError)` + +- **interface**: `api.events.utility.BatchInterrupted` +- **summary**: Batch of dispatches did not complete fully. Index of first failing dispatch given, as well as the error. + +### `DispatchedAs(DispatchResult)` + +- **interface**: `api.events.utility.DispatchedAs` +- **summary**: A call was dispatched. + +### `IfElseFallbackCalled(DispatchError)` + +- **interface**: `api.events.utility.IfElseFallbackCalled` +- **summary**: The fallback call was dispatched. + +### `IfElseMainSuccess()` + +- **interface**: `api.events.utility.IfElseMainSuccess` +- **summary**: Main call was dispatched. + +### `ItemCompleted()` + +- **interface**: `api.events.utility.ItemCompleted` +- **summary**: A single item within a Batch of dispatches has completed with no error. + +### `ItemFailed(DispatchError)` + +- **interface**: `api.events.utility.ItemFailed` +- **summary**: A single item within a Batch of dispatches has completed with error. diff --git a/docs/subtensor-api/extrinsics.md b/docs/subtensor-api/extrinsics.md new file mode 100644 index 000000000..7e301b75d --- /dev/null +++ b/docs/subtensor-api/extrinsics.md @@ -0,0 +1,3323 @@ +# Extrinsics + +The following sections contain Extrinsic methods that are part of the Bittensor (Subtensor) runtime. On the API, these are exposed via `api.tx..`. + +:::info +Generated from a live snapshot of the Subtensor runtime on **2026-04-02**. Connected to: `wss://entrypoint-finney.opentensor.ai:443` +::: + + +**Standard Substrate pallets** + +- **[adminUtils](#adminutils)** +- **[balances](#balances)** +- **[baseFee](#basefee)** +- **[commitments](#commitments)** +- **[contracts](#contracts)** +- **[crowdloan](#crowdloan)** +- **[drand](#drand)** +- **[ethereum](#ethereum)** +- **[evm](#evm)** +- **[grandpa](#grandpa)** +- **[mevShield](#mevshield)** +- **[multisig](#multisig)** +- **[preimage](#preimage)** +- **[proxy](#proxy)** +- **[registry](#registry)** +- **[safeMode](#safemode)** +- **[scheduler](#scheduler)** +- **[subtensorModule](#subtensormodule)** +- **[sudo](#sudo)** +- **[swap](#swap)** +- **[system](#system)** +- **[timestamp](#timestamp)** +- **[utility](#utility)** + + +## `adminUtils` + +### `scheduleGrandpaChange(next_authorities: AuthorityList, in_blocks: u32, forced: Option>)` + +- **interface**: `api.tx.adminUtils.scheduleGrandpaChange` +- **summary**: A public interface for `pallet_grandpa::Pallet::schedule_grandpa_change`. + + Schedule a change in the authorities. + + The change will be applied at the end of execution of the block `in_blocks` after the current block. This value may be 0, in which case the change is applied at the end of the current block. + + If the `forced` parameter is defined, this indicates that the current set has been synchronously determined to be offline and that after `in_blocks` the given change should be applied. The given block number indicates the median last finalized block number and it should be used as the canon block when starting the new grandpa voter. + + No change should be signaled while any change is pending. Returns an error if a change is already pending. + +### `sudoSetActivityCutoff(netuid: NetUid, activity_cutoff: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetActivityCutoff` +- **summary**: The extrinsic sets the activity cutoff for a subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the activity cutoff. + +### `sudoSetAdjustmentAlpha(netuid: NetUid, adjustment_alpha: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetAdjustmentAlpha` +- **summary**: The extrinsic sets the adjustment alpha for a subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the adjustment alpha. + +### `sudoSetAdjustmentInterval(netuid: NetUid, adjustment_interval: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetAdjustmentInterval` +- **summary**: The extrinsic sets the adjustment interval for a subnet. It is only callable by the root account, not changeable by the subnet owner. The extrinsic will call the Subtensor pallet to set the adjustment interval. + +### `sudoSetAdminFreezeWindow(window: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetAdminFreezeWindow` +- **summary**: Sets the admin freeze window length (in blocks) at the end of a tempo. Only callable by root. + +### `sudoSetAlphaSigmoidSteepness(netuid: NetUid, steepness: i16)` + +- **interface**: `api.tx.adminUtils.sudoSetAlphaSigmoidSteepness` +- **summary**: **Arguments:** + + - `origin` — The origin of the call, which must be the root account. + - `netuid` — The unique identifier for the subnet. + - `steepness` — The Steepness for the alpha sigmoid function. (range is 0-int16::MAX, + negative values are reserved for future use) + + **Errors:** + + - `BadOrigin` — If the caller is not the root account. + - `SubnetDoesNotExist` — If the specified subnet does not exist. + - `NegativeSigmoidSteepness` — If the steepness is negative and the caller is + root. + + **Weight:** + + Weight is handled by the `#[pallet::weight]` attribute. + +### `sudoSetAlphaValues(netuid: NetUid, alpha_low: u16, alpha_high: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetAlphaValues` +- **summary**: Sets values for liquid alpha + +### `sudoSetBondsMovingAverage(netuid: NetUid, bonds_moving_average: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetBondsMovingAverage` +- **summary**: The extrinsic sets the bonds moving average for a subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the bonds moving average. + +### `sudoSetBondsPenalty(netuid: NetUid, bonds_penalty: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetBondsPenalty` +- **summary**: The extrinsic sets the bonds penalty for a subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the bonds penalty. + +### `sudoSetBondsResetEnabled(netuid: NetUid, enabled: bool)` + +- **interface**: `api.tx.adminUtils.sudoSetBondsResetEnabled` +- **summary**: Enables or disables Bonds Reset for a given subnet. + + **Parameters:** + + - `origin`: The origin of the call, which must be the root account or subnet owner. + - `netuid`: The unique identifier for the subnet. + - `enabled`: A boolean flag to enable or disable Bonds Reset. + + **Weight:** + + This function has a fixed weight of 0 and is classified as an operational transaction that does not incur any fees. + +### `sudoSetCkBurn(burn: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetCkBurn` +- **summary**: Sets the childkey burn for a subnet. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the childkey burn. + +### `sudoSetColdkeySwapAnnouncementDelay(duration: u32)` + +- **interface**: `api.tx.adminUtils.sudoSetColdkeySwapAnnouncementDelay` +- **summary**: Sets the announcement delay for coldkey swap. + +### `sudoSetColdkeySwapReannouncementDelay(duration: u32)` + +- **interface**: `api.tx.adminUtils.sudoSetColdkeySwapReannouncementDelay` +- **summary**: Sets the coldkey swap reannouncement delay. + +### `sudoSetCommitRevealVersion(version: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetCommitRevealVersion` +- **summary**: Sets the commit-reveal weights version for all subnets + +### `sudoSetCommitRevealWeightsEnabled(netuid: NetUid, enabled: bool)` + +- **interface**: `api.tx.adminUtils.sudoSetCommitRevealWeightsEnabled` +- **summary**: The extrinsic enabled/disables commit/reaveal for a given subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the value. + +### `sudoSetCommitRevealWeightsInterval(netuid: NetUid, interval: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetCommitRevealWeightsInterval` +- **summary**: Sets the commit-reveal weights periods for a specific subnet. + + This extrinsic allows the subnet owner or root account to set the duration (in epochs) during which committed weights must be revealed. The commit-reveal mechanism ensures that users commit weights in advance and reveal them only within a specified period. + + **Arguments:** + + - `origin` — The origin of the call, which must be the subnet owner or the root account. + - `netuid` — The unique identifier of the subnet for which the periods are being set. + - `periods` — The number of epochs that define the commit-reveal period. + + **Errors:** + + - `BadOrigin` — If the caller is neither the subnet owner nor the root account. + - `SubnetDoesNotExist` — If the specified subnet does not exist. + + **Weight:** + + Weight is handled by the `#[pallet::weight]` attribute. + +### `sudoSetDefaultTake(default_take: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetDefaultTake` +- **summary**: The extrinsic sets the default take for the network. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the default take. + +### `sudoSetDifficulty(netuid: NetUid, difficulty: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetDifficulty` +- **summary**: The extrinsic sets the difficulty for a subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the difficulty. + +### `sudoSetDissolveNetworkScheduleDuration(duration: u32)` + +- **interface**: `api.tx.adminUtils.sudoSetDissolveNetworkScheduleDuration` +- **summary**: Sets the duration of the dissolve network schedule. + + This extrinsic allows the root account to set the duration for the dissolve network schedule. The dissolve network schedule determines how long it takes for a network dissolution operation to complete. + + **Arguments:** + + - `origin` — The origin of the call, which must be the root account. + - `duration` — The new duration for the dissolve network schedule, in number of blocks. + + **Errors:** + + - `BadOrigin` — If the caller is not the root account. + + **Weight:** + + Weight is handled by the `#[pallet::weight]` attribute. + +### `sudoSetEmaPriceHalvingPeriod(netuid: NetUid, ema_halving: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetEmaPriceHalvingPeriod` +- **summary**: **Arguments:** + + - `origin` — The origin of the call, which must be the root account. + - `ema_alpha_period` — Number of blocks for EMA price to halve + + **Errors:** + + - `BadOrigin` — If the caller is not the root account. + + **Weight:** + + Weight is handled by the `#[pallet::weight]` attribute. + +### `sudoSetEvmChainId(chain_id: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetEvmChainId` +- **summary**: Sets the EVM ChainID. + + **Arguments:** + + - `origin` — The origin of the call, which must be the subnet owner or the root account. + - `chainId` — The u64 chain ID + + **Errors:** + + - `BadOrigin` — If the caller is neither the subnet owner nor the root account. + + **Weight:** + + Weight is handled by the `#[pallet::weight]` attribute. + +### `sudoSetImmunityPeriod(netuid: NetUid, immunity_period: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetImmunityPeriod` +- **summary**: The extrinsic sets the immunity period for a subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the immunity period. + +### `sudoSetKappa(netuid: NetUid, kappa: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetKappa` +- **summary**: The extrinsic sets the kappa for a subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the kappa. + +### `sudoSetLiquidAlphaEnabled(netuid: NetUid, enabled: bool)` + +- **interface**: `api.tx.adminUtils.sudoSetLiquidAlphaEnabled` +- **summary**: Enables or disables Liquid Alpha for a given subnet. + + **Parameters:** + + - `origin`: The origin of the call, which must be the root account or subnet owner. + - `netuid`: The unique identifier for the subnet. + - `enabled`: A boolean flag to enable or disable Liquid Alpha. + + **Weight:** + + This function has a fixed weight of 0 and is classified as an operational transaction that does not incur any fees. + +### `sudoSetLockReductionInterval(interval: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetLockReductionInterval` +- **summary**: The extrinsic sets the lock reduction interval for the network. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the lock reduction interval. + +### `sudoSetMaxAllowedUids(netuid: NetUid, max_allowed_uids: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetMaxAllowedUids` +- **summary**: The extrinsic sets the maximum allowed UIDs for a subnet. It is only callable by the root account and subnet owner. The extrinsic will call the Subtensor pallet to set the maximum allowed UIDs for a subnet. + +### `sudoSetMaxAllowedValidators(netuid: NetUid, max_allowed_validators: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetMaxAllowedValidators` +- **summary**: The extrinsic sets the maximum allowed validators for a subnet. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the maximum allowed validators. + +### `sudoSetMaxBurn(netuid: NetUid, max_burn: TaoBalance)` + +- **interface**: `api.tx.adminUtils.sudoSetMaxBurn` +- **summary**: The extrinsic sets the maximum burn for a subnet. It is only callable by root and subnet owner. The extrinsic will call the Subtensor pallet to set the maximum burn. + +### `sudoSetMaxDifficulty(netuid: NetUid, max_difficulty: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetMaxDifficulty` +- **summary**: The extrinsic sets the maximum difficulty for a subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the maximum difficulty. + +### `sudoSetMaxMechanismCount(max_mechanism_count: MechId)` + +- **interface**: `api.tx.adminUtils.sudoSetMaxMechanismCount` +- **summary**: Sets the global maximum number of mechanisms in a subnet + +### `sudoSetMaxRegistrationsPerBlock(netuid: NetUid, max_registrations_per_block: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetMaxRegistrationsPerBlock` +- **summary**: The extrinsic sets the maximum registrations per block for a subnet. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the maximum registrations per block. + +### `sudoSetMechanismCount(netuid: NetUid, mechanism_count: MechId)` + +- **interface**: `api.tx.adminUtils.sudoSetMechanismCount` +- **summary**: Sets the desired number of mechanisms in a subnet + +### `sudoSetMechanismEmissionSplit(netuid: NetUid, maybe_split: Option>)` + +- **interface**: `api.tx.adminUtils.sudoSetMechanismEmissionSplit` +- **summary**: Sets the emission split between mechanisms in a subnet + +### `sudoSetMinAllowedUids(netuid: NetUid, min_allowed_uids: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetMinAllowedUids` +- **summary**: The extrinsic sets the minimum allowed UIDs for a subnet. It is only callable by the root account. + +### `sudoSetMinAllowedWeights(netuid: NetUid, min_allowed_weights: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetMinAllowedWeights` +- **summary**: The extrinsic sets the minimum allowed weights for a subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the minimum allowed weights. + +### `sudoSetMinBurn(netuid: NetUid, min_burn: TaoBalance)` + +- **interface**: `api.tx.adminUtils.sudoSetMinBurn` +- **summary**: The extrinsic sets the minimum burn for a subnet. It is only callable by root and subnet owner. The extrinsic will call the Subtensor pallet to set the minimum burn. + +### `sudoSetMinDelegateTake(take: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetMinDelegateTake` +- **summary**: The extrinsic sets the minimum delegate take. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the minimum delegate take. + +### `sudoSetMinDifficulty(netuid: NetUid, min_difficulty: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetMinDifficulty` +- **summary**: The extrinsic sets the minimum difficulty for a subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the minimum difficulty. + +### `sudoSetMinNonImmuneUids(netuid: NetUid, min: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetMinNonImmuneUids` +- **summary**: Sets the minimum number of non-immortal & non-immune UIDs that must remain in a subnet + +### `sudoSetNetworkImmunityPeriod(immunity_period: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetNetworkImmunityPeriod` +- **summary**: The extrinsic sets the immunity period for the network. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the immunity period for the network. + +### `sudoSetNetworkMinLockCost(lock_cost: TaoBalance)` + +- **interface**: `api.tx.adminUtils.sudoSetNetworkMinLockCost` +- **summary**: The extrinsic sets the min lock cost for the network. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the min lock cost for the network. + +### `sudoSetNetworkPowRegistrationAllowed(netuid: NetUid, registration_allowed: bool)` + +- **interface**: `api.tx.adminUtils.sudoSetNetworkPowRegistrationAllowed` +- **summary**: The extrinsic sets the network PoW registration allowed for a subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the network PoW registration allowed. + +### `sudoSetNetworkRateLimit(rate_limit: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetNetworkRateLimit` +- **summary**: The extrinsic sets the network rate limit for the network. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the network rate limit. + +### `sudoSetNetworkRegistrationAllowed(netuid: NetUid, registration_allowed: bool)` + +- **interface**: `api.tx.adminUtils.sudoSetNetworkRegistrationAllowed` +- **summary**: The extrinsic sets the network registration allowed for a subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the network registration allowed. + +### `sudoSetNominatorMinRequiredStake(min_stake: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetNominatorMinRequiredStake` +- **summary**: The extrinsic sets the minimum stake required for nominators. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the minimum stake required for nominators. + +### `sudoSetOwnerHparamRateLimit(epochs: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetOwnerHparamRateLimit` +- **summary**: Sets the owner hyperparameter rate limit in epochs (global multiplier). Only callable by root. + +### `sudoSetOwnerImmuneNeuronLimit(netuid: NetUid, immune_neurons: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetOwnerImmuneNeuronLimit` +- **summary**: Sets the number of immune owner neurons + +### `sudoSetRaoRecycled(netuid: NetUid, rao_recycled: TaoBalance)` + +- **interface**: `api.tx.adminUtils.sudoSetRaoRecycled` +- **summary**: The extrinsic sets the recycled RAO for a subnet. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the recycled RAO. + +### `sudoSetRecycleOrBurn(netuid: NetUid, recycle_or_burn: pallet_subtensor::RecycleOrBurnEnum)` + +- **interface**: `api.tx.adminUtils.sudoSetRecycleOrBurn` +- **summary**: Set the behaviour of the "burn" UID(s) for a given subnet. If set to `Burn`, the miner emission sent to the burn UID(s) will be burned. If set to `Recycle`, the miner emission sent to the burn UID(s) will be recycled. + + **Parameters:** + + - `origin`: The origin of the call, which must be the root account or subnet owner. + - `netuid`: The unique identifier for the subnet. + - `recycle_or_burn`: The desired behaviour of the "burn" UID(s) for the subnet. + +### `sudoSetRho(netuid: NetUid, rho: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetRho` +- **summary**: The extrinsic sets the rho for a subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the rho. + +### `sudoSetServingRateLimit(netuid: NetUid, serving_rate_limit: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetServingRateLimit` +- **summary**: The extrinsic sets the serving rate limit for a subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the serving rate limit. + +### `sudoSetSnOwnerHotkey(netuid: NetUid, hotkey: AccountId)` + +- **interface**: `api.tx.adminUtils.sudoSetSnOwnerHotkey` +- **summary**: Sets or updates the hotkey account associated with the owner of a specific subnet. + + This function allows either the root origin or the current subnet owner to set or update the hotkey for a given subnet. The subnet must already exist. To prevent abuse, the call is rate-limited to once per configured interval (default: one week) per subnet. + + **Parameters:** + + - `origin`: The dispatch origin of the call. Must be either root or the current owner of the subnet. + - `netuid`: The unique identifier of the subnet whose owner hotkey is being set. + - `hotkey`: The new hotkey account to associate with the subnet owner. + + **Returns:** + + - `DispatchResult`: Returns `Ok(())` if the hotkey was successfully set, or an appropriate error otherwise. + + **Errors:** + + - `Error::SubnetNotExists`: If the specified subnet does not exist. + - `Error::TxRateLimitExceeded`: If the function is called more frequently than the allowed rate limit. + + **Access Control:** + + Only callable by: + - Root origin, or + - The coldkey account that owns the subnet. + + **Storage:** + + - Updates [`SubnetOwnerHotkey`] for the given `netuid`. + - Reads and updates [`LastRateLimitedBlock`] for rate-limiting. + - Reads [`DefaultSetSNOwnerHotkeyRateLimit`] to determine the interval between allowed updates. + + **Rate Limiting:** + + This function is rate-limited to one call per subnet per interval (e.g., one week). + +### `sudoSetStakeThreshold(min_stake: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetStakeThreshold` +- **summary**: The extrinsic sets the weights min stake. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the weights min stake. + +### `sudoSetStartCallDelay(delay: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetStartCallDelay` +- **summary**: Sets the delay before a subnet can call start + +### `sudoSetSubnetLimit(max_subnets: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetSubnetLimit` +- **summary**: The extrinsic sets the subnet limit for the network. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the subnet limit. + +### `sudoSetSubnetMovingAlpha(alpha: I96F32)` + +- **interface**: `api.tx.adminUtils.sudoSetSubnetMovingAlpha` +- **summary**: **Arguments:** + + - `origin` — The origin of the call, which must be the root account. + - `alpha` — The new moving alpha value for the SubnetMovingAlpha. + + **Errors:** + + - `BadOrigin` — If the caller is not the root account. + + **Weight:** + + Weight is handled by the `#[pallet::weight]` attribute. + +### `sudoSetSubnetOwnerCut(subnet_owner_cut: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetSubnetOwnerCut` +- **summary**: The extrinsic sets the subnet owner cut for a subnet. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the subnet owner cut. + +### `sudoSetSubnetOwnerHotkey(netuid: NetUid, hotkey: AccountId)` + +- **interface**: `api.tx.adminUtils.sudoSetSubnetOwnerHotkey` +- **summary**: Change the SubnetOwnerHotkey for a given subnet. + + **Arguments:** + + - `origin` — The origin of the call, which must be the subnet owner. + - `netuid` — The unique identifier for the subnet. + - `hotkey` — The new hotkey for the subnet owner. + + **Errors:** + + - `BadOrigin` — If the caller is not the subnet owner or root account. + + **Weight:** + + Weight is handled by the `#[pallet::weight]` attribute. + +### `sudoSetSubtokenEnabled(netuid: NetUid, subtoken_enabled: bool)` + +- **interface**: `api.tx.adminUtils.sudoSetSubtokenEnabled` +- **summary**: Enables or disables subtoken trading for a given subnet. + + **Arguments:** + + - `origin` — The origin of the call, which must be the root account. + - `netuid` — The unique identifier of the subnet. + - `subtoken_enabled` — A boolean indicating whether subtoken trading should be enabled or disabled. + + **Errors:** + + - `BadOrigin` — If the caller is not the root account. + + **Weight:** + + Weight is handled by the `#[pallet::weight]` attribute. + +### `sudoSetTaoFlowCutoff(flow_cutoff: I64F64)` + +- **interface**: `api.tx.adminUtils.sudoSetTaoFlowCutoff` +- **summary**: Sets TAO flow cutoff value (A) + +### `sudoSetTaoFlowNormalizationExponent(exponent: U64F64)` + +- **interface**: `api.tx.adminUtils.sudoSetTaoFlowNormalizationExponent` +- **summary**: Sets TAO flow normalization exponent (p) + +### `sudoSetTaoFlowSmoothingFactor(smoothing_factor: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetTaoFlowSmoothingFactor` +- **summary**: Sets TAO flow smoothing factor (alpha) + +### `sudoSetTargetRegistrationsPerInterval(netuid: NetUid, target_registrations_per_interval: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetTargetRegistrationsPerInterval` +- **summary**: The extrinsic sets the target registrations per interval for a subnet. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the target registrations per interval. + +### `sudoSetTempo(netuid: NetUid, tempo: u16)` + +- **interface**: `api.tx.adminUtils.sudoSetTempo` +- **summary**: The extrinsic sets the tempo for a subnet. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the tempo. + +### `sudoSetToggleTransfer(netuid: NetUid, toggle: bool)` + +- **interface**: `api.tx.adminUtils.sudoSetToggleTransfer` +- **summary**: Enable or disable atomic alpha transfers for a given subnet. + + **Parameters:** + + - `origin`: The origin of the call, which must be the root account or subnet owner. + - `netuid`: The unique identifier for the subnet. + - `enabled`: A boolean flag to enable or disable Liquid Alpha. + + **Weight:** + + This function has a fixed weight of 0 and is classified as an operational transaction that does not incur any fees. + +### `sudoSetTotalIssuance(total_issuance: TaoBalance)` + +- **interface**: `api.tx.adminUtils.sudoSetTotalIssuance` +- **summary**: The extrinsic sets the total issuance for the network. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the issuance for the network. + +### `sudoSetTxDelegateTakeRateLimit(tx_rate_limit: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetTxDelegateTakeRateLimit` +- **summary**: The extrinsic sets the rate limit for delegate take transactions. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the rate limit for delegate take transactions. + +### `sudoSetTxRateLimit(tx_rate_limit: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetTxRateLimit` +- **summary**: The extrinsic sets the transaction rate limit for the network. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the transaction rate limit. + +### `sudoSetWeightsSetRateLimit(netuid: NetUid, weights_set_rate_limit: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetWeightsSetRateLimit` +- **summary**: The extrinsic sets the weights set rate limit for a subnet. It is only callable by the root account. The extrinsic will call the Subtensor pallet to set the weights set rate limit. + +### `sudoSetWeightsVersionKey(netuid: NetUid, weights_version_key: u64)` + +- **interface**: `api.tx.adminUtils.sudoSetWeightsVersionKey` +- **summary**: The extrinsic sets the weights version key for a subnet. It is only callable by the root account or subnet owner. The extrinsic will call the Subtensor pallet to set the weights version key. + +### `sudoSetYuma3Enabled(netuid: NetUid, enabled: bool)` + +- **interface**: `api.tx.adminUtils.sudoSetYuma3Enabled` +- **summary**: Enables or disables Yuma3 for a given subnet. + + **Parameters:** + + - `origin`: The origin of the call, which must be the root account or subnet owner. + - `netuid`: The unique identifier for the subnet. + - `enabled`: A boolean flag to enable or disable Yuma3. + + **Weight:** + + This function has a fixed weight of 0 and is classified as an operational transaction that does not incur any fees. + +### `sudoToggleEvmPrecompile(precompile_id: PrecompileEnum, enabled: bool)` + +- **interface**: `api.tx.adminUtils.sudoToggleEvmPrecompile` +- **summary**: Toggles the enablement of an EVM precompile. + + **Arguments:** + + - `origin` — The origin of the call, which must be the root account. + - `precompile_id` — The identifier of the EVM precompile to toggle. + - `enabled` — The new enablement state of the precompile. + + **Errors:** + + - `BadOrigin` — If the caller is not the root account. + + **Weight:** + + Weight is handled by the `#[pallet::weight]` attribute. + +### `sudoTrimToMaxAllowedUids(netuid: NetUid, max_n: u16)` + +- **interface**: `api.tx.adminUtils.sudoTrimToMaxAllowedUids` +- **summary**: Trims the maximum number of UIDs for a subnet. + + The trimming is done by sorting the UIDs by emission descending and then trimming the lowest emitters while preserving temporally and owner immune UIDs. The UIDs are then compressed to the left and storage is migrated to the new compressed UIDs. + +### `swapAuthorities(new_authorities: BoundedVec)` + +- **interface**: `api.tx.adminUtils.swapAuthorities` +- **summary**: The extrinsic sets the new authorities for Aura consensus. It is only callable by the root account. The extrinsic will call the Aura pallet to change the authorities. + + +## `balances` + +### `burn(value: u128, keep_alive: bool)` + +- **interface**: `api.tx.balances.burn` +- **summary**: Burn the specified liquid free balance from the origin account. + + If the origin's account ends up below the existential deposit as a result of the burn and `keep_alive` is false, the account will be reaped. + + Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible, this `burn` operation will reduce total issuance by the amount _burned_. + +### `forceAdjustTotalIssuance(direction: AdjustmentDirection, delta: u128)` + +- **interface**: `api.tx.balances.forceAdjustTotalIssuance` +- **summary**: Adjust the total issuance in a saturating way. + + Can only be called by root and always needs a positive `delta`. + + **Example:** + +### `forceSetBalance(who: MultiAddress, new_free: u128)` + +- **interface**: `api.tx.balances.forceSetBalance` +- **summary**: Set the regular balance of a given account. + + The dispatch origin for this call is `root`. + +### `forceTransfer(source: MultiAddress, dest: MultiAddress, value: u128)` + +- **interface**: `api.tx.balances.forceTransfer` +- **summary**: Exactly as `transfer_allow_death`, except the origin must be root and the source account may be specified. + +### `forceUnreserve(who: MultiAddress, amount: u128)` + +- **interface**: `api.tx.balances.forceUnreserve` +- **summary**: Unreserve some balance from a user by force. + + Can only be called by ROOT. + +### `transferAll(dest: MultiAddress, keep_alive: bool)` + +- **interface**: `api.tx.balances.transferAll` +- **summary**: Transfer the entire transferable balance from the caller account. + + NOTE: This function only attempts to transfer _transferable_ balances. This means that any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be transferred by this function. To ensure that this function results in a killed account, you might need to prepare the account by removing any reference counters, storage deposits, etc... + + The dispatch origin of this call must be Signed. + + - `dest`: The recipient of the transfer. + - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + of the funds the account has, causing the sender account to be killed (false), or transfer everything except at least the existential deposit, which will guarantee to keep the sender account alive (true). + +### `transferAllowDeath(dest: MultiAddress, value: u128)` + +- **interface**: `api.tx.balances.transferAllowDeath` +- **summary**: Transfer some liquid free balance to another account. + + `transfer_allow_death` will set the `FreeBalance` of the sender and receiver. If the sender's account is below the existential deposit as a result of the transfer, the account will be reaped. + + The dispatch origin for this call must be `Signed` by the transactor. + +### `transferKeepAlive(dest: MultiAddress, value: u128)` + +- **interface**: `api.tx.balances.transferKeepAlive` +- **summary**: Same as the [`transfer_allow_death`] call, but with a check that the transfer will not kill the origin account. + + 99% of the time you want [`transfer_allow_death`] instead. + +### `upgradeAccounts(who: Vec)` + +- **interface**: `api.tx.balances.upgradeAccounts` +- **summary**: Upgrade a specified account. + + - `origin`: Must be `Signed`. + - `who`: The account to be upgraded. + + This will waive the transaction fee if at least all but 10% of the accounts needed to be upgraded. (We let some not have to be upgraded just in order to allow for the possibility of churn). + + +## `baseFee` + +### `setBaseFeePerGas(fee: U256)` + +- **interface**: `api.tx.baseFee.setBaseFeePerGas` + +### `setElasticity(elasticity: Permill)` + +- **interface**: `api.tx.baseFee.setElasticity` + + +## `commitments` + +### `setCommitment(netuid: NetUid, info: Box>)` + +- **interface**: `api.tx.commitments.setCommitment` +- **summary**: Set the commitment for a given netuid + +### `setMaxSpace(new_limit: u32)` + +- **interface**: `api.tx.commitments.setMaxSpace` +- **summary**: Sudo-set MaxSpace + + +## `contracts` + +### `call(dest: MultiAddress, value: u128, gas_limit: Weight, storage_deposit_limit: Option< as codec::HasCompact>::Type>, data: Vec)` + +- **interface**: `api.tx.contracts.call` +- **summary**: Makes a call to an account, optionally transferring some balance. + + **Parameters:** + + - `dest`: Address of the contract to call. + - `value`: The balance to transfer from the `origin` to `dest`. + - `gas_limit`: The gas limit enforced when executing the constructor. + - `storage_deposit_limit`: The maximum amount of balance that can be charged from the + caller to pay for the storage consumed. + - `data`: The input data to pass to the contract. + + - If the account is a smart-contract account, the associated code will be + executed and any value will be transferred. + - If the account is a regular account, any value will be transferred. + - If no account exists and the call value is not less than `existential_deposit`, + a regular account will be created and any value will be transferred. + +### `callOldWeight(dest: MultiAddress, value: u128, gas_limit: OldWeight, storage_deposit_limit: Option< as codec::HasCompact>::Type>, data: Vec)` + +- **interface**: `api.tx.contracts.callOldWeight` +- **summary**: Deprecated version if [`Self::call`] for use in an in-storage `Call`. + +### `instantiate(value: u128, gas_limit: Weight, storage_deposit_limit: Option< as codec::HasCompact>::Type>, code_hash: CodeHash, data: Vec, salt: Vec)` + +- **interface**: `api.tx.contracts.instantiate` +- **summary**: Instantiates a contract from a previously deployed wasm binary. + + This function is identical to [`Self::instantiate_with_code`] but without the code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary must be supplied. + +### `instantiateOldWeight(value: u128, gas_limit: OldWeight, storage_deposit_limit: Option< as codec::HasCompact>::Type>, code_hash: CodeHash, data: Vec, salt: Vec)` + +- **interface**: `api.tx.contracts.instantiateOldWeight` +- **summary**: Deprecated version if [`Self::instantiate`] for use in an in-storage `Call`. + +### `instantiateWithCode(value: u128, gas_limit: Weight, storage_deposit_limit: Option< as codec::HasCompact>::Type>, code: Vec, data: Vec, salt: Vec)` + +- **interface**: `api.tx.contracts.instantiateWithCode` +- **summary**: Instantiates a new contract from the supplied `code` optionally transferring some balance. + + This dispatchable has the same effect as calling [`Self::upload_code`] + [`Self::instantiate`]. Bundling them together provides efficiency gains. Please also check the documentation of [`Self::upload_code`]. + + **Parameters:** + + - `value`: The balance to transfer from the `origin` to the newly created contract. + - `gas_limit`: The gas limit enforced when executing the constructor. + - `storage_deposit_limit`: The maximum amount of balance that can be charged/reserved + from the caller to pay for the storage consumed. + - `code`: The contract code to deploy in raw bytes. + - `data`: The input data to pass to the contract constructor. + - `salt`: Used for the address derivation. See [`Pallet::contract_address`]. + + Instantiation is executed as follows: + + - The supplied `code` is deployed, and a `code_hash` is created for that code. + - If the `code_hash` already exists on the chain the underlying `code` will be shared. + - The destination address is computed based on the sender, code_hash and the salt. + - The smart-contract account is created at the computed address. + - The `value` is transferred to the new account. + - The `deploy` function is executed in the context of the newly-created account. + +### `instantiateWithCodeOldWeight(value: u128, gas_limit: OldWeight, storage_deposit_limit: Option< as codec::HasCompact>::Type>, code: Vec, data: Vec, salt: Vec)` + +- **interface**: `api.tx.contracts.instantiateWithCodeOldWeight` +- **summary**: Deprecated version if [`Self::instantiate_with_code`] for use in an in-storage `Call`. + +### `migrate(weight_limit: Weight)` + +- **interface**: `api.tx.contracts.migrate` +- **summary**: When a migration is in progress, this dispatchable can be used to run migration steps. Calls that contribute to advancing the migration have their fees waived, as it's helpful for the chain. Note that while the migration is in progress, the pallet will also leverage the `on_idle` hooks to run migration steps. + +### `removeCode(code_hash: CodeHash)` + +- **interface**: `api.tx.contracts.removeCode` +- **summary**: Remove the code stored under `code_hash` and refund the deposit to its owner. + + A code can only be removed by its original uploader (its owner) and only if it is not used by any contract. + +### `setCode(dest: MultiAddress, code_hash: CodeHash)` + +- **interface**: `api.tx.contracts.setCode` +- **summary**: Privileged function that changes the code of an existing contract. + + This takes care of updating refcounts and all other necessary operations. Returns an error if either the `code_hash` or `dest` do not exist. + + **Note:** + + This does **not** change the address of the contract in question. This means that the contract address is no longer derived from its code hash after calling this dispatchable. + +### `uploadCode(code: Vec, storage_deposit_limit: Option< as codec::HasCompact>::Type>, determinism: Determinism)` + +- **interface**: `api.tx.contracts.uploadCode` +- **summary**: Upload new `code` without instantiating a contract from it. + + If the code does not already exist a deposit is reserved from the caller and unreserved only when [`Self::remove_code`] is called. The size of the reserve depends on the size of the supplied `code`. + + If the code already exists in storage it will still return `Ok` and upgrades the in storage version to the current `InstructionWeights::version`. + + - `determinism`: If this is set to any other value but [`Determinism::Enforced`] then + the only way to use this code is to delegate call into it from an offchain execution. Set to [`Determinism::Enforced`] if in doubt. + + **Note:** + + Anyone can instantiate a contract from any uploaded code and thus prevent its removal. To avoid this situation a constructor could employ access control so that it can only be instantiated by permissioned entities. The same is true when uploading through [`Self::instantiate_with_code`]. + + Use [`Determinism::Relaxed`] exclusively for non-deterministic code. If the uploaded code is deterministic, specifying [`Determinism::Relaxed`] will be disregarded and result in higher gas costs. + + +## `crowdloan` + +### `contribute(crowdloan_id: CrowdloanId, amount: u128)` + +- **interface**: `api.tx.crowdloan.contribute` +- **summary**: Contribute to an active crowdloan. + + The contribution will be transfered to the crowdloan account and will be refunded if the crowdloan fails to raise the cap. If the contribution would raise the amount above the cap, the contribution will be set to the amount that is left to be raised. + + The dispatch origin for this call must be _Signed_. + + **Parameters:** + + - `crowdloan_id`: The id of the crowdloan to contribute to. + - `amount`: The amount to contribute. + +### `create(deposit: u128, min_contribution: u128, cap: u128, end: u32, call: Option>, target_address: Option)` + +- **interface**: `api.tx.crowdloan.create` +- **summary**: Create a crowdloan that will raise funds up to a maximum cap and if successful, will transfer funds to the target address if provided and dispatch the call (using creator origin). + + The initial deposit will be transfered to the crowdloan account and will be refunded in case the crowdloan fails to raise the cap. Additionally, the creator will pay for the execution of the call. + + The dispatch origin for this call must be _Signed_. + + **Parameters:** + + - `deposit`: The initial deposit from the creator. + - `min_contribution`: The minimum contribution required to contribute to the crowdloan. + - `cap`: The maximum amount of funds that can be raised. + - `end`: The block number at which the crowdloan will end. + - `call`: The call to dispatch when the crowdloan is finalized. + - `target_address`: The address to transfer the raised funds to if provided. + +### `dissolve(crowdloan_id: CrowdloanId)` + +- **interface**: `api.tx.crowdloan.dissolve` +- **summary**: Dissolve a crowdloan. + + The crowdloan will be removed from the storage. All contributions must have been refunded before the crowdloan can be dissolved (except the creator's one). + + The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. + + **Parameters:** + + - `crowdloan_id`: The id of the crowdloan to dissolve. + +### `finalize(crowdloan_id: CrowdloanId)` + +- **interface**: `api.tx.crowdloan.finalize` +- **summary**: Finalize crowdloan that has reached the cap. + + The call will transfer the raised amount to the target address if it was provided when the crowdloan was created and dispatch the call that was provided using the creator origin. The CurrentCrowdloanId will be set to the crowdloan id being finalized so the dispatched call can access it temporarily by accessing the `CurrentCrowdloanId` storage item. + + The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. + + **Parameters:** + + - `crowdloan_id`: The id of the crowdloan to finalize. + +### `refund(crowdloan_id: CrowdloanId)` + +- **interface**: `api.tx.crowdloan.refund` +- **summary**: Refund contributors of a non-finalized crowdloan. + + The call will try to refund all contributors (excluding the creator) up to the limit defined by the `RefundContributorsLimit`. If the limit is reached, the call will stop and the crowdloan will be marked as partially refunded. It may be needed to dispatch this call multiple times to refund all contributors. + + The dispatch origin for this call must be _Signed_ and doesn't need to be the creator of the crowdloan. + + **Parameters:** + + - `crowdloan_id`: The id of the crowdloan to refund. + +### `updateCap(crowdloan_id: CrowdloanId, new_cap: u128)` + +- **interface**: `api.tx.crowdloan.updateCap` +- **summary**: Update the cap of a non-finalized crowdloan. + + The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. + + **Parameters:** + + - `crowdloan_id`: The id of the crowdloan to update the cap of. + - `new_cap`: The new cap. + +### `updateEnd(crowdloan_id: CrowdloanId, new_end: u32)` + +- **interface**: `api.tx.crowdloan.updateEnd` +- **summary**: Update the end block of a non-finalized crowdloan. + + The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. + + **Parameters:** + + - `crowdloan_id`: The id of the crowdloan to update the end block of. + - `new_end`: The new end block. + +### `updateMinContribution(crowdloan_id: CrowdloanId, new_min_contribution: u128)` + +- **interface**: `api.tx.crowdloan.updateMinContribution` +- **summary**: Update the minimum contribution of a non-finalized crowdloan. + + The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. + + **Parameters:** + + - `crowdloan_id`: The id of the crowdloan to update the minimum contribution of. + - `new_min_contribution`: The new minimum contribution. + +### `withdraw(crowdloan_id: CrowdloanId)` + +- **interface**: `api.tx.crowdloan.withdraw` +- **summary**: Withdraw a contribution from an active (not yet finalized or dissolved) crowdloan. + + Only contributions over the deposit can be withdrawn by the creator. + + The dispatch origin for this call must be _Signed_. + + **Parameters:** + + - `crowdloan_id`: The id of the crowdloan to withdraw from. + + +## `drand` + +### `setBeaconConfig(config_payload: BeaconConfigurationPayload>, signature: Option)` + +- **interface**: `api.tx.drand.setBeaconConfig` +- **summary**: allows the root user to set the beacon configuration generally this would be called from an offchain worker context. there is no verification of configurations, so be careful with this. + + - `origin`: the root user + - `config`: the beacon configuration + +### `setOldestStoredRound(oldest_round: u64)` + +- **interface**: `api.tx.drand.setOldestStoredRound` +- **summary**: allows the root user to set the oldest stored round + +### `writePulse(pulses_payload: PulsesPayload>, signature: Option)` + +- **interface**: `api.tx.drand.writePulse` +- **summary**: Verify and write a pulse from the beacon into the runtime + + +## `ethereum` + +### `transact(transaction: Transaction)` + +- **interface**: `api.tx.ethereum.transact` +- **summary**: Transact an Ethereum transaction. + + +## `evm` + +### `call(source: H160, target: H160, input: Vec, value: U256, gas_limit: u64, max_fee_per_gas: U256, max_priority_fee_per_gas: Option, nonce: Option, access_list: Vec<(H160, Vec)>, authorization_list: AuthorizationList)` + +- **interface**: `api.tx.evm.call` +- **summary**: Issue an EVM call operation. This is similar to a message call transaction in Ethereum. + +### `create(source: H160, init: Vec, value: U256, gas_limit: u64, max_fee_per_gas: U256, max_priority_fee_per_gas: Option, nonce: Option, access_list: Vec<(H160, Vec)>, authorization_list: AuthorizationList)` + +- **interface**: `api.tx.evm.create` +- **summary**: Issue an EVM create operation. This is similar to a contract creation transaction in Ethereum. + +### `create2(source: H160, init: Vec, salt: H256, value: U256, gas_limit: u64, max_fee_per_gas: U256, max_priority_fee_per_gas: Option, nonce: Option, access_list: Vec<(H160, Vec)>, authorization_list: AuthorizationList)` + +- **interface**: `api.tx.evm.create2` +- **summary**: Issue an EVM create2 operation. + +### `disableWhitelist(disabled: bool)` + +- **interface**: `api.tx.evm.disableWhitelist` + +### `setWhitelist(new: Vec)` + +- **interface**: `api.tx.evm.setWhitelist` + +### `withdraw(address: H160, value: u128)` + +- **interface**: `api.tx.evm.withdraw` +- **summary**: Withdraw balance from EVM into currency/balances pallet. + + +## `grandpa` + +### `noteStalled(delay: u32, best_finalized_block_number: u32)` + +- **interface**: `api.tx.grandpa.noteStalled` +- **summary**: Note that the current authority set of the GRANDPA finality gadget has stalled. + + This will trigger a forced authority set change at the beginning of the next session, to be enacted `delay` blocks after that. The `delay` should be high enough to safely assume that the block signalling the forced change will not be re-orged e.g. 1000 blocks. The block production rate (which may be slowed down because of finality lagging) should be taken into account when choosing the `delay`. The GRANDPA voters based on the new authority will start voting on top of `best_finalized_block_number` for new finalized blocks. `best_finalized_block_number` should be the highest of the latest finalized block of all validators of the new authority set. + + Only callable by root. + +### `reportEquivocation(equivocation_proof: Box>>, key_owner_proof: T::KeyOwnerProof)` + +- **interface**: `api.tx.grandpa.reportEquivocation` +- **summary**: Report voter equivocation/misbehavior. This method will verify the equivocation proof and validate the given key ownership proof against the extracted offender. If both are valid, the offence will be reported. + +### `reportEquivocationUnsigned(equivocation_proof: Box>>, key_owner_proof: T::KeyOwnerProof)` + +- **interface**: `api.tx.grandpa.reportEquivocationUnsigned` +- **summary**: Report voter equivocation/misbehavior. This method will verify the equivocation proof and validate the given key ownership proof against the extracted offender. If both are valid, the offence will be reported. + + This extrinsic must be called unsigned and it is expected that only block authors will call it (validated in `ValidateUnsigned`), as such if the block author is defined it will be defined as the equivocation reporter. + + +## `mevShield` + +### `announceNextKey(enc_key: Option)` + +- **interface**: `api.tx.mevShield.announceNextKey` +- **summary**: Rotate the key chain and announce the current author's ML-KEM encapsulation key. + + Called as an inherent every block. `enc_key` is `None` on node failure, which removes the author from future shielded tx eligibility. + + Key rotation order (using pre-update AuthorKeys): + 1. CurrentKey ← PendingKey + 2. PendingKey ← NextKey + 3. NextKey ← next-next author's key (user-facing) + 4. AuthorKeys[current] ← announced key + +### `submitEncrypted(ciphertext: BoundedVec>)` + +- **interface**: `api.tx.mevShield.submitEncrypted` +- **summary**: Users submit an encrypted wrapper. + + Client‑side: + + 1. Read `NextKey` (ML‑KEM encapsulation key bytes) from storage. + 2. Sign your extrinsic so that it can be executed when added to the pool, + i.e. you may need to increment the nonce if you submit using the same account. + 3. Encrypt: + + plaintext = signed_extrinsic key_hash = xxhash128(NextKey) kem_len = Length of kem_ct in bytes (u16) kem_ct = Ciphertext from ML‑KEM‑768 nonce = Random 24 bytes used for XChaCha20‑Poly1305 aead_ct = Ciphertext from XChaCha20‑Poly1305 + + with ML‑KEM‑768 + XChaCha20‑Poly1305, producing + + ciphertext = key_hash || kem_len || kem_ct || nonce || aead_ct + + +## `multisig` + +### `approveAsMulti(threshold: u16, other_signatories: Vec, maybe_timepoint: Option>>, call_hash: [u8; 32], max_weight: Weight)` + +- **interface**: `api.tx.multisig.approveAsMulti` +- **summary**: Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. + + Payment: `DepositBase` will be reserved if this is the first approval, plus `threshold` times `DepositFactor`. It is returned once this dispatch happens or is cancelled. + + The dispatch origin for this call must be _Signed_. + + - `threshold`: The total number of approvals for this dispatch before it is executed. + - `other_signatories`: The accounts (other than the sender) who can approve this + dispatch. May not be empty. + - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + not the first approval, then it must be `Some`, with the timepoint (block number and transaction index) of the first approval transaction. + - `call_hash`: The hash of the call to be executed. + + NOTE: If this is the final approval, you will want to use `as_multi` instead. + + **Complexity:** + + - ``O(S)``. + - Up to one balance-reserve or unreserve operation. + - One passthrough operation, one insert, both ``O(S)`` where `S` is the number of + signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + - One encode & hash, both of complexity ``O(S)``. + - Up to one binary search and insert (``O(logS + S)``). + - I/O: 1 read ``O(S)``, up to 1 mutate ``O(S)``. Up to one remove. + - One event. + - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + taken for its lifetime of `DepositBase + threshold * DepositFactor`. + +### `asMulti(threshold: u16, other_signatories: Vec, maybe_timepoint: Option>>, call: Box, max_weight: Weight)` + +- **interface**: `api.tx.multisig.asMulti` +- **summary**: Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. + + If there are enough, then dispatch the call. + + Payment: `DepositBase` will be reserved if this is the first approval, plus `threshold` times `DepositFactor`. It is returned once this dispatch happens or is cancelled. + + The dispatch origin for this call must be _Signed_. + + - `threshold`: The total number of approvals for this dispatch before it is executed. + - `other_signatories`: The accounts (other than the sender) who can approve this + dispatch. May not be empty. + - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + not the first approval, then it must be `Some`, with the timepoint (block number and transaction index) of the first approval transaction. + - `call`: The call to be executed. + + NOTE: Unless this is the final approval, you will generally want to use `approve_as_multi` instead, since it only requires a hash of the call. + + Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise on success, result is `Ok` and the result from the interior call, if it was executed, may be found in the deposited `MultisigExecuted` event. + + **Complexity:** + + - ``O(S + Z + Call)``. + - Up to one balance-reserve or unreserve operation. + - One passthrough operation, one insert, both ``O(S)`` where `S` is the number of + signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + - One call encode & hash, both of complexity ``O(Z)`` where `Z` is tx-len. + - One encode & hash, both of complexity ``O(S)``. + - Up to one binary search and insert (``O(logS + S)``). + - I/O: 1 read ``O(S)``, up to 1 mutate ``O(S)``. Up to one remove. + - One event. + - The weight of the `call`. + - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + taken for its lifetime of `DepositBase + threshold * DepositFactor`. + +### `asMultiThreshold1(other_signatories: Vec, call: Box)` + +- **interface**: `api.tx.multisig.asMultiThreshold1` +- **summary**: Immediately dispatch a multi-signature call using a single approval from the caller. + + The dispatch origin for this call must be _Signed_. + + - `other_signatories`: The accounts (other than the sender) who are part of the + multi-signature, but do not participate in the approval process. + - `call`: The call to be executed. + + Result is equivalent to the dispatched result. + + **Complexity:** + + `O(Z + C)` where Z is the length of the call and C its execution weight. + +### `cancelAsMulti(threshold: u16, other_signatories: Vec, timepoint: Timepoint>, call_hash: [u8; 32])` + +- **interface**: `api.tx.multisig.cancelAsMulti` +- **summary**: Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously for this operation will be unreserved on success. + + The dispatch origin for this call must be _Signed_. + + - `threshold`: The total number of approvals for this dispatch before it is executed. + - `other_signatories`: The accounts (other than the sender) who can approve this + dispatch. May not be empty. + - `timepoint`: The timepoint (block number and transaction index) of the first approval + transaction for this dispatch. + - `call_hash`: The hash of the call to be executed. + + **Complexity:** + + - ``O(S)``. + - Up to one balance-reserve or unreserve operation. + - One passthrough operation, one insert, both ``O(S)`` where `S` is the number of + signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + - One encode & hash, both of complexity ``O(S)``. + - One event. + - I/O: 1 read ``O(S)``, one remove. + - Storage: removes one item. + +### `pokeDeposit(threshold: u16, other_signatories: Vec, call_hash: [u8; 32])` + +- **interface**: `api.tx.multisig.pokeDeposit` +- **summary**: Poke the deposit reserved for an existing multisig operation. + + The dispatch origin for this call must be _Signed_ and must be the original depositor of the multisig operation. + + The transaction fee is waived if the deposit amount has changed. + + - `threshold`: The total number of approvals needed for this multisig. + - `other_signatories`: The accounts (other than the sender) who are part of the + multisig. + - `call_hash`: The hash of the call this deposit is reserved for. + + Emits `DepositPoked` if successful. + + +## `preimage` + +### `ensureUpdated(hashes: Vec)` + +- **interface**: `api.tx.preimage.ensureUpdated` +- **summary**: Ensure that the bulk of pre-images is upgraded. + + The caller pays no fee if at least 90% of pre-images were successfully updated. + +### `notePreimage(bytes: Vec)` + +- **interface**: `api.tx.preimage.notePreimage` +- **summary**: Register a preimage on-chain. + + If the preimage was previously requested, no fees or deposits are taken for providing the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + +### `requestPreimage(hash: H256)` + +- **interface**: `api.tx.preimage.requestPreimage` +- **summary**: Request a preimage be uploaded to the chain without paying any fees or deposits. + + If the preimage requests has already been provided on-chain, we unreserve any deposit a user may have paid, and take the control of the preimage out of their hands. + +### `unnotePreimage(hash: H256)` + +- **interface**: `api.tx.preimage.unnotePreimage` +- **summary**: Clear an unrequested preimage from the runtime storage. + + If `len` is provided, then it will be a much cheaper operation. + + - `hash`: The hash of the preimage to be removed from the store. + - `len`: The length of the preimage of `hash`. + +### `unrequestPreimage(hash: H256)` + +- **interface**: `api.tx.preimage.unrequestPreimage` +- **summary**: Clear a previously made request for a preimage. + + NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. + + +## `proxy` + +### `addProxy(delegate: MultiAddress, proxy_type: T::ProxyType, delay: u32)` + +- **interface**: `api.tx.proxy.addProxy` +- **summary**: Register a proxy account for the sender that is able to make calls on its behalf. + + The dispatch origin for this call must be _Signed_. + + **Parameters:** + + - `proxy`: The account that the `caller` would like to make a proxy. + - `proxy_type`: The permissions allowed for this proxy account. + - `delay`: The announcement period required of the initial proxy. Will generally be + zero. + +### `announce(real: MultiAddress, call_hash: CallHashOf)` + +- **interface**: `api.tx.proxy.announce` +- **summary**: Publish the hash of a proxy-call that will be made in the future. + + This must be called some number of blocks before the corresponding `proxy` is attempted if the delay associated with the proxy relationship is greater than zero. + + No more than `MaxPending` announcements may be made at any one time. + + This will take a deposit of `AnnouncementDepositFactor` as well as `AnnouncementDepositBase` if there are no other pending announcements. + + The dispatch origin for this call must be _Signed_ and a proxy of `real`. + + **Parameters:** + + - `real`: The account that the proxy will make a call on behalf of. + - `call_hash`: The hash of the call to be made by the `real` account. + +### `createPure(proxy_type: T::ProxyType, delay: u32, index: u16)` + +- **interface**: `api.tx.proxy.createPure` +- **summary**: Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and initialize it with a proxy of `proxy_type` for `origin` sender. + + Requires a `Signed` origin. + + - `proxy_type`: The type of the proxy that the sender will be registered as over the + new account. This will almost always be the most permissive `ProxyType` possible to allow for maximum flexibility. + - `index`: A disambiguation index, in case this is called multiple times in the same + transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just want to use `0`. + - `delay`: The announcement period required of the initial proxy. Will generally be + zero. + + Fails with `Duplicate` if this has already been called in this transaction, from the same sender, with the same parameters. + + Fails if there are insufficient funds to pay for deposit. + +### `killPure(spawner: MultiAddress, proxy_type: T::ProxyType, index: u16, height: u32, ext_index: u32)` + +- **interface**: `api.tx.proxy.killPure` +- **summary**: Removes a previously spawned pure proxy. + + WARNING: **All access to this account will be lost.** Any funds held in it will be inaccessible. + + Requires a `Signed` origin, and the sender account must have been created by a call to `create_pure` with corresponding parameters. + + - `spawner`: The account that originally called `create_pure` to create this account. + - `index`: The disambiguation index originally passed to `create_pure`. Probably `0`. + - `proxy_type`: The proxy type originally passed to `create_pure`. + - `height`: The height of the chain when the call to `create_pure` was processed. + - `ext_index`: The extrinsic index in which the call to `create_pure` was processed. + + Fails with `NoPermission` in case the caller is not a previously created pure account whose `create_pure` call has corresponding parameters. + +### `pokeDeposit()` + +- **interface**: `api.tx.proxy.pokeDeposit` +- **summary**: Poke / Adjust deposits made for proxies and announcements based on current values. This can be used by accounts to possibly lower their locked amount. + + The dispatch origin for this call must be _Signed_. + + The transaction fee is waived if the deposit amount has changed. + + Emits `DepositPoked` if successful. + +### `proxy(real: MultiAddress, force_proxy_type: Option, call: Box)` + +- **interface**: `api.tx.proxy.proxy` +- **summary**: Dispatch the given `call` from an account that the sender is authorised for through `add_proxy`. + + The dispatch origin for this call must be _Signed_. + + **Parameters:** + + - `real`: The account that the proxy will make a call on behalf of. + - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + - `call`: The call to be made by the `real` account. + +### `proxyAnnounced(delegate: MultiAddress, real: MultiAddress, force_proxy_type: Option, call: Box)` + +- **interface**: `api.tx.proxy.proxyAnnounced` +- **summary**: Dispatch the given `call` from an account that the sender is authorized for through `add_proxy`. + + Removes any corresponding announcement(s). + + The dispatch origin for this call must be _Signed_. + + **Parameters:** + + - `real`: The account that the proxy will make a call on behalf of. + - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + - `call`: The call to be made by the `real` account. + +### `rejectAnnouncement(delegate: MultiAddress, call_hash: CallHashOf)` + +- **interface**: `api.tx.proxy.rejectAnnouncement` +- **summary**: Remove the given announcement of a delegate. + + May be called by a target (proxied) account to remove a call that one of their delegates (`delegate`) has announced they want to execute. The deposit is returned. + + The dispatch origin for this call must be _Signed_. + + **Parameters:** + + - `delegate`: The account that previously announced the call. + - `call_hash`: The hash of the call to be made. + +### `removeAnnouncement(real: MultiAddress, call_hash: CallHashOf)` + +- **interface**: `api.tx.proxy.removeAnnouncement` +- **summary**: Remove a given announcement. + + May be called by a proxy account to remove a call they previously announced and return the deposit. + + The dispatch origin for this call must be _Signed_. + + **Parameters:** + + - `real`: The account that the proxy will make a call on behalf of. + - `call_hash`: The hash of the call to be made by the `real` account. + +### `removeProxies()` + +- **interface**: `api.tx.proxy.removeProxies` +- **summary**: Unregister all proxy accounts for the sender. + + The dispatch origin for this call must be _Signed_. + + WARNING: This may be called on accounts created by `create_pure`, however if done, then the unreserved fees will be inaccessible. **All access to this account will be lost.** + +### `removeProxy(delegate: MultiAddress, proxy_type: T::ProxyType, delay: u32)` + +- **interface**: `api.tx.proxy.removeProxy` +- **summary**: Unregister a proxy account for the sender. + + The dispatch origin for this call must be _Signed_. + + **Parameters:** + + - `proxy`: The account that the `caller` would like to remove as a proxy. + - `proxy_type`: The permissions currently enabled for the removed proxy account. + +### `setRealPaysFee(delegate: MultiAddress, pays_fee: bool)` + +- **interface**: `api.tx.proxy.setRealPaysFee` +- **summary**: Set whether the real account pays transaction fees for proxy calls made by a specific delegate. + + The dispatch origin for this call must be _Signed_ and must be the real (delegator) account that has an existing proxy relationship with the delegate. + + **Parameters:** + + - `delegate`: The proxy account for which to set the fee payment preference. + - `pays_fee`: If `true`, the real account will pay fees for proxy calls made by + this delegate. If `false`, the delegate pays (default behavior). + + +## `registry` + +### `clearIdentity(identified: AccountId)` + +- **interface**: `api.tx.registry.clearIdentity` +- **summary**: Clear the identity of an account. + +### `setIdentity(identified: AccountId, info: Box>)` + +- **interface**: `api.tx.registry.setIdentity` +- **summary**: Register an identity for an account. This will overwrite any existing identity. + + +## `safeMode` + +### `enter()` + +- **interface**: `api.tx.safeMode.enter` +- **summary**: Enter safe-mode permissionlessly for [`Config::EnterDuration`] blocks. + + Reserves [`Config::EnterDepositAmount`] from the caller's account. Emits an [`Event::Entered`] event on success. Errors with [`Error::Entered`] if the safe-mode is already entered. Errors with [`Error::NotConfigured`] if the deposit amount is `None`. + +### `extend()` + +- **interface**: `api.tx.safeMode.extend` +- **summary**: Extend the safe-mode permissionlessly for [`Config::ExtendDuration`] blocks. + + This accumulates on top of the current remaining duration. Reserves [`Config::ExtendDepositAmount`] from the caller's account. Emits an [`Event::Extended`] event on success. Errors with [`Error::Exited`] if the safe-mode is entered. Errors with [`Error::NotConfigured`] if the deposit amount is `None`. + + This may be called by any signed origin with [`Config::ExtendDepositAmount`] free currency to reserve. This call can be disabled for all origins by configuring [`Config::ExtendDepositAmount`] to `None`. + +### `forceEnter()` + +- **interface**: `api.tx.safeMode.forceEnter` +- **summary**: Enter safe-mode by force for a per-origin configured number of blocks. + + Emits an [`Event::Entered`] event on success. Errors with [`Error::Entered`] if the safe-mode is already entered. + + Can only be called by the [`Config::ForceEnterOrigin`] origin. + +### `forceExit()` + +- **interface**: `api.tx.safeMode.forceExit` +- **summary**: Exit safe-mode by force. + + Emits an [`Event::Exited`] with [`ExitReason::Force`] event on success. Errors with [`Error::Exited`] if the safe-mode is inactive. + + Note: `safe-mode` will be automatically deactivated by [`Pallet::on_initialize`] hook after the block height is greater than the [`EnteredUntil`] storage item. Emits an [`Event::Exited`] with [`ExitReason::Timeout`] event when deactivated in the hook. + +### `forceExtend()` + +- **interface**: `api.tx.safeMode.forceExtend` +- **summary**: Extend the safe-mode by force for a per-origin configured number of blocks. + + Emits an [`Event::Extended`] event on success. Errors with [`Error::Exited`] if the safe-mode is inactive. + + Can only be called by the [`Config::ForceExtendOrigin`] origin. + +### `forceReleaseDeposit(account: AccountId, block: u32)` + +- **interface**: `api.tx.safeMode.forceReleaseDeposit` +- **summary**: Force to release a deposit for an account that entered safe-mode at a given historical block. + + This can be called while safe-mode is still entered. + + Emits a [`Event::DepositReleased`] event on success. Errors with [`Error::Entered`] if safe-mode is entered. Errors with [`Error::NoDeposit`] if the payee has no reserved currency at the specified block. + + Can only be called by the [`Config::ForceDepositOrigin`] origin. + +### `forceSlashDeposit(account: AccountId, block: u32)` + +- **interface**: `api.tx.safeMode.forceSlashDeposit` +- **summary**: Slash a deposit for an account that entered or extended safe-mode at a given historical block. + + This can only be called while safe-mode is entered. + + Emits a [`Event::DepositSlashed`] event on success. Errors with [`Error::Entered`] if safe-mode is entered. + + Can only be called by the [`Config::ForceDepositOrigin`] origin. + +### `releaseDeposit(account: AccountId, block: u32)` + +- **interface**: `api.tx.safeMode.releaseDeposit` +- **summary**: Permissionlessly release a deposit for an account that entered safe-mode at a given historical block. + + The call can be completely disabled by setting [`Config::ReleaseDelay`] to `None`. This cannot be called while safe-mode is entered and not until [`Config::ReleaseDelay`] blocks have passed since safe-mode was entered. + + Emits a [`Event::DepositReleased`] event on success. Errors with [`Error::Entered`] if the safe-mode is entered. Errors with [`Error::CannotReleaseYet`] if [`Config::ReleaseDelay`] block have not passed since safe-mode was entered. Errors with [`Error::NoDeposit`] if the payee has no reserved currency at the block specified. + + +## `scheduler` + +### `cancel(when: u32, index: u32)` + +- **interface**: `api.tx.scheduler.cancel` +- **summary**: Cancel an anonymously scheduled task. + +### `cancelNamed(id: TaskName)` + +- **interface**: `api.tx.scheduler.cancelNamed` +- **summary**: Cancel a named scheduled task. + +### `cancelRetry(task: TaskAddress>)` + +- **interface**: `api.tx.scheduler.cancelRetry` +- **summary**: Removes the retry configuration of a task. + +### `cancelRetryNamed(id: TaskName)` + +- **interface**: `api.tx.scheduler.cancelRetryNamed` +- **summary**: Cancel the retry configuration of a named task. + +### `schedule(when: u32, maybe_periodic: Option>>, priority: schedule::Priority, call: Box)` + +- **interface**: `api.tx.scheduler.schedule` +- **summary**: Anonymously schedule a task. + +### `scheduleAfter(after: u32, maybe_periodic: Option>>, priority: schedule::Priority, call: Box)` + +- **interface**: `api.tx.scheduler.scheduleAfter` +- **summary**: Anonymously schedule a task after a delay. + +### `scheduleNamed(id: TaskName, when: u32, maybe_periodic: Option>>, priority: schedule::Priority, call: Box)` + +- **interface**: `api.tx.scheduler.scheduleNamed` +- **summary**: Schedule a named task. + +### `scheduleNamedAfter(id: TaskName, after: u32, maybe_periodic: Option>>, priority: schedule::Priority, call: Box)` + +- **interface**: `api.tx.scheduler.scheduleNamedAfter` +- **summary**: Schedule a named task after a delay. + +### `setRetry(task: TaskAddress>, retries: u8, period: u32)` + +- **interface**: `api.tx.scheduler.setRetry` +- **summary**: Set a retry configuration for a task so that, in case its scheduled run fails, it will be retried after `period` blocks, for a total amount of `retries` retries or until it succeeds. + + Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. If a periodic task fails, it will be scheduled normally while the task is retrying. + + Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic clones of the original task. Their retry configuration will be derived from the original task's configuration, but will have a lower value for `remaining` than the original `total_retries`. + +### `setRetryNamed(id: TaskName, retries: u8, period: u32)` + +- **interface**: `api.tx.scheduler.setRetryNamed` +- **summary**: Set a retry configuration for a named task so that, in case its scheduled run fails, it will be retried after `period` blocks, for a total amount of `retries` retries or until it succeeds. + + Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. If a periodic task fails, it will be scheduled normally while the task is retrying. + + Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic clones of the original task. Their retry configuration will be derived from the original task's configuration, but will have a lower value for `remaining` than the original `total_retries`. + + +## `subtensorModule` + +### `addStake(hotkey: AccountId, netuid: NetUid, amount_staked: TaoBalance)` + +- **interface**: `api.tx.subtensorModule.addStake` +- **summary**: Adds stake to a hotkey. The call is made from a coldkey account. This delegates stake to the hotkey. + + Note: the coldkey account may own the hotkey, in which case they are delegating to themselves. + + **Args:** + + - `origin` — (\Origin): — The signature of the caller's coldkey. + - `hotkey` (T::AccountId) — The associated hotkey account. + - `netuid` (u16) — Subnetwork UID + - `amount_staked` (u64) — The amount of stake to be added to the hotkey staking account. + + **Event:** + + - StakeAdded; + On the successfully adding stake to a global account. + + **Raises:** + + - `NotEnoughBalanceToStake` — Not enough balance on the coldkey to add onto the global account. + - `NonAssociatedColdKey` — The calling coldkey is not associated with this hotkey. + - `BalanceWithdrawalError` — Errors stemming from transaction pallet. + +### `addStakeBurn(hotkey: AccountId, netuid: NetUid, amount: TaoBalance, limit: Option)` + +- **interface**: `api.tx.subtensorModule.addStakeBurn` +- **summary**: The extrinsic is a combination of add_stake(add_stake_limit) and burn_alpha. We buy alpha token first and immediately burn the acquired amount of alpha (aka Subnet buyback). + +### `addStakeLimit(hotkey: AccountId, netuid: NetUid, amount_staked: TaoBalance, limit_price: TaoBalance, allow_partial: bool)` + +- **interface**: `api.tx.subtensorModule.addStakeLimit` +- **summary**: Adds stake to a hotkey on a subnet with a price limit. This extrinsic allows to specify the limit price for alpha token at which or better (lower) the staking should execute. + + In case if slippage occurs and the price shall move beyond the limit price, the staking order may execute only partially or not execute at all. + + **Args:** + + - `origin` — (\Origin): — The signature of the caller's coldkey. + - `hotkey` (T::AccountId) — The associated hotkey account. + - `netuid` (u16) — Subnetwork UID + - `amount_staked` (u64) — The amount of stake to be added to the hotkey staking account. + - `limit_price` (u64) — The limit price expressed in units of RAO per one Alpha. + - `allow_partial` (bool) — Allows partial execution of the amount. If set to false, this becomes + fill or kill type or order. + + **Event:** + + - StakeAdded; + On the successfully adding stake to a global account. + + **Raises:** + + - `NotEnoughBalanceToStake` — Not enough balance on the coldkey to add onto the global account. + - `NonAssociatedColdKey` — The calling coldkey is not associated with this hotkey. + - `BalanceWithdrawalError` — Errors stemming from transaction pallet. + +### `announceColdkeySwap(new_coldkey_hash: H256)` + +- **interface**: `api.tx.subtensorModule.announceColdkeySwap` +- **summary**: Announces a coldkey swap using BlakeTwo256 hash of the new coldkey. + + This is required before the coldkey swap can be performed after the delay period. + + It can be reannounced after a delay of `ColdkeySwapReannouncementDelay` following the first valid execution block of the original announcement. + + The dispatch origin of this call must be the original coldkey that made the announcement. + + - `new_coldkey_hash`: The hash of the new coldkey using BlakeTwo256. + + The `ColdkeySwapAnnounced` event is emitted on successful announcement. + +### `associateEvmKey(netuid: NetUid, evm_key: H160, block_number: u64, signature: Signature)` + +- **interface**: `api.tx.subtensorModule.associateEvmKey` +- **summary**: Attempts to associate a hotkey with an EVM key. + + The signature will be checked to see if the recovered public key matches the `evm_key` provided. + + The EVM key is expected to sign the message according to this formula to produce the signature: ```text keccak_256(hotkey ++ keccak_256(block_number)) ``` + + **Arguments:** + + - `origin` — The origin of the transaction, which must be signed by the `hotkey`. + - `netuid` — The netuid that the `hotkey` belongs to. + - `evm_key` — The EVM key to associate with the `hotkey`. + - `block_number` — The block number used in the `signature`. + - `signature` — A signed message by the `evm_key` containing the `hotkey` and the hashed `block_number`. + + **Errors:** + + Returns an error if: + - The transaction is not signed. + - The hotkey does not belong to the subnet identified by the netuid. + - The EVM key cannot be recovered from the signature. + - The EVM key recovered from the signature does not match the given EVM key. + + **Events:** + + May emit a `EvmKeyAssociated` event on success + +### `batchCommitWeights(netuids: Vec>, commit_hashes: Vec)` + +- **interface**: `api.tx.subtensorModule.batchCommitWeights` +- **summary**: Allows a hotkey to commit weight hashes for multiple netuids as a batch. + + **Args:** + + - `origin`: (\Origin): + The caller, a hotkey who wishes to set their weights. + + - `netuids` (Vec\>): + The network uids we are setting these weights on. + + - `commit_hashes` (Vec\): + The commit hashes to commit. + + **Event:** + + - WeightsSet; + On successfully setting the weights on chain. + - BatchWeightsCompleted; + On success of the batch. + - BatchCompletedWithErrors; + On failure of any of the weights in the batch. + - BatchWeightItemFailed; + On failure for each failed item in the batch. + +### `batchRevealWeights(netuid: NetUid, uids_list: Vec>, values_list: Vec>, salts_list: Vec>, version_keys: Vec)` + +- **interface**: `api.tx.subtensorModule.batchRevealWeights` +- **summary**: - The implementation for batch revealing committed weights. + + **Args:** + + - `origin`: (`::RuntimeOrigin`): + The signature of the revealing hotkey. + + - `netuid` (`u16`): + The u16 network identifier. + + - `uids_list` (`Vec>`): + A list of uids for each set of weights being revealed. + + - `values_list` (`Vec>`): + A list of values for each set of weights being revealed. + + - `salts_list` (`Vec>`): + A list of salts used to generate the commit hashes. + + - `version_keys` (`Vec`): + A list of network version keys. + + **Raises:** + + - `CommitRevealDisabled`: + Attempting to reveal weights when the commit-reveal mechanism is disabled. + + - `NoWeightsCommitFound`: + Attempting to reveal weights without an existing commit. + + - `ExpiredWeightCommit`: + Attempting to reveal a weight commit that has expired. + + - `RevealTooEarly`: + Attempting to reveal weights outside the valid reveal period. + + - `InvalidRevealCommitHashNotMatch`: + The revealed hash does not match any committed hash. + + - `InvalidInputLengths`: + The input vectors are of mismatched lengths. + +### `batchSetWeights(netuids: Vec>, weights: Vec, Compact)>>, version_keys: Vec>)` + +- **interface**: `api.tx.subtensorModule.batchSetWeights` +- **summary**: Allows a hotkey to set weights for multiple netuids as a batch. + + **Args:** + + - `origin`: (\Origin): + The caller, a hotkey who wishes to set their weights. + + - `netuids` (Vec\>): + The network uids we are setting these weights on. + + - `weights` (Vec\, Compact\)>): + The weights to set for each network. [(uid, weight), ...] + + - `version_keys` (Vec\>): + The network version keys to check if the validator is up to date. + + **Event:** + + - WeightsSet; + On successfully setting the weights on chain. + - BatchWeightsCompleted; + On success of the batch. + - BatchCompletedWithErrors; + On failure of any of the weights in the batch. + - BatchWeightItemFailed; + On failure for each failed item in the batch. + +### `burnAlpha(hotkey: AccountId, amount: AlphaBalance, netuid: NetUid)` + +- **interface**: `api.tx.subtensorModule.burnAlpha` +- **summary**: Burns alpha from a cold/hot key pair without reducing `AlphaOut` + + **Arguments:** + + - `origin` — The origin of the call (must be signed by the coldkey) + - `hotkey` — The hotkey account + - `amount` — The amount of alpha to burn + - `netuid` — The subnet ID + + **Events:** + + Emits a `TokensBurned` event on success. + +### `burnedRegister(netuid: NetUid, hotkey: AccountId)` + +- **interface**: `api.tx.subtensorModule.burnedRegister` +- **summary**: User register a new subnetwork via burning token + +### `claimRoot(subnets: BTreeSet)` + +- **interface**: `api.tx.subtensorModule.claimRoot` +- **summary**: Claims the root emissions for a coldkey. + + **Args:** + + - `origin` — (\Origin): — The signature of the caller's coldkey. + + **Event:** + + - RootClaimed; + On the successfully claiming the root emissions for a coldkey. + + **Raises:** + +### `clearColdkeySwapAnnouncement()` + +- **interface**: `api.tx.subtensorModule.clearColdkeySwapAnnouncement` +- **summary**: Clears a coldkey swap announcement after the reannouncement delay if it has not been disputed. + + The `ColdkeySwapCleared` event is emitted on successful clear. + +### `commitCrv3MechanismWeights(netuid: NetUid, mecid: MechId, commit: BoundedVec>, reveal_round: u64)` + +- **interface**: `api.tx.subtensorModule.commitCrv3MechanismWeights` +- **summary**: - Used to commit encrypted commit-reveal v3 weight values to later be revealed. + + **Args:** + + - `origin`: (`::RuntimeOrigin`): + The committing hotkey. + + - `netuid` (`u16`): + The u16 network identifier. + + - `commit` (`Vec`): + The encrypted compressed commit. The steps for this are: + 1. Instantiate [`WeightsTlockPayload`] + 2. Serialize it using the `parity_scale_codec::Encode` trait + 3. Encrypt it following the steps (here)[https://github.com/ideal-lab5/tle/blob/f8e6019f0fb02c380ebfa6b30efb61786dede07b/timelock/src/tlock.rs#L283-L336] + to produce a [`TLECiphertext`] type. + 4. Serialize and compress using the `ark-serialize` `CanonicalSerialize` trait. + + - reveal_round (`u64`): + The drand reveal round which will be avaliable during epoch `n+1` from the current epoch. + + **Raises:** + + - `CommitRevealV3Disabled`: + Attempting to commit when the commit-reveal mechanism is disabled. + + - `TooManyUnrevealedCommits`: + Attempting to commit when the user has more than the allowed limit of unrevealed commits. + + ---- Used to commit encrypted commit-reveal v3 weight values to later be revealed for mechanisms. + + **Args:** + + - `origin`: (`::RuntimeOrigin`): + The committing hotkey. + + - `netuid` (`u16`): + The u16 network identifier. + + - `mecid` (`u8`): + The u8 mechanism identifier. + + - `commit` (`Vec`): + The encrypted compressed commit. The steps for this are: + 1. Instantiate [`WeightsTlockPayload`] + 2. Serialize it using the `parity_scale_codec::Encode` trait + 3. Encrypt it following the steps (here)[https://github.com/ideal-lab5/tle/blob/f8e6019f0fb02c380ebfa6b30efb61786dede07b/timelock/src/tlock.rs#L283-L336] + to produce a [`TLECiphertext`] type. + 4. Serialize and compress using the `ark-serialize` `CanonicalSerialize` trait. + + - reveal_round (`u64`): + The drand reveal round which will be avaliable during epoch `n+1` from the current epoch. + + **Raises:** + + - `CommitRevealV3Disabled`: + Attempting to commit when the commit-reveal mechanism is disabled. + + - `TooManyUnrevealedCommits`: + Attempting to commit when the user has more than the allowed limit of unrevealed commits. + +### `commitMechanismWeights(netuid: NetUid, mecid: MechId, commit_hash: H256)` + +- **interface**: `api.tx.subtensorModule.commitMechanismWeights` +- **summary**: - Used to commit a hash of your weight values to later be revealed for mechanisms. + + **Args:** + + - `origin`: (`::RuntimeOrigin`): + The signature of the committing hotkey. + + - `netuid` (`u16`): + The u16 network identifier. + + - `mecid` (`u8`): + The u8 mechanism identifier. + + - `commit_hash` (`H256`): + The hash representing the committed weights. + + **Raises:** + + - `CommitRevealDisabled`: + Attempting to commit when the commit-reveal mechanism is disabled. + + - `TooManyUnrevealedCommits`: + Attempting to commit when the user has more than the allowed limit of unrevealed commits. + +### `commitTimelockedMechanismWeights(netuid: NetUid, mecid: MechId, commit: BoundedVec>, reveal_round: u64, commit_reveal_version: u16)` + +- **interface**: `api.tx.subtensorModule.commitTimelockedMechanismWeights` +- **summary**: - Used to commit timelock encrypted commit-reveal weight values to later be revealed for a mechanism. + + **Args:** + + - `origin`: (`::RuntimeOrigin`): + The committing hotkey. + + - `netuid` (`u16`): + The u16 network identifier. + + - `mecid` (`u8`): + The u8 mechanism identifier. + + - `commit` (`Vec`): + The encrypted compressed commit. The steps for this are: + 1. Instantiate [`WeightsTlockPayload`] + 2. Serialize it using the `parity_scale_codec::Encode` trait + 3. Encrypt it following the steps (here)[https://github.com/ideal-lab5/tle/blob/f8e6019f0fb02c380ebfa6b30efb61786dede07b/timelock/src/tlock.rs#L283-L336] + to produce a [`TLECiphertext`] type. + 4. Serialize and compress using the `ark-serialize` `CanonicalSerialize` trait. + + - reveal_round (`u64`): + The drand reveal round which will be avaliable during epoch `n+1` from the current epoch. + + - commit_reveal_version (`u16`): + The client (bittensor-drand) version + +### `commitTimelockedWeights(netuid: NetUid, commit: BoundedVec>, reveal_round: u64, commit_reveal_version: u16)` + +- **interface**: `api.tx.subtensorModule.commitTimelockedWeights` +- **summary**: - Used to commit timelock encrypted commit-reveal weight values to later be revealed. + + **Args:** + + - `origin`: (`::RuntimeOrigin`): + The committing hotkey. + + - `netuid` (`u16`): + The u16 network identifier. + + - `commit` (`Vec`): + The encrypted compressed commit. The steps for this are: + 1. Instantiate [`WeightsTlockPayload`] + 2. Serialize it using the `parity_scale_codec::Encode` trait + 3. Encrypt it following the steps (here)[https://github.com/ideal-lab5/tle/blob/f8e6019f0fb02c380ebfa6b30efb61786dede07b/timelock/src/tlock.rs#L283-L336] + to produce a [`TLECiphertext`] type. + 4. Serialize and compress using the `ark-serialize` `CanonicalSerialize` trait. + + - reveal_round (`u64`): + The drand reveal round which will be avaliable during epoch `n+1` from the current epoch. + + - commit_reveal_version (`u16`): + The client (bittensor-drand) version + +### `commitWeights(netuid: NetUid, commit_hash: H256)` + +- **interface**: `api.tx.subtensorModule.commitWeights` +- **summary**: - Used to commit a hash of your weight values to later be revealed. + + **Args:** + + - `origin`: (`::RuntimeOrigin`): + The signature of the committing hotkey. + + - `netuid` (`u16`): + The u16 network identifier. + + - `commit_hash` (`H256`): + The hash representing the committed weights. + + **Raises:** + + - `CommitRevealDisabled`: + Attempting to commit when the commit-reveal mechanism is disabled. + + - `TooManyUnrevealedCommits`: + Attempting to commit when the user has more than the allowed limit of unrevealed commits. + +### `decreaseTake(hotkey: AccountId, take: u16)` + +- **interface**: `api.tx.subtensorModule.decreaseTake` +- **summary**: Allows delegates to decrease its take value. + + **Args:** + + - `origin` — (\::Origin): — The signature of the caller's coldkey. + - `hotkey` (T::AccountId) — The hotkey we are delegating (must be owned by the coldkey.) + - `netuid` (u16) — Subnet ID to decrease take for + - `take` (u16) — The new stake proportion that this hotkey takes from delegations. + The new value can be between 0 and 11_796 and should be strictly lower than the previous value. It T is the new value (rational number), the the parameter is calculated as [65535 * T]. For example, 1% would be [0.01 * 65535] = [655.35] = 655 + + **Event:** + + - TakeDecreased; + On successfully setting a decreased take for this hotkey. + + **Raises:** + + - `NotRegistered` — The hotkey we are delegating is not registered on the network. + - `NonAssociatedColdKey` — The hotkey we are delegating is not owned by the calling coldkey. + - `DelegateTakeTooLow` — The delegate is setting a take which is not lower than the previous. + +### `disableVotingPowerTracking(netuid: NetUid)` + +- **interface**: `api.tx.subtensorModule.disableVotingPowerTracking` +- **summary**: Schedules disabling of voting power tracking for a subnet. + + This function can be called by the subnet owner or root. Voting power tracking will continue for 14 days (grace period) after this call, then automatically disable and clear all VotingPower entries for the subnet. + + **Arguments:** + + - `origin` — The origin of the call, must be subnet owner or root. + - `netuid` — The subnet to schedule disabling voting power tracking for. + + **Errors:** + + - `SubnetNotExist` — If the subnet does not exist. + - `NotSubnetOwner` — If the caller is not the subnet owner or root. + - `VotingPowerTrackingNotEnabled` — If voting power tracking is not enabled. + +### `disputeColdkeySwap()` + +- **interface**: `api.tx.subtensorModule.disputeColdkeySwap` +- **summary**: Dispute a coldkey swap. + + This will prevent any further actions on the coldkey swap until triumvirate step in to resolve the issue. + + - `coldkey`: The coldkey to dispute the swap for. + +### `dissolveNetwork(coldkey: AccountId, netuid: NetUid)` + +- **interface**: `api.tx.subtensorModule.dissolveNetwork` +- **summary**: Remove a user's subnetwork The caller must be the owner of the network + +### `enableVotingPowerTracking(netuid: NetUid)` + +- **interface**: `api.tx.subtensorModule.enableVotingPowerTracking` +- **summary**: Enables voting power tracking for a subnet. + + This function can be called by the subnet owner or root. When enabled, voting power EMA is updated every epoch for all validators. Voting power starts at 0 and increases over epochs. + + **Arguments:** + + - `origin` — The origin of the call, must be subnet owner or root. + - `netuid` — The subnet to enable voting power tracking for. + + **Errors:** + + - `SubnetNotExist` — If the subnet does not exist. + - `NotSubnetOwner` — If the caller is not the subnet owner or root. + +### `increaseTake(hotkey: AccountId, take: u16)` + +- **interface**: `api.tx.subtensorModule.increaseTake` +- **summary**: Allows delegates to increase its take value. This call is rate-limited. + + **Args:** + + - `origin` — (\::Origin): — The signature of the caller's coldkey. + - `hotkey` (T::AccountId) — The hotkey we are delegating (must be owned by the coldkey.) + - `take` (u16) — The new stake proportion that this hotkey takes from delegations. + The new value can be between 0 and 11_796 and should be strictly greater than the previous value. T is the new value (rational number), the the parameter is calculated as [65535 * T]. For example, 1% would be [0.01 * 65535] = [655.35] = 655 + + **Event:** + + - TakeIncreased; + On successfully setting a increased take for this hotkey. + + **Raises:** + + - `NotRegistered` — The hotkey we are delegating is not registered on the network. + - `NonAssociatedColdKey` — The hotkey we are delegating is not owned by the calling coldkey. + - `DelegateTakeTooHigh` — The delegate is setting a take which is not greater than the previous. + +### `moveStake(origin_hotkey: AccountId, destination_hotkey: AccountId, origin_netuid: NetUid, destination_netuid: NetUid, alpha_amount: AlphaBalance)` + +- **interface**: `api.tx.subtensorModule.moveStake` +- **summary**: - The implementation for the extrinsic move_stake: Moves specified amount of stake from a hotkey to another across subnets. + + **Args:** + + - `origin` — (\::Origin): + The signature of the caller's coldkey. + + - `origin_hotkey` (T::AccountId): + The hotkey account to move stake from. + + - `destination_hotkey` (T::AccountId): + The hotkey account to move stake to. + + - `origin_netuid` (T::AccountId): + The subnet ID to move stake from. + + - `destination_netuid` (T::AccountId): + The subnet ID to move stake to. + + - `alpha_amount` (T::AccountId): + The alpha stake amount to move. + +### `recycleAlpha(hotkey: AccountId, amount: AlphaBalance, netuid: NetUid)` + +- **interface**: `api.tx.subtensorModule.recycleAlpha` +- **summary**: Recycles alpha from a cold/hot key pair, reducing AlphaOut on a subnet + + **Arguments:** + + - `origin` — The origin of the call (must be signed by the coldkey) + - `hotkey` — The hotkey account + - `amount` — The amount of alpha to recycle + - `netuid` — The subnet ID + + **Events:** + + Emits a `TokensRecycled` event on success. + +### `register(netuid: NetUid, block_number: u64, nonce: u64, work: Vec, hotkey: AccountId, coldkey: AccountId)` + +- **interface**: `api.tx.subtensorModule.register` +- **summary**: - Registers a new neuron to the subnetwork. + + **Args:** + + - `origin` — (\Origin): — The signature of the calling hotkey. + - `netuid` (u16) — The u16 network identifier. + - `block_number` (u64) — Block hash used to prove work done. + - `nonce` (u64) — Positive integer nonce used in POW. + - `work` (Vec\) — Vector encoded bytes representing work done. + - `hotkey` (T::AccountId) — Hotkey to be registered to the network. + - `coldkey` (T::AccountId) — Associated coldkey account. + + **Event:** + + - NeuronRegistered; + On successfully registering a uid to a neuron slot on a subnetwork. + + **Raises:** + + - `MechanismDoesNotExist` — Attempting to register to a non existent network. + - `TooManyRegistrationsThisBlock` — This registration exceeds the total allowed on this network this block. + - `HotKeyAlreadyRegisteredInSubNet` — The hotkey is already registered on this network. + - `InvalidWorkBlock` — The work has been performed on a stale, future, or non existent block. + - `InvalidDifficulty` — The work does not match the difficulty. + - `InvalidSeal` — The seal is incorrect. + +### `registerLeasedNetwork(emissions_share: Percent, end_block: Option>)` + +- **interface**: `api.tx.subtensorModule.registerLeasedNetwork` +- **summary**: Register a new leased network. + + The crowdloan's contributions are used to compute the share of the emissions that the contributors will receive as dividends. + + The leftover cap is refunded to the contributors and the beneficiary. + + **Args:** + + - `origin` — (\::Origin): + The signature of the caller's coldkey. + + - `emissions_share` (Percent): + The share of the emissions that the contributors will receive as dividends. + + - `end_block` (Option\>): + The block at which the lease will end. If not defined, the lease is perpetual. + +### `registerNetwork(hotkey: AccountId)` + +- **interface**: `api.tx.subtensorModule.registerNetwork` +- **summary**: User register a new subnetwork + +### `registerNetworkWithIdentity(hotkey: AccountId, identity: Option)` + +- **interface**: `api.tx.subtensorModule.registerNetworkWithIdentity` +- **summary**: User register a new subnetwork + +### `removeStake(hotkey: AccountId, netuid: NetUid, amount_unstaked: AlphaBalance)` + +- **interface**: `api.tx.subtensorModule.removeStake` +- **summary**: Remove stake from the staking account. The call must be made from the coldkey account attached to the neuron metadata. Only this key has permission to make staking and unstaking requests. + + **Args:** + + - `origin` — (\Origin): — The signature of the caller's coldkey. + - `hotkey` (T::AccountId) — The associated hotkey account. + - `netuid` (u16) — Subnetwork UID + - `amount_unstaked` (u64) — The amount of stake to be added to the hotkey staking account. + + **Event:** + + - StakeRemoved; + On the successfully removing stake from the hotkey account. + + **Raises:** + + - `NotRegistered` — Thrown if the account we are attempting to unstake from is non existent. + - `NonAssociatedColdKey` — Thrown if the coldkey does not own the hotkey we are unstaking from. + - `NotEnoughStakeToWithdraw` — Thrown if there is not enough stake on the hotkey to withdwraw this amount. + +### `removeStakeFullLimit(hotkey: AccountId, netuid: NetUid, limit_price: Option)` + +- **interface**: `api.tx.subtensorModule.removeStakeFullLimit` +- **summary**: Removes all stake from a hotkey on a subnet with a price limit. This extrinsic allows to specify the limit price for alpha token at which or better (higher) the staking should execute. Without limit_price it remove all the stake similar to `remove_stake` extrinsic + +### `removeStakeLimit(hotkey: AccountId, netuid: NetUid, amount_unstaked: AlphaBalance, limit_price: TaoBalance, allow_partial: bool)` + +- **interface**: `api.tx.subtensorModule.removeStakeLimit` +- **summary**: Removes stake from a hotkey on a subnet with a price limit. This extrinsic allows to specify the limit price for alpha token at which or better (higher) the staking should execute. + + In case if slippage occurs and the price shall move beyond the limit price, the staking order may execute only partially or not execute at all. + + **Args:** + + - `origin` — (\Origin): — The signature of the caller's coldkey. + - `hotkey` (T::AccountId) — The associated hotkey account. + - `netuid` (u16) — Subnetwork UID + - `amount_unstaked` (u64) — The amount of stake to be added to the hotkey staking account. + - `limit_price` (u64) — The limit price expressed in units of RAO per one Alpha. + - `allow_partial` (bool) — Allows partial execution of the amount. If set to false, this becomes + fill or kill type or order. + + **Event:** + + - StakeRemoved; + On the successfully removing stake from the hotkey account. + + **Raises:** + + - `NotRegistered` — Thrown if the account we are attempting to unstake from is non existent. + - `NonAssociatedColdKey` — Thrown if the coldkey does not own the hotkey we are unstaking from. + - `NotEnoughStakeToWithdraw` — Thrown if there is not enough stake on the hotkey to withdwraw this amount. + +### `resetColdkeySwap(coldkey: AccountId)` + +- **interface**: `api.tx.subtensorModule.resetColdkeySwap` +- **summary**: Reset a coldkey swap by clearing the announcement and dispute status. + + The dispatch origin of this call must be root. + + - `coldkey`: The coldkey to reset the swap for. + +### `revealMechanismWeights(netuid: NetUid, mecid: MechId, uids: Vec, values: Vec, salt: Vec, version_key: u64)` + +- **interface**: `api.tx.subtensorModule.revealMechanismWeights` +- **summary**: - Used to reveal the weights for a previously committed hash for mechanisms. + + **Args:** + + - `origin`: (`::RuntimeOrigin`): + The signature of the revealing hotkey. + + - `netuid` (`u16`): + The u16 network identifier. + + - `mecid` (`u8`): + The u8 mechanism identifier. + + - `uids` (`Vec`): + The uids for the weights being revealed. + + - `values` (`Vec`): + The values of the weights being revealed. + + - `salt` (`Vec`): + The salt used to generate the commit hash. + + - `version_key` (`u64`): + The network version key. + + **Raises:** + + - `CommitRevealDisabled`: + Attempting to reveal weights when the commit-reveal mechanism is disabled. + + - `NoWeightsCommitFound`: + Attempting to reveal weights without an existing commit. + + - `ExpiredWeightCommit`: + Attempting to reveal a weight commit that has expired. + + - `RevealTooEarly`: + Attempting to reveal weights outside the valid reveal period. + + - `InvalidRevealCommitHashNotMatch`: + The revealed hash does not match any committed hash. + +### `revealWeights(netuid: NetUid, uids: Vec, values: Vec, salt: Vec, version_key: u64)` + +- **interface**: `api.tx.subtensorModule.revealWeights` +- **summary**: - Used to reveal the weights for a previously committed hash. + + **Args:** + + - `origin`: (`::RuntimeOrigin`): + The signature of the revealing hotkey. + + - `netuid` (`u16`): + The u16 network identifier. + + - `uids` (`Vec`): + The uids for the weights being revealed. + + - `values` (`Vec`): + The values of the weights being revealed. + + - `salt` (`Vec`): + The salt used to generate the commit hash. + + - `version_key` (`u64`): + The network version key. + + **Raises:** + + - `CommitRevealDisabled`: + Attempting to reveal weights when the commit-reveal mechanism is disabled. + + - `NoWeightsCommitFound`: + Attempting to reveal weights without an existing commit. + + - `ExpiredWeightCommit`: + Attempting to reveal a weight commit that has expired. + + - `RevealTooEarly`: + Attempting to reveal weights outside the valid reveal period. + + - `InvalidRevealCommitHashNotMatch`: + The revealed hash does not match any committed hash. + +### `rootDissolveNetwork(netuid: NetUid)` + +- **interface**: `api.tx.subtensorModule.rootDissolveNetwork` +- **summary**: Remove a subnetwork The caller must be root + +### `rootRegister(hotkey: AccountId)` + +- **interface**: `api.tx.subtensorModule.rootRegister` +- **summary**: Register the hotkey to root network + +### `scheduleSwapColdkey(new_coldkey: AccountId)` + +- **interface**: `api.tx.subtensorModule.scheduleSwapColdkey` +- **summary**: Schedules a coldkey swap operation to be executed at a future block. + + WARNING: This function is deprecated, please migrate to `announce_coldkey_swap`/`coldkey_swap` + +### `serveAxon(netuid: NetUid, version: u32, ip: u128, port: u16, ip_type: u8, protocol: u8, placeholder1: u8, placeholder2: u8)` + +- **interface**: `api.tx.subtensorModule.serveAxon` +- **summary**: Serves or updates axon /prometheus information for the neuron associated with the caller. If the caller is already registered the metadata is updated. If the caller is not registered this call throws NotRegistered. + + **Args:** + + - `origin` — (\Origin): — The signature of the caller. + - `netuid` (u16) — The u16 network identifier. + - `version` (u64) — The bittensor version identifier. + - `ip` (u64) — The endpoint ip information as a u128 encoded integer. + - `port` (u16) — The endpoint port information as a u16 encoded integer. + - `ip_type` (u8) — The endpoint ip version as a u8, 4 or 6. + - `protocol` (u8) — UDP:1 or TCP:0 + - `placeholder1` (u8) — Placeholder for further extra params. + - `placeholder2` (u8) — Placeholder for further extra params. + + **Event:** + + - AxonServed; + On successfully serving the axon info. + + **Raises:** + + - `MechanismDoesNotExist` — Attempting to set weights on a non-existent network. + - `NotRegistered` — Attempting to set weights from a non registered account. + - `InvalidIpType` — The ip type is not 4 or 6. + - `InvalidIpAddress` — The numerically encoded ip address does not resolve to a proper ip. + - `ServingRateLimitExceeded` — Attempting to set prometheus information withing the rate limit min. + +### `serveAxonTls(netuid: NetUid, version: u32, ip: u128, port: u16, ip_type: u8, protocol: u8, placeholder1: u8, placeholder2: u8, certificate: Vec)` + +- **interface**: `api.tx.subtensorModule.serveAxonTls` +- **summary**: Same as `serve_axon` but takes a certificate as an extra optional argument. Serves or updates axon /prometheus information for the neuron associated with the caller. If the caller is already registered the metadata is updated. If the caller is not registered this call throws NotRegistered. + + **Args:** + + - `origin` — (\Origin): — The signature of the caller. + - `netuid` (u16) — The u16 network identifier. + - `version` (u64) — The bittensor version identifier. + - `ip` (u64) — The endpoint ip information as a u128 encoded integer. + - `port` (u16) — The endpoint port information as a u16 encoded integer. + - `ip_type` (u8) — The endpoint ip version as a u8, 4 or 6. + - `protocol` (u8) — UDP:1 or TCP:0 + - `placeholder1` (u8) — Placeholder for further extra params. + - `placeholder2` (u8) — Placeholder for further extra params. + - `certificate` (Vec\) — TLS certificate for inter neuron communitation. + + **Event:** + + - AxonServed; + On successfully serving the axon info. + + **Raises:** + + - `MechanismDoesNotExist` — Attempting to set weights on a non-existent network. + - `NotRegistered` — Attempting to set weights from a non registered account. + - `InvalidIpType` — The ip type is not 4 or 6. + - `InvalidIpAddress` — The numerically encoded ip address does not resolve to a proper ip. + - `ServingRateLimitExceeded` — Attempting to set prometheus information withing the rate limit min. + +### `servePrometheus(netuid: NetUid, version: u32, ip: u128, port: u16, ip_type: u8)` + +- **interface**: `api.tx.subtensorModule.servePrometheus` +- **summary**: - Set prometheus information for the neuron. + + **Args:** + + - `origin` — (\Origin): — The signature of the calling hotkey. + - `netuid` (u16) — The u16 network identifier. + - `version` (u16) — The bittensor version identifier. + - `ip` (u128) — The prometheus ip information as a u128 encoded integer. + - `port` (u16) — The prometheus port information as a u16 encoded integer. + - `ip_type` (u8) — The ip type v4 or v6. + +### `setChildkeyTake(hotkey: AccountId, netuid: NetUid, take: u16)` + +- **interface**: `api.tx.subtensorModule.setChildkeyTake` +- **summary**: Sets the childkey take for a given hotkey. + + This function allows a coldkey to set the childkey take for a given hotkey. The childkey take determines the proportion of stake that the hotkey keeps for itself when distributing stake to its children. + + **Arguments:** + + - `origin` (\::RuntimeOrigin): + The signature of the calling coldkey. Setting childkey take can only be done by the coldkey. + + - `hotkey` (T::AccountId): + The hotkey for which the childkey take will be set. + + - `take` (u16): + The new childkey take value. This is a percentage represented as a value between 0 and 10000, where 10000 represents 100%. + + **Events:** + + - `ChildkeyTakeSet`: + On successfully setting the childkey take for a hotkey. + + **Errors:** + + - `NonAssociatedColdKey`: + The coldkey does not own the hotkey. + - `InvalidChildkeyTake`: + The provided take value is invalid (greater than the maximum allowed take). + - `TxChildkeyTakeRateLimitExceeded`: + The rate limit for changing childkey take has been exceeded. + +### `setChildren(hotkey: AccountId, netuid: NetUid, children: Vec<(u64, T::AccountId)>)` + +- **interface**: `api.tx.subtensorModule.setChildren` +- **summary**: Set a single child for a given hotkey on a specified network. + + This function allows a coldkey to set a single child for a given hotkey on a specified network. The proportion of the hotkey's stake to be allocated to the child is also specified. + + **Arguments:** + + - `origin` (\::RuntimeOrigin): + The signature of the calling coldkey. Setting a hotkey child can only be done by the coldkey. + + - `hotkey` (T::AccountId): + The hotkey which will be assigned the child. + + - `child` (T::AccountId): + The child which will be assigned to the hotkey. + + - `netuid` (u16): + The u16 network identifier where the childkey will exist. + + - `proportion` (u64): + Proportion of the hotkey's stake to be given to the child, the value must be u64 normalized. + + **Events:** + + - `ChildAddedSingular`: + On successfully registering a child to a hotkey. + + **Errors:** + + - `MechanismDoesNotExist`: + Attempting to register to a non-existent network. + - `RegistrationNotPermittedOnRootSubnet`: + Attempting to register a child on the root network. + - `NonAssociatedColdKey`: + The coldkey does not own the hotkey or the child is the same as the hotkey. + - `HotKeyAccountNotExists`: + The hotkey account does not exist. + + **Detailed Explanation of Checks:** + + 1. **Signature Verification**: Ensures that the caller has signed the transaction, verifying the coldkey. + 2. **Root Network Check**: Ensures that the delegation is not on the root network, as child hotkeys are not valid on the root. + 3. **Network Existence Check**: Ensures that the specified network exists. + 4. **Ownership Verification**: Ensures that the coldkey owns the hotkey. + 5. **Hotkey Account Existence Check**: Ensures that the hotkey account already exists. + 6. **Child-Hotkey Distinction**: Ensures that the child is not the same as the hotkey. + 7. **Old Children Cleanup**: Removes the hotkey from the parent list of its old children. + 8. **New Children Assignment**: Assigns the new child to the hotkey and updates the parent list for the new child. + +### `setColdkeyAutoStakeHotkey(netuid: NetUid, hotkey: AccountId)` + +- **interface**: `api.tx.subtensorModule.setColdkeyAutoStakeHotkey` +- **summary**: Set the autostake destination hotkey for a coldkey. + + The caller selects a hotkey where all future rewards will be automatically staked. + + **Args:** + + - `origin` — (\::Origin): + The signature of the caller's coldkey. + + - `hotkey` (T::AccountId): + The hotkey account to designate as the autostake destination. + +### `setIdentity(name: Vec, url: Vec, github_repo: Vec, image: Vec, discord: Vec, description: Vec, additional: Vec)` + +- **interface**: `api.tx.subtensorModule.setIdentity` +- **summary**: - Set prometheus information for the neuron. + + **Args:** + + - `origin` — (\Origin): — The signature of the calling hotkey. + - `netuid` (u16) — The u16 network identifier. + - `version` (u16) — The bittensor version identifier. + - `ip` (u128) — The prometheus ip information as a u128 encoded integer. + - `port` (u16) — The prometheus port information as a u16 encoded integer. + - `ip_type` (u8) — The ip type v4 or v6. + +### `setMechanismWeights(netuid: NetUid, mecid: MechId, dests: Vec, weights: Vec, version_key: u64)` + +- **interface**: `api.tx.subtensorModule.setMechanismWeights` +- **summary**: Sets the caller weights for the incentive mechanism for mechanisms. The call can be made from the hotkey account so is potentially insecure, however, the damage of changing weights is minimal if caught early. This function includes all the checks that the passed weights meet the requirements. Stored as u16s they represent rational values in the range [0,1] which sum to 1 and can be interpreted as probabilities. The specific weights determine how inflation propagates outward from this peer. + + Note: The 16 bit integers weights should represent 1.0 as the max u16. However, the function normalizes all integers to u16_max anyway. This means that if the sum of all elements is larger or smaller than the amount of elements * u16_max, all elements will be corrected for this deviation. + + **Args:** + + - `origin`: (\Origin): + The caller, a hotkey who wishes to set their weights. + + - `netuid` (u16): + The network uid we are setting these weights on. + + - `mecid` (`u8`): + The u8 mechnism identifier. + + - `dests` (Vec\): + The edge endpoint for the weight, i.e. j for w_ij. + + - `weights` (Vec\) — The u16 integer encoded weights. Interpreted as rational + values in the range [0,1]. They must sum to in32::MAX. + + - `version_key` (u64) — The network version key to check if the validator is up to date. + + **Event:** + + - WeightsSet; + On successfully setting the weights on chain. + + **Raises:** + + - `MechanismDoesNotExist` — Attempting to set weights on a non-existent network. + - `NotRegistered` — Attempting to set weights from a non registered account. + - `WeightVecNotEqualSize` — Attempting to set weights with uids not of same length. + - `DuplicateUids` — Attempting to set weights with duplicate uids. + - `UidsLengthExceedUidsInSubNet` — Attempting to set weights above the max allowed uids. + - `UidVecContainInvalidOne` — Attempting to set weights with invalid uids. + - `WeightVecLengthIsLow` — Attempting to set weights with fewer weights than min. + - `MaxWeightExceeded` — Attempting to set weights with max value exceeding limit. + +### `setPendingChildkeyCooldown(cooldown: u64)` + +- **interface**: `api.tx.subtensorModule.setPendingChildkeyCooldown` +- **summary**: Sets the pending childkey cooldown (in blocks). Root only. + +### `setRootClaimType(new_root_claim_type: RootClaimTypeEnum)` + +- **interface**: `api.tx.subtensorModule.setRootClaimType` +- **summary**: Sets the root claim type for the coldkey. + + **Args:** + + - `origin` — (\Origin): — The signature of the caller's coldkey. + + **Event:** + + - RootClaimTypeSet; + On the successfully setting the root claim type for the coldkey. + +### `setSubnetIdentity(netuid: NetUid, subnet_name: Vec, github_repo: Vec, subnet_contact: Vec, subnet_url: Vec, discord: Vec, description: Vec, logo_url: Vec, additional: Vec)` + +- **interface**: `api.tx.subtensorModule.setSubnetIdentity` +- **summary**: - Set the identity information for a subnet. + + **Args:** + + - `origin` — (\::Origin): + The signature of the calling coldkey, which must be the owner of the subnet. + + - `netuid` (u16): + The unique network identifier of the subnet. + + - `subnet_name` (Vec\): + The name of the subnet. + + - `github_repo` (Vec\): + The GitHub repository associated with the subnet identity. + + - `subnet_contact` (Vec\): + The contact information for the subnet. + +### `setWeights(netuid: NetUid, dests: Vec, weights: Vec, version_key: u64)` + +- **interface**: `api.tx.subtensorModule.setWeights` +- **summary**: Sets the caller weights for the incentive mechanism. The call can be made from the hotkey account so is potentially insecure, however, the damage of changing weights is minimal if caught early. This function includes all the checks that the passed weights meet the requirements. Stored as u16s they represent rational values in the range [0,1] which sum to 1 and can be interpreted as probabilities. The specific weights determine how inflation propagates outward from this peer. + + Note: The 16 bit integers weights should represent 1.0 as the max u16. However, the function normalizes all integers to u16_max anyway. This means that if the sum of all elements is larger or smaller than the amount of elements * u16_max, all elements will be corrected for this deviation. + + **Args:** + + - `origin`: (\Origin): + The caller, a hotkey who wishes to set their weights. + + - `netuid` (u16): + The network uid we are setting these weights on. + + - `dests` (Vec\): + The edge endpoint for the weight, i.e. j for w_ij. + + - `weights` (Vec\) — The u16 integer encoded weights. Interpreted as rational + values in the range [0,1]. They must sum to in32::MAX. + + - `version_key` (u64) — The network version key to check if the validator is up to date. + + **Event:** + + - WeightsSet; + On successfully setting the weights on chain. + + **Raises:** + + - `MechanismDoesNotExist` — Attempting to set weights on a non-existent network. + - `NotRegistered` — Attempting to set weights from a non registered account. + - `WeightVecNotEqualSize` — Attempting to set weights with uids not of same length. + - `DuplicateUids` — Attempting to set weights with duplicate uids. + - `UidsLengthExceedUidsInSubNet` — Attempting to set weights above the max allowed uids. + - `UidVecContainInvalidOne` — Attempting to set weights with invalid uids. + - `WeightVecLengthIsLow` — Attempting to set weights with fewer weights than min. + - `MaxWeightExceeded` — Attempting to set weights with max value exceeding limit. + +### `startCall(netuid: NetUid)` + +- **interface**: `api.tx.subtensorModule.startCall` +- **summary**: Initiates a call on a subnet. + + **Arguments:** + + - `origin` — The origin of the call, which must be signed by the subnet owner. + - `netuid` — The unique identifier of the subnet on which the call is being initiated. + + **Events:** + + Emits a `FirstEmissionBlockNumberSet` event on success. + +### `sudoSetMaxChildkeyTake(take: u16)` + +- **interface**: `api.tx.subtensorModule.sudoSetMaxChildkeyTake` +- **summary**: Sets the maximum allowed childkey take. + + This function can only be called by the root origin. + + **Arguments:** + + - `origin` — The origin of the call, must be root. + - `take` — The new maximum childkey take value. + + **Errors:** + + - `BadOrigin` — If the origin is not root. + +### `sudoSetMinChildkeyTake(take: u16)` + +- **interface**: `api.tx.subtensorModule.sudoSetMinChildkeyTake` +- **summary**: Sets the minimum allowed childkey take. + + This function can only be called by the root origin. + + **Arguments:** + + - `origin` — The origin of the call, must be root. + - `take` — The new minimum childkey take value. + + **Errors:** + + - `BadOrigin` — If the origin is not root. + +### `sudoSetNumRootClaims(new_value: u64)` + +- **interface**: `api.tx.subtensorModule.sudoSetNumRootClaims` +- **summary**: Sets root claim number (sudo extrinsic). Zero disables auto-claim. + +### `sudoSetRootClaimThreshold(netuid: NetUid, new_value: u64)` + +- **interface**: `api.tx.subtensorModule.sudoSetRootClaimThreshold` +- **summary**: Sets root claim threshold for subnet (sudo or owner origin). + +### `sudoSetTxChildkeyTakeRateLimit(tx_rate_limit: u64)` + +- **interface**: `api.tx.subtensorModule.sudoSetTxChildkeyTakeRateLimit` +- **summary**: Sets the transaction rate limit for changing childkey take. + + This function can only be called by the root origin. + + **Arguments:** + + - `origin` — The origin of the call, must be root. + - `tx_rate_limit` — The new rate limit in blocks. + + **Errors:** + + - `BadOrigin` — If the origin is not root. + +### `sudoSetVotingPowerEmaAlpha(netuid: NetUid, alpha: u64)` + +- **interface**: `api.tx.subtensorModule.sudoSetVotingPowerEmaAlpha` +- **summary**: Sets the EMA alpha value for voting power calculation on a subnet. + + This function can only be called by root (sudo). Higher alpha = faster response to stake changes. Alpha is stored as u64 with 18 decimal precision (1.0 = 10^18). + + **Arguments:** + + - `origin` — The origin of the call, must be root. + - `netuid` — The subnet to set the alpha for. + - `alpha` — The new alpha value (u64 with 18 decimal precision). + + **Errors:** + + - `BadOrigin` — If the origin is not root. + - `SubnetNotExist` — If the subnet does not exist. + - `InvalidVotingPowerEmaAlpha` — If alpha is greater than 10^18 (1.0). + +### `swapColdkey(old_coldkey: AccountId, new_coldkey: AccountId, swap_cost: TaoBalance)` + +- **interface**: `api.tx.subtensorModule.swapColdkey` +- **summary**: Performs an arbitrary coldkey swap for any coldkey. + + Only callable by root as it doesn't require an announcement and can be used to swap any coldkey. + +### `swapColdkeyAnnounced(new_coldkey: AccountId)` + +- **interface**: `api.tx.subtensorModule.swapColdkeyAnnounced` +- **summary**: Performs a coldkey swap if an announcement has been made. + + The dispatch origin of this call must be the original coldkey that made the announcement. + + - `new_coldkey`: The new coldkey to swap to. The BlakeTwo256 hash of the new coldkey must be + the same as the announced coldkey hash. + + The `ColdkeySwapped` event is emitted on successful swap. + +### `swapHotkey(hotkey: AccountId, new_hotkey: AccountId, netuid: Option)` + +- **interface**: `api.tx.subtensorModule.swapHotkey` +- **summary**: - The extrinsic for user to change its hotkey in subnet or all subnets. + + **Arguments:** + + - `origin` — The origin of the transaction (must be signed by the coldkey). + - `hotkey` — The old hotkey to be swapped. + - `new_hotkey` — The new hotkey to replace the old one. + - `netuid` — Optional subnet ID. If `Some`, swap only on that subnet; if `None`, swap on all subnets. + is transferred to the new hotkey. + +### `swapHotkeyV2(hotkey: AccountId, new_hotkey: AccountId, netuid: Option, keep_stake: bool)` + +- **interface**: `api.tx.subtensorModule.swapHotkeyV2` +- **summary**: - The extrinsic for user to change its hotkey in subnet or all subnets. This extrinsic is similar to swap_hotkey, but with keep_stake parameter bo be able to keep the stake when swapping a root key to a child key + + **Arguments:** + + - `origin` — The origin of the transaction (must be signed by the coldkey). + - `hotkey` — The old hotkey to be swapped. + - `new_hotkey` — The new hotkey to replace the old one. + - `netuid` — Optional subnet ID. If `Some`, swap only on that subnet; if `None`, swap on all subnets. + - `keep_stake` — If `true`, stake remains on the old hotkey and the rest metadata + is transferred to the new hotkey. + +### `swapStake(hotkey: AccountId, origin_netuid: NetUid, destination_netuid: NetUid, alpha_amount: AlphaBalance)` + +- **interface**: `api.tx.subtensorModule.swapStake` +- **summary**: Swaps a specified amount of stake from one subnet to another, while keeping the same coldkey and hotkey. + + **Arguments:** + + - `origin` — The origin of the transaction, which must be signed by the coldkey that owns the `hotkey`. + - `hotkey` — The hotkey whose stake is being swapped. + - `origin_netuid` — The network/subnet ID from which stake is removed. + - `destination_netuid` — The network/subnet ID to which stake is added. + - `alpha_amount` — The amount of stake to swap. + + **Errors:** + + Returns an error if: + - The transaction is not signed by the correct coldkey (i.e., `coldkey_owns_hotkey` fails). + - Either `origin_netuid` or `destination_netuid` does not exist. + - The hotkey does not exist. + - There is insufficient stake on `(coldkey, hotkey, origin_netuid)`. + - The swap amount is below the minimum stake requirement. + + **Events:** + + May emit a `StakeSwapped` event on success. + +### `swapStakeLimit(hotkey: AccountId, origin_netuid: NetUid, destination_netuid: NetUid, alpha_amount: AlphaBalance, limit_price: TaoBalance, allow_partial: bool)` + +- **interface**: `api.tx.subtensorModule.swapStakeLimit` +- **summary**: Swaps a specified amount of stake from one subnet to another, while keeping the same coldkey and hotkey. + + **Arguments:** + + - `origin` — The origin of the transaction, which must be signed by the coldkey that owns the `hotkey`. + - `hotkey` — The hotkey whose stake is being swapped. + - `origin_netuid` — The network/subnet ID from which stake is removed. + - `destination_netuid` — The network/subnet ID to which stake is added. + - `alpha_amount` — The amount of stake to swap. + - `limit_price` — The limit price expressed in units of RAO per one Alpha. + - `allow_partial` — Allows partial execution of the amount. If set to false, this becomes fill or kill type or order. + + **Errors:** + + Returns an error if: + - The transaction is not signed by the correct coldkey (i.e., `coldkey_owns_hotkey` fails). + - Either `origin_netuid` or `destination_netuid` does not exist. + - The hotkey does not exist. + - There is insufficient stake on `(coldkey, hotkey, origin_netuid)`. + - The swap amount is below the minimum stake requirement. + + **Events:** + + May emit a `StakeSwapped` event on success. + +### `terminateLease(lease_id: LeaseId, hotkey: AccountId)` + +- **interface**: `api.tx.subtensorModule.terminateLease` +- **summary**: Terminate a lease. + + The beneficiary can terminate the lease after the end block has passed and get the subnet ownership. The subnet is transferred to the beneficiary and the lease is removed from storage. + + **The hotkey must be owned by the beneficiary coldkey.** + + **Args:** + + - `origin` — (\::Origin): + The signature of the caller's coldkey. + + - `lease_id` (LeaseId): + The ID of the lease to terminate. + + - `hotkey` (T::AccountId): + The hotkey of the beneficiary to mark as subnet owner hotkey. + +### `transferStake(destination_coldkey: AccountId, hotkey: AccountId, origin_netuid: NetUid, destination_netuid: NetUid, alpha_amount: AlphaBalance)` + +- **interface**: `api.tx.subtensorModule.transferStake` +- **summary**: Transfers a specified amount of stake from one coldkey to another, optionally across subnets, while keeping the same hotkey. + + **Arguments:** + + - `origin` — The origin of the transaction, which must be signed by the `origin_coldkey`. + - `destination_coldkey` — The coldkey to which the stake is transferred. + - `hotkey` — The hotkey associated with the stake. + - `origin_netuid` — The network/subnet ID to move stake from. + - `destination_netuid` — The network/subnet ID to move stake to (for cross-subnet transfer). + - `alpha_amount` — The amount of stake to transfer. + + **Errors:** + + Returns an error if: + - The origin is not signed by the correct coldkey. + - Either subnet does not exist. + - The hotkey does not exist. + - There is insufficient stake on `(origin_coldkey, hotkey, origin_netuid)`. + - The transfer amount is below the minimum stake requirement. + + **Events:** + + May emit a `StakeTransferred` event on success. + +### `tryAssociateHotkey(hotkey: AccountId)` + +- **interface**: `api.tx.subtensorModule.tryAssociateHotkey` +- **summary**: Attempts to associate a hotkey with a coldkey. + + **Arguments:** + + - `origin` — The origin of the transaction, which must be signed by the coldkey that owns the `hotkey`. + - `hotkey` — The hotkey to associate with the coldkey. + + **Note:** + + Will charge based on the weight even if the hotkey is already associated with a coldkey. + +### `unstakeAll(hotkey: AccountId)` + +- **interface**: `api.tx.subtensorModule.unstakeAll` +- **summary**: - The implementation for the extrinsic unstake_all: Removes all stake from a hotkey account across all subnets and adds it onto a coldkey. + + **Args:** + + - `origin` — (\::Origin): + The signature of the caller's coldkey. + + - `hotkey` (T::AccountId): + The associated hotkey account. + + **Event:** + + - StakeRemoved; + On the successfully removing stake from the hotkey account. + + **Raises:** + + - `NotRegistered`: + Thrown if the account we are attempting to unstake from is non existent. + + - `NonAssociatedColdKey`: + Thrown if the coldkey does not own the hotkey we are unstaking from. + + - `NotEnoughStakeToWithdraw`: + Thrown if there is not enough stake on the hotkey to withdraw this amount. + + - `TxRateLimitExceeded`: + Thrown if key has hit transaction rate limit + +### `unstakeAllAlpha(hotkey: AccountId)` + +- **interface**: `api.tx.subtensorModule.unstakeAllAlpha` +- **summary**: - The implementation for the extrinsic unstake_all: Removes all stake from a hotkey account across all subnets and adds it onto a coldkey. + + **Args:** + + - `origin` — (\::Origin): + The signature of the caller's coldkey. + + - `hotkey` (T::AccountId): + The associated hotkey account. + + **Event:** + + - StakeRemoved; + On the successfully removing stake from the hotkey account. + + **Raises:** + + - `NotRegistered`: + Thrown if the account we are attempting to unstake from is non existent. + + - `NonAssociatedColdKey`: + Thrown if the coldkey does not own the hotkey we are unstaking from. + + - `NotEnoughStakeToWithdraw`: + Thrown if there is not enough stake on the hotkey to withdraw this amount. + + - `TxRateLimitExceeded`: + Thrown if key has hit transaction rate limit + +### `updateSymbol(netuid: NetUid, symbol: Vec)` + +- **interface**: `api.tx.subtensorModule.updateSymbol` +- **summary**: Updates the symbol for a subnet. + + **Arguments:** + + - `origin` — The origin of the call, which must be the subnet owner or root. + - `netuid` — The unique identifier of the subnet on which the symbol is being set. + - `symbol` — The symbol to set for the subnet. + + **Errors:** + + Returns an error if: + - The transaction is not signed by the subnet owner. + - The symbol does not exist. + - The symbol is already in use by another subnet. + + **Events:** + + Emits a `SymbolUpdated` event on success. + + +## `sudo` + +### `removeKey()` + +- **interface**: `api.tx.sudo.removeKey` +- **summary**: Permanently removes the sudo key. + + **This cannot be un-done.** + +### `setKey(new: MultiAddress)` + +- **interface**: `api.tx.sudo.setKey` +- **summary**: Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. + +### `sudo(call: Box)` + +- **interface**: `api.tx.sudo.sudo` +- **summary**: Authenticates the sudo key and dispatches a function call with `Root` origin. + +### `sudoAs(who: MultiAddress, call: Box)` + +- **interface**: `api.tx.sudo.sudoAs` +- **summary**: Authenticates the sudo key and dispatches a function call with `Signed` origin from a given account. + + The dispatch origin for this call must be _Signed_. + +### `sudoUncheckedWeight(call: Box, weight: Weight)` + +- **interface**: `api.tx.sudo.sudoUncheckedWeight` +- **summary**: Authenticates the sudo key and dispatches a function call with `Root` origin. This function does not check the weight of the call, and instead allows the Sudo user to specify the weight of the call. + + The dispatch origin for this call must be _Signed_. + + +## `swap` + +### `addLiquidity(hotkey: AccountId, netuid: NetUid, tick_low: TickIndex, tick_high: TickIndex, liquidity: u64)` + +- **interface**: `api.tx.swap.addLiquidity` +- **summary**: Add liquidity to a specific price range for a subnet. + + **Parameters:** + + - origin: The origin of the transaction + - netuid: Subnet ID + - tick_low: Lower bound of the price range + - tick_high: Upper bound of the price range + - liquidity: Amount of liquidity to add + + Emits `Event::LiquidityAdded` on success + +### `disableLp()` + +- **interface**: `api.tx.swap.disableLp` +- **summary**: Disable user liquidity in all subnets. + + Emits `Event::UserLiquidityToggled` on success + +### `modifyPosition(hotkey: AccountId, netuid: NetUid, position_id: PositionId, liquidity_delta: i64)` + +- **interface**: `api.tx.swap.modifyPosition` +- **summary**: Modify a liquidity position. + + **Parameters:** + + - origin: The origin of the transaction + - netuid: Subnet ID + - position_id: ID of the position to remove + - liquidity_delta: Liquidity to add (if positive) or remove (if negative) + + Emits `Event::LiquidityRemoved` on success + +### `removeLiquidity(hotkey: AccountId, netuid: NetUid, position_id: PositionId)` + +- **interface**: `api.tx.swap.removeLiquidity` +- **summary**: Remove liquidity from a specific position. + + **Parameters:** + + - origin: The origin of the transaction + - netuid: Subnet ID + - position_id: ID of the position to remove + + Emits `Event::LiquidityRemoved` on success + +### `setFeeRate(netuid: NetUid, rate: u16)` + +- **interface**: `api.tx.swap.setFeeRate` +- **summary**: Set the fee rate for swaps on a specific subnet (normalized value). For example, 0.3% is approximately 196. + + Only callable by the admin origin + +### `toggleUserLiquidity(netuid: NetUid, enable: bool)` + +- **interface**: `api.tx.swap.toggleUserLiquidity` +- **summary**: Enable user liquidity operations for a specific subnet. This switches the subnet from V2 to V3 swap mode. Thereafter, adding new user liquidity can be disabled by toggling this flag to false, but the swap mode will remain V3 because of existing user liquidity until all users withdraw their liquidity. + + Only sudo or subnet owner can enable user liquidity. Only sudo can disable user liquidity. + + +## `system` + +### `applyAuthorizedUpgrade(code: Vec)` + +- **interface**: `api.tx.system.applyAuthorizedUpgrade` +- **summary**: Provide the preimage (runtime binary) `code` for an upgrade that has been authorized. + + If the authorization required a version check, this call will ensure the spec name remains unchanged and that the spec version has increased. + + Depending on the runtime's `OnSetCode` configuration, this function may directly apply the new `code` in the same block or attempt to schedule the upgrade. + + All origins are allowed. + +### `authorizeUpgrade(code_hash: H256)` + +- **interface**: `api.tx.system.authorizeUpgrade` +- **summary**: Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied later. + + This call requires Root origin. + +### `authorizeUpgradeWithoutChecks(code_hash: H256)` + +- **interface**: `api.tx.system.authorizeUpgradeWithoutChecks` +- **summary**: Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied later. + + WARNING: This authorizes an upgrade that will take place without any safety checks, for example that the spec name remains the same and that the version number increases. Not recommended for normal use. Use `authorize_upgrade` instead. + + This call requires Root origin. + +### `killPrefix(prefix: Key, subkeys: u32)` + +- **interface**: `api.tx.system.killPrefix` +- **summary**: Kill all storage items with a key that starts with the given prefix. + + **NOTE:** We rely on the Root origin to provide us the number of subkeys under + the prefix we are removing to accurately calculate the weight of this function. + +### `killStorage(keys: Vec)` + +- **interface**: `api.tx.system.killStorage` +- **summary**: Kill some items from storage. + +### `remark(remark: Vec)` + +- **interface**: `api.tx.system.remark` +- **summary**: Make some on-chain remark. + + Can be executed by every `origin`. + +### `remarkWithEvent(remark: Vec)` + +- **interface**: `api.tx.system.remarkWithEvent` +- **summary**: Make some on-chain remark and emit event. + +### `setCode(code: Vec)` + +- **interface**: `api.tx.system.setCode` +- **summary**: Set the new runtime code. + +### `setCodeWithoutChecks(code: Vec)` + +- **interface**: `api.tx.system.setCodeWithoutChecks` +- **summary**: Set the new runtime code without doing any checks of the given `code`. + + Note that runtime upgrades will not run if this is called with a not-increasing spec version! + +### `setHeapPages(pages: u64)` + +- **interface**: `api.tx.system.setHeapPages` +- **summary**: Set the number of pages in the WebAssembly environment's heap. + +### `setStorage(items: Vec)` + +- **interface**: `api.tx.system.setStorage` +- **summary**: Set some items of storage. + + +## `timestamp` + +### `set(now: u64)` + +- **interface**: `api.tx.timestamp.set` +- **summary**: Set the current time. + + This call should be invoked exactly once per block. It will panic at the finalization phase, if this call hasn't been invoked by that time. + + The timestamp should be greater than the previous one by the amount specified by [`Config::MinimumPeriod`]. + + The dispatch origin for this call must be _None_. + + This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware that changing the complexity of this call could result exhausting the resources in a block to execute any other calls. + + **Complexity:** + + - ``O(1)`` (Note that implementations of `OnTimestampSet` must also be ``O(1)``) + - 1 storage read and 1 storage mutation (codec ``O(1)`` because of `DidUpdate::take` in + `on_finalize`) + - 1 event handler `on_timestamp_set`. Must be ``O(1)``. + + +## `utility` + +### `asDerivative(index: u16, call: Box)` + +- **interface**: `api.tx.utility.asDerivative` +- **summary**: Send a call through an indexed pseudonym of the sender. + + Filter from origin are passed along. The call will be dispatched with an origin which use the same filter as the origin of this call. + + NOTE: If you need to ensure that any account-based filtering is not honored (i.e. because you expect `proxy` to have been used prior in the call stack and you do not want the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` in the Multisig pallet instead. + + NOTE: Prior to version *12, this was called `as_limited_sub`. + + The dispatch origin for this call must be _Signed_. + +### `batch(calls: Vec)` + +- **interface**: `api.tx.utility.batch` +- **summary**: Send a batch of dispatch calls. + + May be called from any origin except `None`. + + - `calls`: The calls to be dispatched from the same origin. The number of call must not + exceed the constant: `batched_calls_limit` (available in constant metadata). + + If origin is root then the calls are dispatched without checking origin filter. (This includes bypassing `frame_system::Config::BaseCallFilter`). + + **Complexity:** + + - `O(C)` where C is the number of calls to be batched. + + This will return `Ok` in all circumstances. To determine the success of the batch, an event is deposited. If a call failed and the batch was interrupted, then the `BatchInterrupted` event is deposited, along with the number of successful calls made and the error of the failed call. If all were successful, then the `BatchCompleted` event is deposited. + +### `batchAll(calls: Vec)` + +- **interface**: `api.tx.utility.batchAll` +- **summary**: Send a batch of dispatch calls and atomically execute them. The whole transaction will rollback and fail if any of the calls failed. + + May be called from any origin except `None`. + + - `calls`: The calls to be dispatched from the same origin. The number of call must not + exceed the constant: `batched_calls_limit` (available in constant metadata). + + If origin is root then the calls are dispatched without checking origin filter. (This includes bypassing `frame_system::Config::BaseCallFilter`). + + **Complexity:** + + - `O(C)` where C is the number of calls to be batched. + +### `dispatchAs(as_origin: Box, call: Box)` + +- **interface**: `api.tx.utility.dispatchAs` +- **summary**: Dispatches a function call with a provided origin. + + The dispatch origin for this call must be _Root_. + + **Complexity:** + + - `O(1)`. + +### `dispatchAsFallible(as_origin: Box, call: Box)` + +- **interface**: `api.tx.utility.dispatchAsFallible` +- **summary**: Dispatches a function call with a provided origin. + + Almost the same as [`Pallet::dispatch_as`] but forwards any error of the inner call. + + The dispatch origin for this call must be _Root_. + +### `forceBatch(calls: Vec)` + +- **interface**: `api.tx.utility.forceBatch` +- **summary**: Send a batch of dispatch calls. Unlike `batch`, it allows errors and won't interrupt. + + May be called from any origin except `None`. + + - `calls`: The calls to be dispatched from the same origin. The number of call must not + exceed the constant: `batched_calls_limit` (available in constant metadata). + + If origin is root then the calls are dispatch without checking origin filter. (This includes bypassing `frame_system::Config::BaseCallFilter`). + + **Complexity:** + + - `O(C)` where C is the number of calls to be batched. + +### `ifElse(main: Box, fallback: Box)` + +- **interface**: `api.tx.utility.ifElse` +- **summary**: Dispatch a fallback call in the event the main call fails to execute. May be called from any origin except `None`. + + This function first attempts to dispatch the `main` call. If the `main` call fails, the `fallback` is attemted. if the fallback is successfully dispatched, the weights of both calls are accumulated and an event containing the main call error is deposited. + + In the event of a fallback failure the whole call fails with the weights returned. + + - `main`: The main call to be dispatched. This is the primary action to execute. + - `fallback`: The fallback call to be dispatched in case the `main` call fails. + + **Dispatch Logic:** + + - If the origin is `root`, both the main and fallback calls are executed without + applying any origin filters. + - If the origin is not `root`, the origin filter is applied to both the `main` and + `fallback` calls. + + **Use Case:** + + - Some use cases might involve submitting a `batch` type call in either main, fallback + or both. + +### `withWeight(call: Box, weight: Weight)` + +- **interface**: `api.tx.utility.withWeight` +- **summary**: Dispatch a function call with a specified weight. + + This function does not check the weight of the call, and instead allows the Root origin to specify the weight of the call. + + The dispatch origin for this call must be _Root_. diff --git a/docs/subtensor-api/storage.md b/docs/subtensor-api/storage.md new file mode 100644 index 000000000..5080ef3ea --- /dev/null +++ b/docs/subtensor-api/storage.md @@ -0,0 +1,1975 @@ +# Storage + +Storage query definitions for the Bittensor (Subtensor) runtime. Accessible via `api.query..`. + +:::info +Generated from a live snapshot of the Subtensor runtime on **2026-04-02**. Connected to: `wss://entrypoint-finney.opentensor.ai:443` +::: + + +- **[adminUtils](#adminutils)** +- **[aura](#aura)** +- **[balances](#balances)** +- **[baseFee](#basefee)** +- **[commitments](#commitments)** +- **[contracts](#contracts)** +- **[crowdloan](#crowdloan)** +- **[drand](#drand)** +- **[ethereum](#ethereum)** +- **[evm](#evm)** +- **[evmChainId](#evmchainid)** +- **[grandpa](#grandpa)** +- **[mevShield](#mevshield)** +- **[multisig](#multisig)** +- **[preimage](#preimage)** +- **[proxy](#proxy)** +- **[randomnessCollectiveFlip](#randomnesscollectiveflip)** +- **[registry](#registry)** +- **[safeMode](#safemode)** +- **[scheduler](#scheduler)** +- **[substrate](#substrate)** +- **[subtensorModule](#subtensormodule)** +- **[sudo](#sudo)** +- **[swap](#swap)** +- **[system](#system)** +- **[timestamp](#timestamp)** +- **[transactionPayment](#transactionpayment)** + +## `adminUtils` + +### `palletVersion`: `u16` + +- **interface**: `api.query.adminUtils.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `precompileEnable(PrecompileEnum)`: `bool` + +- **interface**: `api.query.adminUtils.precompileEnable` +- **summary**: Map PrecompileEnum --> enabled + + +## `aura` + +### `authorities`: `Vec` + +- **interface**: `api.query.aura.authorities` +- **summary**: The current authority set. + +### `currentSlot`: `Slot` + +- **interface**: `api.query.aura.currentSlot` +- **summary**: The current slot of this block. + + This will be set in `on_initialize`. + +### `palletVersion`: `u16` + +- **interface**: `api.query.aura.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + + +## `balances` + +### `account(AccountId32)`: `AccountData` + +- **interface**: `api.query.balances.account` +- **summary**: The Balances pallet example of storing the balance of an account. + + **Example:** + + ```nocompile impl pallet_balances::Config for Runtime { type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData> } ``` + + You can also store the balance of an account in the `System` pallet. + + **Example:** + + ```nocompile impl pallet_balances::Config for Runtime { type AccountStore = System } ``` + + But this comes with tradeoffs, storing account balances in the system pallet stores `frame_system` data alongside the account data contrary to storing account balances in the `Balances` pallet, which uses a `StorageMap` to store balances data only. NOTE: This is only used in the case that this pallet is used to store balances. + +### `freezes(AccountId32)`: `Vec` + +- **interface**: `api.query.balances.freezes` +- **summary**: Freeze locks on account balances. + +### `holds(AccountId32)`: `Vec` + +- **interface**: `api.query.balances.holds` +- **summary**: Holds on account balances. + +### `inactiveIssuance`: `u64` + +- **interface**: `api.query.balances.inactiveIssuance` +- **summary**: The total units of outstanding deactivated balance in the system. + +### `locks(AccountId32)`: `Vec` + +- **interface**: `api.query.balances.locks` +- **summary**: Any liquidity locks on some account balances. NOTE: Should only be accessed when setting, changing and freeing a lock. + + Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/` + +### `palletVersion`: `u16` + +- **interface**: `api.query.balances.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `reserves(AccountId32)`: `Vec` + +- **interface**: `api.query.balances.reserves` +- **summary**: Named reserves on some account balances. + + Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/` + +### `totalIssuance`: `u64` + +- **interface**: `api.query.balances.totalIssuance` +- **summary**: The total units issued in the system. + + +## `baseFee` + +### `baseFeePerGas`: `U256` + +- **interface**: `api.query.baseFee.baseFeePerGas` + +### `elasticity`: `Permill` + +- **interface**: `api.query.baseFee.elasticity` + +### `palletVersion`: `u16` + +- **interface**: `api.query.baseFee.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + + +## `commitments` + +### `commitmentOf(u16, AccountId32)`: `Registration` + +- **interface**: `api.query.commitments.commitmentOf` +- **modifier**: `Optional` +- **summary**: Identity data by account + +### `lastBondsReset(u16, AccountId32)`: `u32` + +- **interface**: `api.query.commitments.lastBondsReset` +- **modifier**: `Optional` + +### `lastCommitment(u16, AccountId32)`: `u32` + +- **interface**: `api.query.commitments.lastCommitment` +- **modifier**: `Optional` + +### `maxSpace`: `u32` + +- **interface**: `api.query.commitments.maxSpace` + +### `palletVersion`: `u16` + +- **interface**: `api.query.commitments.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `revealedCommitments(u16, AccountId32)`: `Vec<(Bytes,u64)>` + +- **interface**: `api.query.commitments.revealedCommitments` +- **modifier**: `Optional` + +### `timelockedIndex`: `BTreeSet` + +- **interface**: `api.query.commitments.timelockedIndex` +- **summary**: Tracks all CommitmentOf that have at least one timelocked field. + +### `usedSpaceOf(u16, AccountId32)`: `UsageTracker` + +- **interface**: `api.query.commitments.usedSpaceOf` +- **modifier**: `Optional` +- **summary**: Maps (netuid, who) -> usage (how many “bytes” they've committed) in the RateLimit window + + +## `contracts` + +### `codeInfoOf(H256)`: `CodeInfo` + +- **interface**: `api.query.contracts.codeInfoOf` +- **modifier**: `Optional` +- **summary**: A mapping from a contract's code hash to its code info. + +### `contractInfoOf(AccountId32)`: `ContractInfo` + +- **interface**: `api.query.contracts.contractInfoOf` +- **modifier**: `Optional` +- **summary**: The code associated with a given account. + + TWOX-NOTE: SAFE since `AccountId` is a secure hash. + +### `deletionQueue(u32)`: `Bytes` + +- **interface**: `api.query.contracts.deletionQueue` +- **modifier**: `Optional` +- **summary**: Evicted contracts that await child trie deletion. + + Child trie deletion is a heavy operation depending on the amount of storage items stored in said trie. Therefore this operation is performed lazily in `on_idle`. + +### `deletionQueueCounter`: `DeletionQueueManager` + +- **interface**: `api.query.contracts.deletionQueueCounter` +- **summary**: A pair of monotonic counters used to track the latest contract marked for deletion and the latest deleted contract in queue. + +### `migrationInProgress`: `Bytes` + +- **interface**: `api.query.contracts.migrationInProgress` +- **modifier**: `Optional` +- **summary**: A migration can span across multiple blocks. This storage defines a cursor to track the progress of the migration, enabling us to resume from the last completed position. + +### `nonce`: `u64` + +- **interface**: `api.query.contracts.nonce` +- **summary**: This is a **monotonic** counter incremented on contract instantiation. + + This is used in order to generate unique trie ids for contracts. The trie id of a new contract is calculated from hash(account_id, nonce). The nonce is required because otherwise the following sequence would lead to a possible collision of storage: + + 1. Create a new contract. + 2. Terminate the contract. + 3. Immediately recreate the contract with the same account_id. + + This is bad because the contents of a trie are deleted lazily and there might be storage of the old instantiation still in it when the new contract is created. Please note that we can't replace the counter by the block number because the sequence above can happen in the same block. We also can't keep the account counter in memory only because storage is the only way to communicate across different extrinsics in the same block. + + **Note:** + + Do not use it to determine the number of contracts. It won't be decremented if a contract is destroyed. + +### `palletVersion`: `u16` + +- **interface**: `api.query.contracts.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `pristineCode(H256)`: `Bytes` + +- **interface**: `api.query.contracts.pristineCode` +- **modifier**: `Optional` +- **summary**: A mapping from a contract's code hash to its code. + + +## `crowdloan` + +### `contributions(u32, AccountId32)`: `u64` + +- **interface**: `api.query.crowdloan.contributions` +- **modifier**: `Optional` +- **summary**: A map of crowdloan ids to their contributors and their contributions. + +### `crowdloans(u32)`: `CrowdloanInfo` + +- **interface**: `api.query.crowdloan.crowdloans` +- **modifier**: `Optional` +- **summary**: A map of crowdloan ids to their information. + +### `currentCrowdloanId`: `u32` + +- **interface**: `api.query.crowdloan.currentCrowdloanId` +- **modifier**: `Optional` +- **summary**: The current crowdloan id that will be set during the finalize call, making it temporarily accessible to the dispatched call. + +### `hasMigrationRun(Bytes)`: `bool` + +- **interface**: `api.query.crowdloan.hasMigrationRun` +- **summary**: Storage for the migration run status. + +### `nextCrowdloanId`: `u32` + +- **interface**: `api.query.crowdloan.nextCrowdloanId` +- **summary**: The next incrementing crowdloan id. + +### `palletVersion`: `u16` + +- **interface**: `api.query.crowdloan.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + + +## `drand` + +### `beaconConfig`: `BeaconConfiguration` + +- **interface**: `api.query.drand.beaconConfig` +- **summary**: the drand beacon configuration + +### `hasMigrationRun(Bytes)`: `bool` + +- **interface**: `api.query.drand.hasMigrationRun` +- **summary**: Storage for migration run status + +### `lastStoredRound`: `u64` + +- **interface**: `api.query.drand.lastStoredRound` + +### `nextUnsignedAt`: `u32` + +- **interface**: `api.query.drand.nextUnsignedAt` +- **summary**: Defines the block when next unsigned transaction will be accepted. + + To prevent spam of unsigned (and unpaid!) transactions on the network, we only allow one transaction per block. This storage entry defines when new transaction is going to be accepted. + +### `oldestStoredRound`: `u64` + +- **interface**: `api.query.drand.oldestStoredRound` +- **summary**: oldest stored round + +### `palletVersion`: `u16` + +- **interface**: `api.query.drand.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `pulses(u64)`: `Pulse` + +- **interface**: `api.query.drand.pulses` +- **modifier**: `Optional` +- **summary**: map round number to pulse + + +## `ethereum` + +### `blockHash(U256)`: `H256` + +- **interface**: `api.query.ethereum.blockHash` + +### `counterForPending`: `u32` + +- **interface**: `api.query.ethereum.counterForPending` +- **summary**: Counter for the related counted storage map + +### `currentBlock`: `Block` + +- **interface**: `api.query.ethereum.currentBlock` +- **modifier**: `Optional` +- **summary**: The current Ethereum block. + +### `currentReceipts`: `Vec` + +- **interface**: `api.query.ethereum.currentReceipts` +- **modifier**: `Optional` +- **summary**: The current Ethereum receipts. + +### `currentTransactionStatuses`: `Vec` + +- **interface**: `api.query.ethereum.currentTransactionStatuses` +- **modifier**: `Optional` +- **summary**: The current transaction statuses. + +### `palletVersion`: `u16` + +- **interface**: `api.query.ethereum.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `pending(u32)`: `(EthereumTransactionTransactionV3,FpRpcTransactionStatus,EthereumReceiptReceiptV4)` + +- **interface**: `api.query.ethereum.pending` +- **modifier**: `Optional` +- **summary**: Mapping from transaction index to transaction in the current building block. + + +## `evm` + +### `accountCodes(H160)`: `Bytes` + +- **interface**: `api.query.evm.accountCodes` + +### `accountCodesMetadata(H160)`: `CodeMetadata` + +- **interface**: `api.query.evm.accountCodesMetadata` +- **modifier**: `Optional` + +### `accountStorages(H160, H256)`: `H256` + +- **interface**: `api.query.evm.accountStorages` + +### `disableWhitelistCheck`: `bool` + +- **interface**: `api.query.evm.disableWhitelistCheck` + +### `palletVersion`: `u16` + +- **interface**: `api.query.evm.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `whitelistedCreators`: `Vec` + +- **interface**: `api.query.evm.whitelistedCreators` + + +## `evmChainId` + +### `chainId`: `u64` + +- **interface**: `api.query.evmChainId.chainId` +- **summary**: The EVM chain ID. + +### `palletVersion`: `u16` + +- **interface**: `api.query.evmChainId.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + + +## `grandpa` + +### `authorities`: `Vec<(SpConsensusGrandpaAppPublic,u64)>` + +- **interface**: `api.query.grandpa.authorities` +- **summary**: The current list of authorities. + +### `currentSetId`: `u64` + +- **interface**: `api.query.grandpa.currentSetId` +- **summary**: The number of changes (both in terms of keys and underlying economic responsibilities) in the "set" of Grandpa validators from genesis. + +### `nextForced`: `u32` + +- **interface**: `api.query.grandpa.nextForced` +- **modifier**: `Optional` +- **summary**: next block number where we can force a change. + +### `palletVersion`: `u16` + +- **interface**: `api.query.grandpa.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `pendingChange`: `StoredPendingChange` + +- **interface**: `api.query.grandpa.pendingChange` +- **modifier**: `Optional` +- **summary**: Pending change: (signaled at, scheduled change). + +### `setIdSession(u64)`: `u32` + +- **interface**: `api.query.grandpa.setIdSession` +- **modifier**: `Optional` +- **summary**: A mapping from grandpa set ID to the index of the *most recent* session for which its members were responsible. + + This is only used for validating equivocation proofs. An equivocation proof must contains a key-ownership proof for a given session, therefore we need a way to tie together sessions and GRANDPA set ids, i.e. we need to validate that a validator was the owner of a given key on a given session, and what the active set ID was during that session. + + TWOX-NOTE: `SetId` is not under user control. + +### `stalled`: `(u32,u32)` + +- **interface**: `api.query.grandpa.stalled` +- **modifier**: `Optional` +- **summary**: `true` if we are currently stalled. + +### `state`: `StoredState` + +- **interface**: `api.query.grandpa.state` +- **summary**: State of the current authority set. + + +## `mevShield` + +### `authorKeys(Public)`: `Bytes` + +- **interface**: `api.query.mevShield.authorKeys` +- **modifier**: `Optional` +- **summary**: Per-author ML-KEM-768 encapsulation key, updated each time the author produces a block. + +### `currentKey`: `Bytes` + +- **interface**: `api.query.mevShield.currentKey` +- **modifier**: `Optional` +- **summary**: Current block author's ML-KEM-768 encapsulation key (internal, not for encryption). + +### `hasMigrationRun(Bytes)`: `bool` + +- **interface**: `api.query.mevShield.hasMigrationRun` +- **summary**: Stores whether some migration has been run. + +### `nextKey`: `Bytes` + +- **interface**: `api.query.mevShield.nextKey` +- **modifier**: `Optional` +- **summary**: Key users should encrypt with (N+2 author's key). + +### `nextKeyExpiresAt`: `u32` + +- **interface**: `api.query.mevShield.nextKeyExpiresAt` +- **modifier**: `Optional` +- **summary**: Block number at which `NextKey` is no longer valid (exclusive upper bound). Updated every block during rotation. + +### `palletVersion`: `u16` + +- **interface**: `api.query.mevShield.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `pendingKey`: `Bytes` + +- **interface**: `api.query.mevShield.pendingKey` +- **modifier**: `Optional` +- **summary**: Next block author's key, staged here before promoting to `CurrentKey`. + +### `pendingKeyExpiresAt`: `u32` + +- **interface**: `api.query.mevShield.pendingKeyExpiresAt` +- **modifier**: `Optional` +- **summary**: Block number at which `PendingKey` is no longer valid (exclusive upper bound). Updated every block during rotation. + + +## `multisig` + +### `multisigs(AccountId32, [u8;32])`: `Multisig` + +- **interface**: `api.query.multisig.multisigs` +- **modifier**: `Optional` +- **summary**: The set of open multisig operations. + +### `palletVersion`: `u16` + +- **interface**: `api.query.multisig.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + + +## `preimage` + +### `palletVersion`: `u16` + +- **interface**: `api.query.preimage.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `preimageFor(H256, u32)`: `Bytes` + +- **interface**: `api.query.preimage.preimageFor` +- **modifier**: `Optional` + +### `requestStatusFor(H256)`: `RequestStatus` + +- **interface**: `api.query.preimage.requestStatusFor` +- **modifier**: `Optional` +- **summary**: The request status of a given hash. + +### `statusFor(H256)`: `OldRequestStatus` + +- **interface**: `api.query.preimage.statusFor` +- **modifier**: `Optional` +- **summary**: The request status of a given hash. + + +## `proxy` + +### `announcements(AccountId32)`: `(Vec,u64)` + +- **interface**: `api.query.proxy.announcements` +- **summary**: The announcements made by the proxy (key). + +### `lastCallResult(AccountId32)`: `Result` + +- **interface**: `api.query.proxy.lastCallResult` +- **modifier**: `Optional` +- **summary**: The result of the last call made by the proxy (key). + +### `palletVersion`: `u16` + +- **interface**: `api.query.proxy.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `proxies(AccountId32)`: `(Vec,u64)` + +- **interface**: `api.query.proxy.proxies` +- **summary**: The set of account proxies. Maps the account which has delegated to the accounts which are being delegated to, together with the amount held on deposit. + +### `realPaysFee(AccountId32, AccountId32)`: `Null` + +- **interface**: `api.query.proxy.realPaysFee` +- **modifier**: `Optional` +- **summary**: Tracks which (real, delegate) pairs have opted in to the real account paying transaction fees for proxy calls made by the delegate. Existence of an entry means the real account pays; absence means the delegate pays (default). + + +## `randomnessCollectiveFlip` + +### `palletVersion`: `u16` + +- **interface**: `api.query.randomnessCollectiveFlip.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `randomMaterial`: `Vec` + +- **interface**: `api.query.randomnessCollectiveFlip.randomMaterial` +- **summary**: Series of block headers from the last 81 blocks that acts as random seed material. This is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of the oldest hash. + + +## `registry` + +### `identityOf(AccountId32)`: `Registration` + +- **interface**: `api.query.registry.identityOf` +- **modifier**: `Optional` +- **summary**: Identity data by account + +### `palletVersion`: `u16` + +- **interface**: `api.query.registry.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + + +## `safeMode` + +### `deposits(AccountId32, u32)`: `u64` + +- **interface**: `api.query.safeMode.deposits` +- **modifier**: `Optional` +- **summary**: Holds the reserve that was taken from an account at a specific block number. + + This helps governance to have an overview of outstanding deposits that should be returned or slashed. + +### `enteredUntil`: `u32` + +- **interface**: `api.query.safeMode.enteredUntil` +- **modifier**: `Optional` +- **summary**: Contains the last block number that the safe-mode will remain entered in. + + Set to `None` when safe-mode is exited. + + Safe-mode is automatically exited when the current block number exceeds this value. + +### `palletVersion`: `u16` + +- **interface**: `api.query.safeMode.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + + +## `scheduler` + +### `agenda(u32)`: `Vec>` + +- **interface**: `api.query.scheduler.agenda` +- **summary**: Items to be executed, indexed by the block number that they should be executed on. + +### `incompleteSince`: `u32` + +- **interface**: `api.query.scheduler.incompleteSince` +- **modifier**: `Optional` +- **summary**: Block number at which the agenda began incomplete execution. + +### `lookup([u8;32])`: `(u32,u32)` + +- **interface**: `api.query.scheduler.lookup` +- **modifier**: `Optional` +- **summary**: Lookup from a name to the block number and index of the task. + + For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4 identities. + +### `palletVersion`: `u16` + +- **interface**: `api.query.scheduler.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `retries(u32, u32)`: `RetryConfig` + +- **interface**: `api.query.scheduler.retries` +- **modifier**: `Optional` +- **summary**: Retry configurations for items to be executed, indexed by task address. + + +## `substrate` + +### `changesTrieConfig`: `u32` + +- **interface**: `api.query.substrate.changesTrieConfig` +- **modifier**: `Required` +- **summary**: Changes trie configuration is stored under this key. + +### `childStorageKeyPrefix`: `u32` + +- **interface**: `api.query.substrate.childStorageKeyPrefix` +- **modifier**: `Required` +- **summary**: Prefix of child storage keys. + +### `code`: `Bytes` + +- **interface**: `api.query.substrate.code` +- **modifier**: `Required` +- **summary**: Wasm code of the runtime. + +### `extrinsicIndex`: `u32` + +- **interface**: `api.query.substrate.extrinsicIndex` +- **modifier**: `Required` +- **summary**: Current extrinsic index (u32) is stored under this key. + +### `heapPages`: `u64` + +- **interface**: `api.query.substrate.heapPages` +- **modifier**: `Required` +- **summary**: Number of wasm linear memory pages required for execution of the runtime. + +### `intrablockEntropy`: `[u8;32]` + +- **interface**: `api.query.substrate.intrablockEntropy` +- **modifier**: `Required` +- **summary**: Current intra-block entropy (a universally unique `[u8; 32]` value) is stored here. + + +## `subtensorModule` + +### `accumulatedLeaseDividends(u32)`: `u64` + +- **interface**: `api.query.subtensorModule.accumulatedLeaseDividends` +- **summary**: MAP ( lease_id ) --> accumulated_dividends | The accumulated dividends for a given lease that needs to be distributed. + +### `active(u16)`: `Vec` + +- **interface**: `api.query.subtensorModule.active` +- **summary**: MAP ( netuid ) --> active + +### `activityCutoff(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.activityCutoff` +- **summary**: MAP ( netuid ) --> activity_cutoff + +### `adjustmentAlpha(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.adjustmentAlpha` +- **summary**: MAP ( netuid ) --> adjustment_alpha + +### `adjustmentInterval(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.adjustmentInterval` +- **summary**: MAP ( netuid ) --> adjustment_interval + +### `adminFreezeWindow`: `u16` + +- **interface**: `api.query.subtensorModule.adminFreezeWindow` +- **summary**: Global window (in blocks) at the end of each tempo where admin ops are disallowed + +### `alpha(AccountId32, AccountId32, u16)`: `FixedU128` + +- **interface**: `api.query.subtensorModule.alpha` +- **summary**: NMAP ( hot, cold, netuid ) --> alpha | Returns the alpha shares for a hotkey, coldkey, netuid triplet. + +### `alphaDividendsPerSubnet(u16, AccountId32)`: `u64` + +- **interface**: `api.query.subtensorModule.alphaDividendsPerSubnet` +- **summary**: DMAP ( netuid, hotkey ) --> u64 | Last alpha dividend this hotkey got on tempo. + +### `alphaMapLastKey`: `Option` + +- **interface**: `api.query.subtensorModule.alphaMapLastKey` +- **summary**: Contains last Alpha storage map key to iterate (check first) + +### `alphaSigmoidSteepness(u16)`: `i16` + +- **interface**: `api.query.subtensorModule.alphaSigmoidSteepness` +- **summary**: MAP ( netuid ) --> AlphaSigmoidSteepness + +### `alphaValues(u16)`: `(u16,u16)` + +- **interface**: `api.query.subtensorModule.alphaValues` +- **summary**: MAP ( netuid ) --> (alpha_low, alpha_high) + +### `associatedEvmAddress(u16, u16)`: `(H160,u64)` + +- **interface**: `api.query.subtensorModule.associatedEvmAddress` +- **modifier**: `Optional` +- **summary**: ============================= ==== EVM related storage ==== ============================= --- DMAP (netuid, uid) --> (H160, last_block_where_ownership_was_proven) + +### `autoStakeDestination(AccountId32, u16)`: `AccountId32` + +- **interface**: `api.query.subtensorModule.autoStakeDestination` +- **modifier**: `Optional` +- **summary**: DMAP ( cold, netuid )--> hot | Returns the hotkey a coldkey will autostake to with mining rewards. + +### `autoStakeDestinationColdkeys(AccountId32, u16)`: `Vec` + +- **interface**: `api.query.subtensorModule.autoStakeDestinationColdkeys` +- **summary**: DMAP ( hot, netuid )--> Vec\ | Returns a list of coldkeys that are autostaking to a hotkey + +### `axons(u16, AccountId32)`: `AxonInfo` + +- **interface**: `api.query.subtensorModule.axons` +- **modifier**: `Optional` +- **summary**: MAP ( netuid, hotkey ) --> axon_info + +### `blockAtRegistration(u16, u16)`: `u64` + +- **interface**: `api.query.subtensorModule.blockAtRegistration` +- **summary**: DMAP ( netuid, uid ) --> block_at_registration + +### `blockEmission`: `u64` + +- **interface**: `api.query.subtensorModule.blockEmission` +- **summary**: ================== ==== Coinbase ==== ================== --- ITEM ( global_block_emission ) + +### `blocksSinceLastStep(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.blocksSinceLastStep` +- **summary**: MAP ( netuid ) --> blocks_since_last_step + +### `bonds(u16, u16)`: `Vec<(u16,u16)>` + +- **interface**: `api.query.subtensorModule.bonds` +- **summary**: DMAP ( netuid, uid ) --> bonds + +### `bondsMovingAverage(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.bondsMovingAverage` +- **summary**: MAP ( netuid ) --> bonds_moving_average + +### `bondsPenalty(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.bondsPenalty` +- **summary**: MAP ( netuid ) --> bonds_penalty + +### `bondsResetOn(u16)`: `bool` + +- **interface**: `api.query.subtensorModule.bondsResetOn` +- **summary**: MAP ( netuid ) --> bonds_reset + +### `burn(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.burn` +- **summary**: MAP ( netuid ) --> Burn + +### `burnRegistrationsThisInterval(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.burnRegistrationsThisInterval` +- **summary**: MAP ( netuid ) --> burn_registrations_this_interval + +### `childKeys(AccountId32, u16)`: `Vec<(u64,AccountId32)>` + +- **interface**: `api.query.subtensorModule.childKeys` +- **summary**: DMAP ( parent, netuid ) --> Vec\<(proportion,child)> + +### `childkeyTake(AccountId32, u16)`: `u16` + +- **interface**: `api.query.subtensorModule.childkeyTake` +- **summary**: DMAP ( hot, netuid ) --> take | Returns the hotkey childkey take for a specific subnet + +### `ckBurn`: `u64` + +- **interface**: `api.query.subtensorModule.ckBurn` +- **summary**: ITEM --> CK burn + +### `coldkeySwapAnnouncementDelay`: `u32` + +- **interface**: `api.query.subtensorModule.coldkeySwapAnnouncementDelay` +- **summary**: The delay after an announcement before a coldkey swap can be performed. + +### `coldkeySwapAnnouncements(AccountId32)`: `(u32,H256)` + +- **interface**: `api.query.subtensorModule.coldkeySwapAnnouncements` +- **modifier**: `Optional` +- **summary**: A map of the coldkey swap announcements from a coldkey to the block number the coldkey swap can be performed. + +### `coldkeySwapDisputes(AccountId32)`: `u32` + +- **interface**: `api.query.subtensorModule.coldkeySwapDisputes` +- **modifier**: `Optional` +- **summary**: A map of the coldkey swap disputes from a coldkey to the block number the coldkey swap was disputed. + +### `coldkeySwapReannouncementDelay`: `u32` + +- **interface**: `api.query.subtensorModule.coldkeySwapReannouncementDelay` +- **summary**: The delay after the initial delay has passed before a new announcement can be made. + +### `commitRevealWeightsEnabled(u16)`: `bool` + +- **interface**: `api.query.subtensorModule.commitRevealWeightsEnabled` +- **summary**: MAP ( netuid ) --> commit reveal v2 weights are enabled + +### `commitRevealWeightsVersion`: `u16` + +- **interface**: `api.query.subtensorModule.commitRevealWeightsVersion` +- **summary**: ITEM ( CommitRevealWeightsVersion ) + +### `consensus(u16)`: `Vec` + +- **interface**: `api.query.subtensorModule.consensus` +- **summary**: MAP ( netuid ) --> consensus + +### `crv3WeightCommits(u16, u64)`: `Vec<(AccountId32,Bytes,u64)>` + +- **interface**: `api.query.subtensorModule.crv3WeightCommits` +- **summary**: MAP (netuid, epoch) → VecDeque\<(who, ciphertext, reveal_round)> DEPRECATED for CRV3WeightCommitsV2 + +### `crv3WeightCommitsV2(u16, u64)`: `Vec<(AccountId32,u64,Bytes,u64)>` + +- **interface**: `api.query.subtensorModule.crv3WeightCommitsV2` +- **summary**: MAP (netuid, epoch) → VecDeque\<(who, commit_block, ciphertext, reveal_round)> DEPRECATED for TimelockedWeightCommits + +### `delegates(AccountId32)`: `u16` + +- **interface**: `api.query.subtensorModule.delegates` +- **summary**: MAP ( hot ) --> take | Returns the hotkey delegation take. And signals that this key is open for delegation + +### `difficulty(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.difficulty` +- **summary**: MAP ( netuid ) --> Difficulty + +### `dissolveNetworkScheduleDuration`: `u32` + +- **interface**: `api.query.subtensorModule.dissolveNetworkScheduleDuration` +- **summary**: Duration of dissolve network schedule before execution + +### `dividends(u16)`: `Vec` + +- **interface**: `api.query.subtensorModule.dividends` +- **summary**: MAP ( netuid ) --> dividends + +### `emaPriceHalvingBlocks(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.emaPriceHalvingBlocks` +- **summary**: MAP ( netuid ) --> Halving time of average moving price. + +### `emission(u16)`: `Vec` + +- **interface**: `api.query.subtensorModule.emission` +- **summary**: MAP ( netuid ) --> emission + +### `firstEmissionBlockNumber(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.firstEmissionBlockNumber` +- **modifier**: `Optional` +- **summary**: ============================ ==== Subnet Parameters ===== ============================ --- MAP ( netuid ) --> block number of first emission + +### `flowEmaSmoothingFactor`: `u64` + +- **interface**: `api.query.subtensorModule.flowEmaSmoothingFactor` +- **summary**: ITEM --> Flow EMA smoothing factor (flow alpha), u64 normalized + +### `flowNormExponent`: `FixedU128` + +- **interface**: `api.query.subtensorModule.flowNormExponent` +- **summary**: ITEM --> Flow Normalization Exponent (p) + +### `hasMigrationRun(Bytes)`: `bool` + +- **interface**: `api.query.subtensorModule.hasMigrationRun` +- **summary**: ================== ==== Genesis ===== ================== --- Storage for migration run status + +### `identitiesV2(AccountId32)`: `ChainIdentityV2` + +- **interface**: `api.query.subtensorModule.identitiesV2` +- **modifier**: `Optional` +- **summary**: MAP ( coldkey ) --> identity + +### `immuneOwnerUidsLimit(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.immuneOwnerUidsLimit` +- **summary**: MAP ( netuid ) --> Burn key limit + +### `immunityPeriod(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.immunityPeriod` +- **summary**: MAP ( netuid ) --> immunity_period + +### `incentive(u16)`: `Vec` + +- **interface**: `api.query.subtensorModule.incentive` +- **summary**: MAP ( netuid ) --> incentive + +### `isNetworkMember(AccountId32, u16)`: `bool` + +- **interface**: `api.query.subtensorModule.isNetworkMember` +- **summary**: DMAP ( hotkey, netuid ) --> bool + +### `kappa(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.kappa` +- **summary**: MAP ( netuid ) --> Kappa + +### `keys(u16, u16)`: `AccountId32` + +- **interface**: `api.query.subtensorModule.keys` +- **summary**: DMAP ( netuid, uid ) --> hotkey + +### `largestLocked(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.largestLocked` +- **summary**: MAP ( netuid ) --> largest_locked + +### `lastAdjustmentBlock(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.lastAdjustmentBlock` +- **summary**: MAP ( netuid ) --> Block at last adjustment. + +### `lastColdkeyHotkeyStakeBlock(AccountId32, AccountId32)`: `u64` + +- **interface**: `api.query.subtensorModule.lastColdkeyHotkeyStakeBlock` +- **modifier**: `Optional` +- **summary**: Map (coldkey, hotkey) --> u64 the last block at which stake was added/removed. + +### `lastHotkeyEmissionOnNetuid(AccountId32, u16)`: `u64` + +- **interface**: `api.query.subtensorModule.lastHotkeyEmissionOnNetuid` +- **summary**: DMap ( hot, netuid ) --> emission | last hotkey emission on network. + +### `lastHotkeySwapOnNetuid(u16, AccountId32)`: `u64` + +- **interface**: `api.query.subtensorModule.lastHotkeySwapOnNetuid` +- **summary**: DMap ( netuid, coldkey ) --> blocknumber | last hotkey swap on network. + +### `lastMechansimStepBlock(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.lastMechansimStepBlock` +- **summary**: MAP ( netuid ) --> last_mechanism_step_block + +### `lastRateLimitedBlock(RateLimitKey)`: `u64` + +- **interface**: `api.query.subtensorModule.lastRateLimitedBlock` +- **summary**: ============================ ==== Rate Limiting ===== ============================ --- MAP ( RateLimitKey ) --> Block number in which the last rate limited operation occured + +### `lastTxBlock(AccountId32)`: `u64` + +- **interface**: `api.query.subtensorModule.lastTxBlock` +- **summary**: MAP ( key ) --> last_block + +### `lastTxBlockChildKeyTake(AccountId32)`: `u64` + +- **interface**: `api.query.subtensorModule.lastTxBlockChildKeyTake` +- **summary**: MAP ( key ) --> last_tx_block_childkey_take + +### `lastTxBlockDelegateTake(AccountId32)`: `u64` + +- **interface**: `api.query.subtensorModule.lastTxBlockDelegateTake` +- **summary**: MAP ( key ) --> last_tx_block_delegate_take + +### `lastUpdate(u16)`: `Vec` + +- **interface**: `api.query.subtensorModule.lastUpdate` +- **summary**: MAP ( netuid ) --> last_update + +### `liquidAlphaOn(u16)`: `bool` + +- **interface**: `api.query.subtensorModule.liquidAlphaOn` +- **summary**: MAP ( netuid ) --> Whether or not Liquid Alpha is enabled + +### `loadedEmission(u16)`: `Vec<(AccountId32,u64,u64)>` + +- **interface**: `api.query.subtensorModule.loadedEmission` +- **modifier**: `Optional` +- **summary**: MAP ( netuid ) --> (hotkey, se, ve) + +### `maxAllowedUids(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.maxAllowedUids` +- **summary**: MAP ( netuid ) --> max_allowed_uids + +### `maxAllowedValidators(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.maxAllowedValidators` +- **summary**: MAP ( netuid ) --> max_allowed_validators + +### `maxBurn(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.maxBurn` +- **summary**: MAP ( netuid ) --> MaxBurn + +### `maxChildkeyTake`: `u16` + +- **interface**: `api.query.subtensorModule.maxChildkeyTake` +- **summary**: ITEM ( default_childkey_take ) + +### `maxDelegateTake`: `u16` + +- **interface**: `api.query.subtensorModule.maxDelegateTake` +- **summary**: ITEM ( default_delegate_take ) + +### `maxDifficulty(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.maxDifficulty` +- **summary**: MAP ( netuid ) --> MaxDifficulty + +### `maxMechanismCount`: `u8` + +- **interface**: `api.query.subtensorModule.maxMechanismCount` +- **summary**: ITEM( max_mechanism_count ) + +### `maxRegistrationsPerBlock(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.maxRegistrationsPerBlock` +- **summary**: ITEM( global_max_registrations_per_block ) + +### `maxWeightsLimit(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.maxWeightsLimit` +- **summary**: MAP ( netuid ) --> max_weight_limit + +### `mechanismCountCurrent(u16)`: `u8` + +- **interface**: `api.query.subtensorModule.mechanismCountCurrent` +- **summary**: MAP ( netuid ) --> Current number of subnet mechanisms + +### `mechanismEmissionSplit(u16)`: `Vec` + +- **interface**: `api.query.subtensorModule.mechanismEmissionSplit` +- **modifier**: `Optional` +- **summary**: MAP ( netuid ) --> Normalized vector of emission split proportion between subnet mechanisms + +### `minActivityCutoff`: `u16` + +- **interface**: `api.query.subtensorModule.minActivityCutoff` + +### `minAllowedUids(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.minAllowedUids` +- **summary**: MAP ( netuid ) --> min_allowed_uids + +### `minAllowedWeights(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.minAllowedWeights` +- **summary**: MAP ( netuid ) --> min_allowed_weights + +### `minBurn(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.minBurn` +- **summary**: MAP ( netuid ) --> MinBurn + +### `minChildkeyTake`: `u16` + +- **interface**: `api.query.subtensorModule.minChildkeyTake` +- **summary**: ITEM ( min_childkey_take ) + +### `minDelegateTake`: `u16` + +- **interface**: `api.query.subtensorModule.minDelegateTake` +- **summary**: ITEM ( min_delegate_take ) + +### `minDifficulty(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.minDifficulty` +- **summary**: MAP ( netuid ) --> MinDifficulty + +### `minNonImmuneUids(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.minNonImmuneUids` +- **summary**: MAP ( netuid ) --> minimum required number of non-immortal & non-immune UIDs + +### `networkImmunityPeriod`: `u64` + +- **interface**: `api.query.subtensorModule.networkImmunityPeriod` +- **summary**: ITEM( network_immunity_period ) + +### `networkLastLockCost`: `u64` + +- **interface**: `api.query.subtensorModule.networkLastLockCost` +- **summary**: ITEM( last_network_lock_cost ) + +### `networkLockReductionInterval`: `u64` + +- **interface**: `api.query.subtensorModule.networkLockReductionInterval` +- **summary**: ITEM( network_lock_reduction_interval ) + +### `networkMinLockCost`: `u64` + +- **interface**: `api.query.subtensorModule.networkMinLockCost` +- **summary**: ITEM( min_network_lock_cost ) + +### `networkPowRegistrationAllowed(u16)`: `bool` + +- **interface**: `api.query.subtensorModule.networkPowRegistrationAllowed` +- **summary**: MAP ( netuid ) --> network_pow_allowed + +### `networkRateLimit`: `u64` + +- **interface**: `api.query.subtensorModule.networkRateLimit` +- **summary**: ITEM( network_rate_limit ) + +### `networkRegisteredAt(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.networkRegisteredAt` +- **summary**: MAP ( netuid ) --> block_created + +### `networkRegistrationAllowed(u16)`: `bool` + +- **interface**: `api.query.subtensorModule.networkRegistrationAllowed` +- **summary**: MAP ( netuid ) --> network_registration_allowed + +### `networkRegistrationStartBlock`: `u64` + +- **interface**: `api.query.subtensorModule.networkRegistrationStartBlock` +- **summary**: ITEM( NetworkRegistrationStartBlock ) + +### `networksAdded(u16)`: `bool` + +- **interface**: `api.query.subtensorModule.networksAdded` +- **summary**: MAP ( netuid ) --> network_is_added + +### `neuronCertificates(u16, AccountId32)`: `NeuronCertificate` + +- **interface**: `api.query.subtensorModule.neuronCertificates` +- **modifier**: `Optional` +- **summary**: MAP ( netuid, hotkey ) --> certificate + +### `nextStakeJobId`: `u64` + +- **interface**: `api.query.subtensorModule.nextStakeJobId` +- **summary**: Ensures unique IDs for StakeJobs storage map + +### `nextSubnetLeaseId`: `u32` + +- **interface**: `api.query.subtensorModule.nextSubnetLeaseId` +- **summary**: ITEM ( next_lease_id ) | The next lease id. + +### `nominatorMinRequiredStake`: `u64` + +- **interface**: `api.query.subtensorModule.nominatorMinRequiredStake` +- **summary**: ITEM( nominator_min_required_stake ) --- Factor of DefaultMinStake in per-mill format. + +### `numRootClaim`: `u64` + +- **interface**: `api.query.subtensorModule.numRootClaim` + +### `numStakingColdkeys`: `u64` + +- **interface**: `api.query.subtensorModule.numStakingColdkeys` + +### `ownedHotkeys(AccountId32)`: `Vec` + +- **interface**: `api.query.subtensorModule.ownedHotkeys` +- **summary**: MAP ( cold ) --> Vec\ | Returns the vector of hotkeys controlled by this coldkey. + +### `owner(AccountId32)`: `AccountId32` + +- **interface**: `api.query.subtensorModule.owner` +- **summary**: MAP ( hot ) --> cold | Returns the controlling coldkey for a hotkey + +### `ownerHyperparamRateLimit`: `u16` + +- **interface**: `api.query.subtensorModule.ownerHyperparamRateLimit` +- **summary**: Global number of epochs used to rate limit subnet owner hyperparameter updates + +### `palletVersion`: `u16` + +- **interface**: `api.query.subtensorModule.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `parentKeys(AccountId32, u16)`: `Vec<(u64,AccountId32)>` + +- **interface**: `api.query.subtensorModule.parentKeys` +- **summary**: DMAP ( child, netuid ) --> Vec\<(proportion,parent)> + +### `pendingChildKeyCooldown`: `u64` + +- **interface**: `api.query.subtensorModule.pendingChildKeyCooldown` +- **summary**: Storage value for pending childkey cooldown, settable by root. + +### `pendingChildKeys(u16, AccountId32)`: `(Vec<(u64,AccountId32)>,u64)` + +- **interface**: `api.query.subtensorModule.pendingChildKeys` +- **summary**: DMAP ( netuid, parent ) --> (Vec\<(proportion,child)>, cool_down_block) + +### `pendingOwnerCut(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.pendingOwnerCut` +- **summary**: MAP ( netuid ) --> pending_owner_cut + +### `pendingRootAlphaDivs(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.pendingRootAlphaDivs` +- **summary**: MAP ( netuid ) --> pending_root_alpha_emission + +### `pendingServerEmission(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.pendingServerEmission` +- **summary**: MAP ( netuid ) --> pending_server_emission + +### `pendingValidatorEmission(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.pendingValidatorEmission` +- **summary**: MAP ( netuid ) --> pending_validator_emission + +### `powRegistrationsThisInterval(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.powRegistrationsThisInterval` +- **summary**: MAP ( netuid ) --> pow_registrations_this_interval + +### `prometheus(u16, AccountId32)`: `PrometheusInfo` + +- **interface**: `api.query.subtensorModule.prometheus` +- **modifier**: `Optional` +- **summary**: MAP ( netuid, hotkey ) --> prometheus_info + +### `pruningScores(u16)`: `Vec` + +- **interface**: `api.query.subtensorModule.pruningScores` +- **summary**: MAP ( netuid ) --> pruning_scores + +### `rank(u16)`: `Vec` + +- **interface**: `api.query.subtensorModule.rank` +- **summary**: MAP ( netuid ) --> rank + +### `raoRecycledForRegistration(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.raoRecycledForRegistration` +- **summary**: MAP ( netuid ) --> global_RAO_recycled_for_registration + +### `recycleOrBurn(u16)`: `RecycleOrBurnEnum` + +- **interface**: `api.query.subtensorModule.recycleOrBurn` +- **summary**: MAP ( netuid ) --> recycle_or_burn + +### `registrationsThisBlock(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.registrationsThisBlock` +- **summary**: MAP ( netuid ) --> Registrations of this Block. + +### `registrationsThisInterval(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.registrationsThisInterval` +- **summary**: MAP ( netuid ) --> registrations_this_interval + +### `revealPeriodEpochs(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.revealPeriodEpochs` +- **summary**: Map (netuid) --> Number of epochs allowed for commit reveal periods + +### `rho(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.rho` +- **summary**: MAP ( netuid ) --> Rho + +### `rootAlphaDividendsPerSubnet(u16, AccountId32)`: `u64` + +- **interface**: `api.query.subtensorModule.rootAlphaDividendsPerSubnet` +- **summary**: DMAP ( netuid, hotkey ) --> u64 | Last root alpha dividend this hotkey got on tempo. + +### `rootClaimable(AccountId32)`: `BTreeMap` + +- **interface**: `api.query.subtensorModule.rootClaimable` + +### `rootClaimableThreshold(u16)`: `FixedI128` + +- **interface**: `api.query.subtensorModule.rootClaimableThreshold` + +### `rootClaimed(u16, AccountId32, AccountId32)`: `u128` + +- **interface**: `api.query.subtensorModule.rootClaimed` + +### `rootClaimType(AccountId32)`: `RootClaimTypeEnum` + +- **interface**: `api.query.subtensorModule.rootClaimType` + +### `rootProp(u16)`: `FixedU128` + +- **interface**: `api.query.subtensorModule.rootProp` +- **summary**: MAP ( netuid ) --> root_prop | The subnet root proportion. + +### `scalingLawPower(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.scalingLawPower` +- **summary**: MAP ( netuid ) --> scaling_law_power + +### `servingRateLimit(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.servingRateLimit` +- **summary**: MAP ( netuid ) --> serving_rate_limit + +### `stakeThreshold`: `u64` + +- **interface**: `api.query.subtensorModule.stakeThreshold` +- **summary**: ITEM( weights_min_stake ) + +### `stakeWeight(u16)`: `Vec` + +- **interface**: `api.query.subtensorModule.stakeWeight` +- **summary**: ======================================= ==== Subnetwork Consensus Storage ==== ======================================= --- DMAP ( netuid ) --> stake_weight | weight for stake used in YC. + +### `stakingColdkeys(AccountId32)`: `u64` + +- **interface**: `api.query.subtensorModule.stakingColdkeys` +- **modifier**: `Optional` + +### `stakingColdkeysByIndex(u64)`: `AccountId32` + +- **interface**: `api.query.subtensorModule.stakingColdkeysByIndex` +- **modifier**: `Optional` + +### `stakingHotkeys(AccountId32)`: `Vec` + +- **interface**: `api.query.subtensorModule.stakingHotkeys` +- **summary**: MAP ( cold ) --> Vec\ | Maps coldkey to hotkeys that stake to it + +### `stakingOperationRateLimiter(AccountId32, AccountId32, u16)`: `bool` + +- **interface**: `api.query.subtensorModule.stakingOperationRateLimiter` +- **summary**: DMAP ( hot, cold, netuid ) --> rate limits for staking operations Value contains just a marker: we use this map as a set. + +### `startCallDelay`: `u64` + +- **interface**: `api.query.subtensorModule.startCallDelay` +- **summary**: ITEM( start_call_delay ) + +### `subnetAlphaIn(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.subnetAlphaIn` +- **summary**: MAP ( netuid ) --> alpha_supply_in_pool | Returns the amount of alpha in the pool. + +### `subnetAlphaInEmission(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.subnetAlphaInEmission` +- **summary**: MAP ( netuid ) --> alpha_in_emission | Returns the amount of alph in emission into the pool per block. + +### `subnetAlphaInProvided(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.subnetAlphaInProvided` +- **summary**: MAP ( netuid ) --> alpha_supply_user_in_pool | Returns the amount of alpha in the pool provided by users as liquidity. + +### `subnetAlphaOut(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.subnetAlphaOut` +- **summary**: MAP ( netuid ) --> alpha_supply_in_subnet | Returns the amount of alpha in the subnet. + +### `subnetAlphaOutEmission(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.subnetAlphaOutEmission` +- **summary**: MAP ( netuid ) --> alpha_out_emission | Returns the amount of alpha out emission into the network per block. + +### `subnetEmaTaoFlow(u16)`: `(u64,SubstrateFixedFixedI128)` + +- **interface**: `api.query.subtensorModule.subnetEmaTaoFlow` +- **modifier**: `Optional` +- **summary**: MAP ( netuid ) --> subnet_ema_tao_flow | Returns the EMA of TAO inflow-outflow balance. + +### `subnetIdentitiesV3(u16)`: `SubnetIdentityV3` + +- **interface**: `api.query.subtensorModule.subnetIdentitiesV3` +- **modifier**: `Optional` +- **summary**: MAP ( netuid ) --> SubnetIdentityOfV3 + +### `subnetLeases(u32)`: `SubnetLease` + +- **interface**: `api.query.subtensorModule.subnetLeases` +- **modifier**: `Optional` +- **summary**: ======================== ==== Subnet Leasing ==== ======================== --- MAP ( lease_id ) --> subnet lease | The subnet lease for a given lease id. + +### `subnetLeaseShares(u32, AccountId32)`: `FixedU128` + +- **interface**: `api.query.subtensorModule.subnetLeaseShares` +- **summary**: DMAP ( lease_id, contributor ) --> shares | The shares of a contributor for a given lease. + +### `subnetLimit`: `u16` + +- **interface**: `api.query.subtensorModule.subnetLimit` +- **summary**: ========================== ==== Staking Counters ==== ========================== The Subtensor [`TotalIssuance`] represents the total issuance of tokens on the Bittensor network. + + It is comprised of three parts: The total amount of issued tokens, tracked in the TotalIssuance of the Balances pallet The total amount of tokens staked in the system, tracked in [`TotalStake`] The total amount of tokens locked up for subnet reg, tracked in [`TotalSubnetLocked`] attained by iterating over subnet lock. + + Eventually, Bittensor should migrate to using Holds afterwhich time we will not require this separate accounting. --- ITEM ( maximum_number_of_networks ) + +### `subnetLocked(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.subnetLocked` +- **summary**: MAP ( netuid ) --> total_subnet_locked + +### `subnetMechanism(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.subnetMechanism` +- **summary**: MAP ( netuid ) --> subnet mechanism + +### `subnetMovingAlpha`: `FixedI128` + +- **interface**: `api.query.subtensorModule.subnetMovingAlpha` +- **summary**: ITEM ( moving_alpha ) -- subnet moving alpha. + +### `subnetMovingPrice(u16)`: `FixedI128` + +- **interface**: `api.query.subtensorModule.subnetMovingPrice` +- **summary**: MAP ( netuid ) --> moving_price | The subnet moving price. + +### `subnetOwner(u16)`: `AccountId32` + +- **interface**: `api.query.subtensorModule.subnetOwner` +- **summary**: MAP ( netuid ) --> subnet_owner + +### `subnetOwnerCut`: `u16` + +- **interface**: `api.query.subtensorModule.subnetOwnerCut` +- **summary**: ITEM( subnet_owner_cut ) + +### `subnetOwnerHotkey(u16)`: `AccountId32` + +- **interface**: `api.query.subtensorModule.subnetOwnerHotkey` +- **summary**: MAP ( netuid ) --> subnet_owner_hotkey + +### `subnetTAO(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.subnetTAO` +- **summary**: MAP ( netuid ) --> tao_in_subnet | Returns the amount of TAO in the subnet. + +### `subnetTaoFlow(u16)`: `i64` + +- **interface**: `api.query.subtensorModule.subnetTaoFlow` +- **summary**: MAP ( netuid ) --> subnet_tao_flow | Returns the TAO inflow-outflow balance. + +### `subnetTaoInEmission(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.subnetTaoInEmission` +- **summary**: MAP ( netuid ) --> tao_in_emission | Returns the amount of tao emitted into this subent on the last block. + +### `subnetTaoProvided(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.subnetTaoProvided` +- **summary**: MAP ( netuid ) --> tao_in_user_subnet | Returns the amount of TAO in the subnet reserve provided by users as liquidity. + +### `subnetUidToLeaseId(u16)`: `u32` + +- **interface**: `api.query.subtensorModule.subnetUidToLeaseId` +- **modifier**: `Optional` +- **summary**: MAP ( netuid ) --> lease_id | The lease id for a given netuid. + +### `subnetVolume(u16)`: `u128` + +- **interface**: `api.query.subtensorModule.subnetVolume` +- **summary**: MAP ( netuid ) --> total_volume | The total amount of TAO bought and sold since the start of the network. + +### `subnetworkN(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.subnetworkN` +- **summary**: MAP ( netuid ) --> subnetwork_n (Number of UIDs in the network). + +### `subtokenEnabled(u16)`: `bool` + +- **interface**: `api.query.subtensorModule.subtokenEnabled` +- **summary**: MAP ( netuid ) --> If subtoken trading enabled + +### `taoFlowCutoff`: `FixedI128` + +- **interface**: `api.query.subtensorModule.taoFlowCutoff` +- **summary**: ITEM --> TAO Flow Cutoff + +### `taoWeight`: `u64` + +- **interface**: `api.query.subtensorModule.taoWeight` +- **summary**: ============================ ==== Staking Variables ==== ============================ The Subtensor [`TotalIssuance`] represents the total issuance of tokens on the Bittensor network. + + It is comprised of three parts: The total amount of issued tokens, tracked in the TotalIssuance of the Balances pallet The total amount of tokens staked in the system, tracked in [`TotalStake`] The total amount of tokens locked up for subnet reg, tracked in [`TotalSubnetLocked`] attained by iterating over subnet lock. + + Eventually, Bittensor should migrate to using Holds afterwhich time we will not require this separate accounting. --- ITEM --> Global weight + +### `targetRegistrationsPerInterval(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.targetRegistrationsPerInterval` +- **summary**: MAP ( netuid ) --> target_registrations_this_interval + +### `tempo(u16)`: `u16` + +- **interface**: `api.query.subtensorModule.tempo` +- **summary**: ================= ==== Tempos ===== ================= --- MAP ( netuid ) --> tempo + +### `timelockedWeightCommits(u16, u64)`: `Vec<(AccountId32,u64,Bytes,u64)>` + +- **interface**: `api.query.subtensorModule.timelockedWeightCommits` +- **summary**: MAP (netuid, epoch) → VecDeque\<(who, commit_block, ciphertext, reveal_round)> Stores a queue of weight commits for an account on a given subnet. + +### `tokenSymbol(u16)`: `Bytes` + +- **interface**: `api.query.subtensorModule.tokenSymbol` +- **summary**: MAP ( netuid ) --> token_symbol | Returns the token symbol for a subnet. + +### `totalHotkeyAlpha(AccountId32, u16)`: `u64` + +- **interface**: `api.query.subtensorModule.totalHotkeyAlpha` +- **summary**: DMAP ( hot, netuid ) --> alpha | Returns the total amount of alpha a hotkey owns. + +### `totalHotkeyAlphaLastEpoch(AccountId32, u16)`: `u64` + +- **interface**: `api.query.subtensorModule.totalHotkeyAlphaLastEpoch` +- **summary**: DMAP ( hot, netuid ) --> alpha | Returns the total amount of alpha a hotkey owned in the last epoch. + +### `totalHotkeyShares(AccountId32, u16)`: `FixedU128` + +- **interface**: `api.query.subtensorModule.totalHotkeyShares` +- **summary**: DMAP ( hot, netuid ) --> total_alpha_shares | Returns the number of alpha shares for a hotkey on a subnet. + +### `totalIssuance`: `u64` + +- **interface**: `api.query.subtensorModule.totalIssuance` +- **summary**: ITEM ( total_issuance ) + +### `totalNetworks`: `u16` + +- **interface**: `api.query.subtensorModule.totalNetworks` +- **summary**: ITEM( total_number_of_existing_networks ) + +### `totalStake`: `u64` + +- **interface**: `api.query.subtensorModule.totalStake` +- **summary**: ITEM ( total_stake ) + +### `transactionKeyLastBlock(AccountId32, u16, u16)`: `u64` + +- **interface**: `api.query.subtensorModule.transactionKeyLastBlock` +- **summary**: ================================= ==== Axon / Promo Endpoints ===== ================================= --- NMAP ( hot, netuid, name ) --> last_block | Returns the last block of a transaction for a given key, netuid, and name. + +### `transferToggle(u16)`: `bool` + +- **interface**: `api.query.subtensorModule.transferToggle` +- **summary**: ============================ ==== Subnet Locks ===== ============================ --- MAP ( netuid ) --> transfer_toggle + +### `trust(u16)`: `Vec` + +- **interface**: `api.query.subtensorModule.trust` +- **summary**: MAP ( netuid ) --> trust + +### `txChildkeyTakeRateLimit`: `u64` + +- **interface**: `api.query.subtensorModule.txChildkeyTakeRateLimit` +- **summary**: ITEM ( tx_childkey_take_rate_limit ) + +### `txDelegateTakeRateLimit`: `u64` + +- **interface**: `api.query.subtensorModule.txDelegateTakeRateLimit` +- **summary**: ITEM ( tx_delegate_take_rate_limit ) + +### `txRateLimit`: `u64` + +- **interface**: `api.query.subtensorModule.txRateLimit` +- **summary**: ITEM ( tx_rate_limit ) + +### `uids(u16, AccountId32)`: `u16` + +- **interface**: `api.query.subtensorModule.uids` +- **modifier**: `Optional` +- **summary**: DMAP ( netuid, hotkey ) --> uid + +### `usedWork(Bytes)`: `u64` + +- **interface**: `api.query.subtensorModule.usedWork` +- **summary**: ============================ ==== Global Parameters ===== ============================ --- StorageItem Global Used Work. + +### `validatorPermit(u16)`: `Vec` + +- **interface**: `api.query.subtensorModule.validatorPermit` +- **summary**: MAP ( netuid ) --> validator_permit + +### `validatorPruneLen(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.validatorPruneLen` +- **summary**: MAP ( netuid ) --> validator_prune_len + +### `validatorTrust(u16)`: `Vec` + +- **interface**: `api.query.subtensorModule.validatorTrust` +- **summary**: MAP ( netuid ) --> validator_trust + +### `votingPower(u16, AccountId32)`: `u64` + +- **interface**: `api.query.subtensorModule.votingPower` +- **summary**: DMAP ( netuid, hotkey ) --> voting_power | EMA of stake for voting This tracks stake EMA updated every epoch when VotingPowerTrackingEnabled is true. Used by smart contracts to determine validator voting power for subnet governance. + +### `votingPowerDisableAtBlock(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.votingPowerDisableAtBlock` +- **summary**: MAP ( netuid ) --> block_number | Block at which voting power tracking will be disabled. When set (non-zero), tracking continues until this block, then automatically disables and clears VotingPower entries for the subnet. Provides a 14-day grace period. + +### `votingPowerEmaAlpha(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.votingPowerEmaAlpha` +- **summary**: MAP ( netuid ) --> u64 | EMA alpha value for voting power calculation. Higher alpha = faster response to stake changes. Stored as u64 with 18 decimal precision (1.0 = 10^18). Only settable by sudo/root. + +### `votingPowerTrackingEnabled(u16)`: `bool` + +- **interface**: `api.query.subtensorModule.votingPowerTrackingEnabled` +- **summary**: MAP ( netuid ) --> bool | Whether voting power tracking is enabled for this subnet. When enabled, VotingPower EMA is updated every epoch. Default is false. When disabled with disable_at_block set, tracking continues until that block. + +### `weightCommits(u16, AccountId32)`: `Vec<(H256,u64,u64,u64)>` + +- **interface**: `api.query.subtensorModule.weightCommits` +- **modifier**: `Optional` +- **summary**: MAP (netuid, who) --> VecDeque\<(hash, commit_block, first_reveal_block, last_reveal_block)> | Stores a queue of commits for an account on a given netuid. + +### `weights(u16, u16)`: `Vec<(u16,u16)>` + +- **interface**: `api.query.subtensorModule.weights` +- **summary**: DMAP ( netuid, uid ) --> weights + +### `weightsSetRateLimit(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.weightsSetRateLimit` +- **summary**: MAP ( netuid ) --> weights_set_rate_limit + +### `weightsVersionKey(u16)`: `u64` + +- **interface**: `api.query.subtensorModule.weightsVersionKey` +- **summary**: MAP ( netuid ) --> weights_version_key + +### `weightsVersionKeyRateLimit`: `u64` + +- **interface**: `api.query.subtensorModule.weightsVersionKeyRateLimit` +- **summary**: ITEM( weights_version_key_rate_limit ) --- Rate limit in tempos. + +### `yuma3On(u16)`: `bool` + +- **interface**: `api.query.subtensorModule.yuma3On` +- **summary**: MAP ( netuid ) --> Whether or not Yuma3 is enabled + + +## `sudo` + +### `key`: `AccountId32` + +- **interface**: `api.query.sudo.key` +- **modifier**: `Optional` +- **summary**: The `AccountId` of the sudo key. + +### `palletVersion`: `u16` + +- **interface**: `api.query.sudo.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + + +## `swap` + +### `alphaSqrtPrice(u16)`: `FixedU128` + +- **interface**: `api.query.swap.alphaSqrtPrice` +- **summary**: Storage for the square root price of Alpha token for each subnet. + +### `currentLiquidity(u16)`: `u64` + +- **interface**: `api.query.swap.currentLiquidity` +- **summary**: Storage for the current liquidity amount for each subnet. + +### `currentTick(u16)`: `TickIndex` + +- **interface**: `api.query.swap.currentTick` +- **summary**: Storage for the current price tick. + +### `enabledUserLiquidity(u16)`: `bool` + +- **interface**: `api.query.swap.enabledUserLiquidity` +- **summary**: Indicates whether a subnet has been switched to V3 swap from V2. If `true`, the subnet is permanently on V3 swap mode allowing add/remove liquidity operations. Once set to `true` for a subnet, it cannot be changed back to `false`. + +### `feeGlobalAlpha(u16)`: `FixedU128` + +- **interface**: `api.query.swap.feeGlobalAlpha` + +### `feeGlobalTao(u16)`: `FixedU128` + +- **interface**: `api.query.swap.feeGlobalTao` + +### `feeRate(u16)`: `u16` + +- **interface**: `api.query.swap.feeRate` +- **summary**: The fee rate applied to swaps per subnet, normalized value between 0 and u16::MAX + +### `lastPositionId`: `u128` + +- **interface**: `api.query.swap.lastPositionId` +- **summary**: Position ID counter. + +### `palletVersion`: `u16` + +- **interface**: `api.query.swap.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `positions(u16, AccountId32, u128)`: `Position` + +- **interface**: `api.query.swap.positions` +- **modifier**: `Optional` +- **summary**: Storage for user positions, using subnet ID and account ID as keys The value is a bounded vector of Position structs with details about the liquidity positions + +### `scrapReservoirAlpha(u16)`: `u64` + +- **interface**: `api.query.swap.scrapReservoirAlpha` +- **summary**: Alpha reservoir for scraps of protocol claimed fees. + +### `scrapReservoirTao(u16)`: `u64` + +- **interface**: `api.query.swap.scrapReservoirTao` +- **summary**: TAO reservoir for scraps of protocol claimed fees. + +### `swapV3Initialized(u16)`: `bool` + +- **interface**: `api.query.swap.swapV3Initialized` +- **summary**: Storage to determine whether swap V3 was initialized for a specific subnet. + +### `tickIndexBitmapWords(u16, PalletSubtensorSwapTickLayerLevel, u32)`: `u128` + +- **interface**: `api.query.swap.tickIndexBitmapWords` +- **summary**: Tick index bitmap words storage + +### `ticks(u16, i32)`: `Tick` + +- **interface**: `api.query.swap.ticks` +- **modifier**: `Optional` +- **summary**: Storage for all ticks, using subnet ID as the primary key and tick index as the secondary key + + +## `system` + +### `account(AccountId32)`: `AccountInfo` + +- **interface**: `api.query.system.account` +- **summary**: The full account information for a particular account ID. + +### `allExtrinsicsLen`: `u32` + +- **interface**: `api.query.system.allExtrinsicsLen` +- **modifier**: `Optional` +- **summary**: Total length (in bytes) for all extrinsics put together, for the current block. + +### `authorizedUpgrade`: `CodeUpgradeAuthorization` + +- **interface**: `api.query.system.authorizedUpgrade` +- **modifier**: `Optional` +- **summary**: `Some` if a code upgrade has been authorized. + +### `blockHash(u32)`: `H256` + +- **interface**: `api.query.system.blockHash` +- **summary**: Map of block numbers to block hashes. + +### `blockWeight`: `PerDispatchClass` + +- **interface**: `api.query.system.blockWeight` +- **summary**: The current weight for the block. + +### `digest`: `Digest` + +- **interface**: `api.query.system.digest` +- **summary**: Digest of the current block, also part of the block header. + +### `eventCount`: `u32` + +- **interface**: `api.query.system.eventCount` +- **summary**: The number of events in the `Events` list. + +### `events`: `Vec` + +- **interface**: `api.query.system.events` +- **summary**: Events deposited for the current block. + + NOTE: The item is unbound and should therefore never be read on chain. It could otherwise inflate the PoV size of a block. + + Events have a large in-memory size. Box the events to not go out-of-memory just in case someone still reads them from within the runtime. + +### `eventTopics(H256)`: `Vec<(u32,u32)>` + +- **interface**: `api.query.system.eventTopics` +- **summary**: Mapping between a topic (represented by T::Hash) and a vector of indexes of events in the `>` list. + + All topic vectors have deterministic storage locations depending on the topic. This allows light-clients to leverage the changes trie storage tracking mechanism and in case of changes fetch the list of events of interest. + + The value has the type `(BlockNumberFor, EventIndex)` because if we used only just the `EventIndex` then in case if the topic has the same contents on the next block no notification will be triggered thus the event might be lost. + +### `executionPhase`: `Phase` + +- **interface**: `api.query.system.executionPhase` +- **modifier**: `Optional` +- **summary**: The execution phase of the block. + +### `extrinsicCount`: `u32` + +- **interface**: `api.query.system.extrinsicCount` +- **modifier**: `Optional` +- **summary**: Total extrinsics count for the current block. + +### `extrinsicData(u32)`: `Bytes` + +- **interface**: `api.query.system.extrinsicData` +- **summary**: Extrinsics data for the current block (maps an extrinsic's index to its data). + +### `extrinsicWeightReclaimed`: `Weight` + +- **interface**: `api.query.system.extrinsicWeightReclaimed` +- **summary**: The weight reclaimed for the extrinsic. + + This information is available until the end of the extrinsic execution. More precisely this information is removed in `note_applied_extrinsic`. + + Logic doing some post dispatch weight reduction must update this storage to avoid duplicate reduction. + +### `inherentsApplied`: `bool` + +- **interface**: `api.query.system.inherentsApplied` +- **summary**: Whether all inherents have been applied. + +### `lastRuntimeUpgrade`: `LastRuntimeUpgradeInfo` + +- **interface**: `api.query.system.lastRuntimeUpgrade` +- **modifier**: `Optional` +- **summary**: Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened. + +### `number`: `u32` + +- **interface**: `api.query.system.number` +- **summary**: The current block number being processed. Set by `execute_block`. + +### `palletVersion`: `u16` + +- **interface**: `api.query.system.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `parentHash`: `H256` + +- **interface**: `api.query.system.parentHash` +- **summary**: Hash of the previous block. + +### `upgradedToTripleRefCount`: `bool` + +- **interface**: `api.query.system.upgradedToTripleRefCount` +- **summary**: True if we have upgraded so that AccountInfo contains three types of `RefCount`. False (default) if not. + +### `upgradedToU32RefCount`: `bool` + +- **interface**: `api.query.system.upgradedToU32RefCount` +- **summary**: True if we have upgraded so that `type RefCount` is `u32`. False (default) if not. + + +## `timestamp` + +### `didUpdate`: `bool` + +- **interface**: `api.query.timestamp.didUpdate` +- **summary**: Whether the timestamp has been updated in this block. + + This value is updated to `true` upon successful submission of a timestamp by a node. It is then checked at the end of each block execution in the `on_finalize` hook. + +### `now`: `u64` + +- **interface**: `api.query.timestamp.now` +- **summary**: The current time for the current block. + +### `palletVersion`: `u16` + +- **interface**: `api.query.timestamp.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + + +## `transactionPayment` + +### `nextFeeMultiplier`: `FixedU128` + +- **interface**: `api.query.transactionPayment.nextFeeMultiplier` + +### `palletVersion`: `u16` + +- **interface**: `api.query.transactionPayment.palletVersion` +- **modifier**: `Required` +- **summary**: Returns the current pallet version from storage + +### `storageVersion`: `Releases` + +- **interface**: `api.query.transactionPayment.storageVersion` diff --git a/docs/subtensor-nodes/subtensor-storage-query-examples.md b/docs/subtensor-nodes/subtensor-storage-query-examples.md index 124fb4b2c..44db8ef87 100644 --- a/docs/subtensor-nodes/subtensor-storage-query-examples.md +++ b/docs/subtensor-nodes/subtensor-storage-query-examples.md @@ -6,9 +6,12 @@ import { SdkVersion } from "../sdk/_sdk-version.mdx"; # Subtensor Storage Query Examples +:::info +The following outline of subtensor storage query examples is provided for high-level reference and is not exhaustive. For a complete specification of all available queries, see the [Subtensor API reference](../subtensor-api/storage.md). +::: + ## 1. AccumulatedLeaseDividends - - **Description**: Storage for a lease ID's accumulated dividends. - **Query Type**: `u16 -> unknown` diff --git a/sidebars.js b/sidebars.js index 4efd72aea..acc89271b 100644 --- a/sidebars.js +++ b/sidebars.js @@ -71,6 +71,7 @@ const sidebars = { "navigating-subtensor/swap-stake", ], }, + "navigating-subtensor/subtensor-extrinsics", "resources/community-links", ], }, @@ -338,6 +339,13 @@ const sidebars = { "resources/community-links", "resources/media-assets", ], + apiSidebar: [ + "subtensor-api/extrinsics", + "subtensor-api/errors", + "subtensor-api/storage", + "subtensor-api/events", + "subtensor-api/constants", + ], }; module.exports = sidebars;