Transactions

deposit-gamma

Move gamma from your balance on a subnet to your deposit at a hotkey.

View as Markdown

Moves up to amount_gamma (all for the whole balance) from your coldkey's gamma balance, the gamma it holds on no hotkey, to the deposit at hotkey_ss58: the whole balance, or at least 0.1 gamma leaving at least as much. A new deposit has no daily spend cap unless daily_spend_cap_gamma sets one, and a deposit naming a cap fails on a deposit with another.

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

Parameters

ParameterTypeRequiredDescription
netuidintegeryesSubnet of the balance and the deposit.
hotkey_ss58stringyesHotkey of the deposit credited.
amount_gammanumber | "all"yesGamma moved.
daily_spend_cap_gammanumbernoThe deposit's daily spend cap, in gamma: 0 pauses it, and any other cap is at least 0.1. A new deposit opens with it, and an existing one must already have it. Omit to keep the deposit's cap, which for a new deposit is none.

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 deposit-gamma \
  --netuid <int> \
  --hotkey <ss58|name> \
  --amount-gamma <amount|all> --dry-run
btcli tx deposit-gamma \
  --netuid <int> \
  --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.DepositGamma(netuid=1, hotkey_ss58="5F...", 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("deposit_gamma", {...}, wallet)

On-chain implementation

SubtensorModule.deposit_gamma — pallets/subtensor/src/macros/dispatches.rs#L3298:

#[pallet::call_index(175)]
#[pallet::weight((<T as Config>::WeightInfo::deposit_gamma(), DispatchClass::Normal, Pays::Yes))]
pub fn deposit_gamma(
    origin: OriginFor<T>,
    hotkey: T::AccountId,
    netuid: NetUid,
    amount: GammaBalance,
    daily_spend_cap: Option<GammaBalance>,
) -> DispatchResult {
    Self::do_deposit_gamma(origin, hotkey, netuid, amount, daily_spend_cap)
}

Delegates to do_deposit_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).