Transactions
set-take
Set the delegate take to an absolute value.
The delegate take is the fraction of staking emissions a delegate hotkey
keeps before distributing the rest to its nominators. This is sugar over
the chain's directional increase_take / decrease_take: it reads the
current take and dispatches whichever call moves it to take, so you do
not need to know the current value. Signed by the coldkey that owns the
hotkey. If the move is upward it inherits the increase path's constraints
(take maximum and rate limit on increases).
| Signer | Origin | Pallet | Wraps |
|---|---|---|---|
coldkey | signed account (pallet role may apply) | SubtensorModule | SubtensorModule.increase_take, 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 set-take \
--take <value> --dry-run
btcli tx set-take \
--take <value> -w my_coldkeyPython
import bittensor as bt
from bittensor.wallet import Wallet
wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.SetTake(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("set_take", {...}, wallet)On-chain implementation
SubtensorModule.increase_take — pallets/subtensor/src/macros/dispatches.rs#L525:
#[pallet::call_index(66)]
#[pallet::weight((<T as crate::pallet::Config>::WeightInfo::increase_take(), DispatchClass::Normal, Pays::Yes))]
pub fn increase_take(
origin: OriginFor<T>,
hotkey: T::AccountId,
take: PerU16,
) -> DispatchResult {
Self::do_increase_take(origin, hotkey, take)
}Delegates to do_increase_take.
SubtensorModule.decrease_take — pallets/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).