Transactions

move-gamma

Move gamma between two of your deposits on a subnet.

View as Markdown

Moves up to amount_gamma (all for the whole balance) from the deposit at origin_hotkey_ss58 to the one at destination_hotkey_ss58. A destination with no deposit is opened with the origin's spender and daily spend cap, and a move that empties the origin closes it.

SignerOriginPalletWraps
coldkeysigned account (pallet role may apply)SubtensorModuleSubtensorModule.move_gamma

Parameters

ParameterTypeRequiredDescription
netuidintegeryesSubnet of both deposits.
origin_hotkey_ss58stringyesHotkey of the deposit moved from.
destination_hotkey_ss58stringyesHotkey of the deposit moved to.
amount_gammanumber | "all"yesGamma moved.

Address parameters (--hotkey, --coldkey, --dest, ...) accept a raw ss58 address, an address-book or proxy-book name, or a local wallet/hotkey name.

CLI

Preview with --dry-run (shows fee, effects, and policy result without submitting), then submit:

btcli tx move-gamma \
  --netuid <int> \
  --origin-hotkey <ss58|name> \
  --destination-hotkey <ss58|name> \
  --amount-gamma <amount|all> --dry-run
btcli tx move-gamma \
  --netuid <int> \
  --origin-hotkey <ss58|name> \
  --destination-hotkey <ss58|name> \
  --amount-gamma <amount|all> -w my_coldkey

Python

import bittensor as bt
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.MoveGamma(netuid=1, origin_hotkey_ss58="5F...origin", destination_hotkey_ss58="5G...destination", amount_gamma=1.0)

sub = bt.Subtensor()
plan = sub.plan(intent, wallet)   # fee, effects, policy — no submission
result = sub.execute(intent, wallet)
if not result.success:
    print(result.error.code, result.error.remediation)

(bt.Subtensor is also the async client — async with bt.Subtensor() as client: — see The client.) Or build the intent by op name, as an agent would:

result = sub.execute_tool("move_gamma", {...}, wallet)

On-chain implementation

SubtensorModule.move_gamma — pallets/subtensor/src/macros/dispatches.rs#L3273:

#[pallet::call_index(160)]
#[pallet::weight((<T as Config>::WeightInfo::move_gamma(), DispatchClass::Normal, Pays::Yes))]
pub fn move_gamma(
    origin: OriginFor<T>,
    origin_hotkey: T::AccountId,
    destination_hotkey: T::AccountId,
    netuid: NetUid,
    amount: GammaBalance,
) -> DispatchResult {
    Self::do_move_gamma(origin, origin_hotkey, destination_hotkey, netuid, amount)
}

Delegates to do_move_gamma.

Every file is browsable under /code exactly as built into the runtime, or as plain text under /code/raw/<path> (index: /code/index.json).