Skip to content

Latest commit

 

History

History
83 lines (63 loc) · 2.84 KB

File metadata and controls

83 lines (63 loc) · 2.84 KB
title decrease-take
description Decrease the delegate take of a hotkey.

{/* GENERATED by scripts/generate.py from the SDK registries — do not edit. */}

The delegate take is the fraction of staking emissions a delegate hotkey keeps for itself before distributing the rest to its nominators. This call only moves the take downward — the chain rejects values at or above the current take — and unlike increases it is not rate limited, so lowering your take is always available. Signed by the coldkey that owns the hotkey. Use set_take to land on an absolute value without tracking direction.

Signer Origin Pallet Wraps
coldkey signed account (pallet role may apply) SubtensorModule SubtensorModule.decrease_take

Parameters

Parameter Type Required Description
take integer | number | string yes New take: a 0..1 fraction (e.g. 0.18 for 18 percent) or the raw u16 proportion (0..65535). The chain enforces its configured take bounds.
hotkey_ss58 string no Hotkey the operation applies to.

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 decrease-take \
  --take <value> --dry-run
btcli tx decrease-take \
  --take <value> -w my_coldkey

Python

import bittensor as bt
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.DecreaseTake(take="...")

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("decrease_take", {...}, wallet)

On-chain implementation

SubtensorModule.decrease_takepallets/subtensor/src/macros/dispatches.rs#L492:

#[pallet::call_index(65)]
#[pallet::weight((<T as crate::pallet::Config>::WeightInfo::decrease_take(), DispatchClass::Normal, Pays::Yes))]
pub fn decrease_take(
    origin: OriginFor<T>,
    hotkey: T::AccountId,
    take: PerU16,
) -> DispatchResult {
    Self::do_decrease_take(origin, hotkey, take)
}

Delegates to do_decrease_take.

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