Transactions

set-reject-locked-alpha

Opt the signing coldkey in or out of receiving locked alpha.

View as Markdown

Coldkeys reject incoming locked alpha by default, so a locked-stake transfer (transfer_stake of conviction-locked alpha, or a coldkey swap that carries locks) to a coldkey that has not opted in fails with AccountRejectsLockedAlpha. Pass enabled=False to opt in and accept locked alpha, or enabled=True to restore the default and reject it again. A per-coldkey account flag that moves no funds by itself.

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

Parameters

ParameterTypeRequiredDescription
enabledbooleanyesTrue to reject incoming locked alpha (the chain default), false to accept it.

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-reject-locked-alpha \
  --enabled/--no-enabled --dry-run
btcli tx set-reject-locked-alpha \
  --enabled/--no-enabled -w my_coldkey

Python

import bittensor as bt
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.SetRejectLockedAlpha(enabled=True)

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

On-chain implementation

SubtensorModule.set_reject_locked_alphapallets/subtensor/src/macros/dispatches.rs#L2483:

#[pallet::call_index(142)]
#[pallet::weight((<T as Config>::WeightInfo::set_reject_locked_alpha(), DispatchClass::Normal, Pays::Yes))]
pub fn set_reject_locked_alpha(origin: OriginFor<T>, enabled: bool) -> DispatchResult {
    let coldkey = ensure_signed(origin)?;
    Self::set_accept_locked_alpha(&coldkey, !enabled);
    Self::deposit_event(Event::RejectLockedAlphaUpdated { coldkey, enabled });
    Ok(())
}

Delegates to set_accept_locked_alpha.

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