Transactions
set-gamma-deposit-daily-spend-cap
Set or remove the daily spend cap of your gamma deposit.
What the spender can spend refills linearly at the cap per 7200 blocks, up
to the cap, and a cap of zero pauses the deposit. A changed cap keeps what
the spender can spend now, up to the new cap. Set exactly one of
daily_spend_cap_gamma or remove_cap.
| Signer | Origin | Pallet | Wraps |
|---|---|---|---|
coldkey | signed account (pallet role may apply) | SubtensorModule | SubtensorModule.set_gamma_deposit_daily_spend_cap |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
netuid | integer | yes | Subnet of the deposit. |
hotkey_ss58 | string | yes | Hotkey of the deposit. |
daily_spend_cap_gamma | number | no | The cap, in gamma; 0 pauses the deposit. |
remove_cap | boolean | no | Remove the cap. |
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 set-gamma-deposit-daily-spend-cap \
--netuid <int> \
--hotkey <ss58|name> \
--daily-spend-cap-gamma <amount> --dry-run
btcli tx set-gamma-deposit-daily-spend-cap \
--netuid <int> \
--hotkey <ss58|name> \
--daily-spend-cap-gamma <amount> -w my_coldkeyPython
import bittensor as bt
from bittensor.wallet import Wallet
wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.SetGammaDepositDailySpendCap(netuid=1, hotkey_ss58="5F...", daily_spend_cap_gamma=10)
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("set_gamma_deposit_daily_spend_cap", {...}, wallet)On-chain implementation
SubtensorModule.set_gamma_deposit_daily_spend_cap — pallets/subtensor/src/macros/dispatches.rs#L3313:
#[pallet::call_index(163)]
#[pallet::weight((<T as Config>::WeightInfo::set_gamma_deposit_daily_spend_cap(), DispatchClass::Normal, Pays::Yes))]
pub fn set_gamma_deposit_daily_spend_cap(
origin: OriginFor<T>,
hotkey: T::AccountId,
netuid: NetUid,
daily_spend_cap: Option<GammaBalance>,
) -> DispatchResult {
Self::do_set_gamma_deposit_daily_spend_cap(origin, hotkey, netuid, daily_spend_cap)
}Delegates to do_set_gamma_deposit_daily_spend_cap.
Every file is browsable under /code exactly as built into the runtime, or as plain text under /code/raw/<path> (index: /code/index.json).