Extrinsics
The following sections contain Extrinsic methods that are part of the Bittensor (Subtensor) runtime. On the API, these are exposed via api.tx.<Pallet>.<call_name>.
Generated from a live snapshot of the Subtensor runtime on 2026-04-24. Connected to: wss://entrypoint-finney.opentensor.ai:443
- adminUtils
- balances
- baseFee
- commitments
- contracts
- crowdloan
- drand
- ethereum
- evm
- grandpa
- mevShield
- multisig
- preimage
- proxy
- registry
- safeMode
- scheduler
- subtensorModule
- sudo
- swap
- system
- timestamp
- utility
adminUtils
scheduleGrandpaChange(next_authorities: AuthorityList, in_blocks: u32, forced: Option<BlockNumberFor<T>>)
-
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_blocksafter the current block. This value may be 0, in which case the change is applied at the end of the current block.If the
forcedparameter is defined, this indicates that the current set has been synchronously determined to be offline and that afterin_blocksthe 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.
sudoSetBurnHalfLife(netuid: NetUid, burn_half_life: u16)
- interface:
api.tx.adminUtils.sudoSetBurnHalfLife - summary: Set BurnHalfLife for a subnet. It is only callable by root and subnet owner.
sudoSetBurnIncreaseMult(netuid: NetUid, burn_increase_mult: U64F64)
- interface:
api.tx.adminUtils.sudoSetBurnIncreaseMult - summary: Set BurnIncreaseMult for a subnet. It is only callable by root and subnet owner.
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<Vec<u16>>)
- 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 toRecycle, 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: ReturnsOk(())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 givennetuid. - 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<AuthorityId, T::MaxAuthorities>)
- 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_aliveis false, the account will be reaped.Unlike sending funds to a burn address, which merely makes the funds inaccessible, this
burnoperation 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_aliveistrue), 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 thetransfer_alloperation 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_deathwill set theFreeBalanceof 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
Signedby 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<T::AccountId>)
-
interface:
api.tx.balances.upgradeAccounts -
summary: Upgrade a specified account.
origin: Must beSigned.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<CommitmentInfo<T::MaxFields>>)
- 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<<BalanceOf<T> as codec::HasCompact>::Type>, data: Vec<u8>)
-
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 theorigintodest. -
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<<BalanceOf<T> as codec::HasCompact>::Type>, data: Vec<u8>)
- interface:
api.tx.contracts.callOldWeight - summary: Deprecated version if [
Self::call] for use in an in-storageCall.
instantiate(value: u128, gas_limit: Weight, storage_deposit_limit: Option<<BalanceOf<T> as codec::HasCompact>::Type>, code_hash: CodeHash, data: Vec<u8>, salt: Vec<u8>)
-
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, thecode_hashof an on-chain deployed wasm binary must be supplied.
instantiateOldWeight(value: u128, gas_limit: OldWeight, storage_deposit_limit: Option<<BalanceOf<T> as codec::HasCompact>::Type>, code_hash: CodeHash, data: Vec<u8>, salt: Vec<u8>)
- interface:
api.tx.contracts.instantiateOldWeight - summary: Deprecated version if [
Self::instantiate] for use in an in-storageCall.
instantiateWithCode(value: u128, gas_limit: Weight, storage_deposit_limit: Option<<BalanceOf<T> as codec::HasCompact>::Type>, code: Vec<u8>, data: Vec<u8>, salt: Vec<u8>)
-
interface:
api.tx.contracts.instantiateWithCode -
summary: Instantiates a new contract from the supplied
codeoptionally 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 theoriginto 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
codeis deployed, and acode_hashis created for that code. - If the
code_hashalready exists on the chain the underlyingcodewill 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
valueis transferred to the new account. - The
deployfunction is executed in the context of the newly-created account.
instantiateWithCodeOldWeight(value: u128, gas_limit: OldWeight, storage_deposit_limit: Option<<BalanceOf<T> as codec::HasCompact>::Type>, code: Vec<u8>, data: Vec<u8>, salt: Vec<u8>)
- interface:
api.tx.contracts.instantiateWithCodeOldWeight - summary: Deprecated version if [
Self::instantiate_with_code] for use in an in-storageCall.
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_idlehooks to run migration steps.
removeCode(code_hash: CodeHash)
-
interface:
api.tx.contracts.removeCode -
summary: Remove the code stored under
code_hashand 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_hashordestdo 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<u8>, storage_deposit_limit: Option<<BalanceOf<T> as codec::HasCompact>::Type>, determinism: Determinism)
-
interface:
api.tx.contracts.uploadCode -
summary: Upload new
codewithout 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 suppliedcode.If the code already exists in storage it will still return
Okand upgrades the in storage version to the currentInstructionWeights::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<Box<RuntimeCall>>, target_address: Option<T::AccountId>)
-
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
CurrentCrowdloanIdstorage 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.