Transactions
create-pure-proxy
Create a pure proxy: a fresh keyless account controlled via delegation.
The chain derives a new address from the signer, proxy_type, index,
and the creation block. Nobody holds its private key — the spawner controls
it purely through the proxy relationship, which makes it useful as a
disposable or role-scoped account (e.g. a Staking-only treasury). Record the
creation block and extrinsic index (shown in the result): kill_pure_proxy
needs them to close the account later. Losing the spawner key means losing
the pure proxy and anything it holds.
| Signer | Origin | Pallet | Wraps |
|---|---|---|---|
coldkey | signed account (pallet role may apply) | Proxy | Proxy.create_pure, Proxy.create_protected_pure, Proxy.create_safe_pure |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
proxy_type | string | no | Scope of calls the delegation covers. One of: Any, Owner, NonCritical, NonTransfer, Senate, NonFungible, Triumvirate, Governance, Staking, Registration, Transfer, SmallTransfer, RootWeights, ChildKeys, SudoUncheckedSetCode, SwapHotkey, SubnetLeaseBeneficiary, RootClaim, BasketTrading, Validate, Weights, Lock, GammaSpend. Triumvirate, Senate, Governance, and RootWeights are deprecated on the current runtime: they deny all calls, so a proxy of those types can dispatch nothing. Prefer the narrowest type that covers your use; Any can do everything the account can, including transfers. |
delay | integer | no | Announcement delay in blocks: the delegate must announce each call and wait this long before executing it, giving you time to veto. 0 executes immediately. |
index | integer | no | Disambiguator so one signer can create several pure proxies in one block; also part of the derived address. Keep 0 unless batching. |
account_mode | string | no | Account derivation: legacy or safe; MS wallets default to safe. |
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 create-pure-proxy --dry-run
btcli tx create-pure-proxy -w my_coldkeyPython
import bittensor as bt
from bittensor.wallet import Wallet
wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.CreatePureProxy()
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("create_pure_proxy", {...}, wallet)On-chain implementation
Proxy.create_pure — pallets/proxy/src/lib.rs#L403:
#[pallet::call_index(4)]
#[pallet::weight(T::WeightInfo::create_pure(T::MaxProxies::get()).saturating_add(T::AccountPolicy::weight()))]
pub fn create_pure(
origin: OriginFor<T>,
proxy_type: T::ProxyType,
delay: BlockNumberFor<T>,
index: u16,
) -> DispatchResult {
let who = ensure_signed(origin)?;
ensure!(
!T::AccountPolicy::requires_protection(&who),
Error::<T>::AccountPolicyViolation
);
Self::do_create_pure(who, proxy_type, delay, index, false, false)
}Proxy.create_protected_pure — pallets/proxy/src/lib.rs#L779:
#[pallet::call_index(12)]
#[pallet::weight(T::WeightInfo::create_protected_pure().saturating_add(T::DbWeight::get().reads(1)))]
#[frame_support::transactional]
pub fn create_protected_pure(
origin: OriginFor<T>,
proxy_type: T::ProxyType,
delay: BlockNumberFor<T>,
index: u16,
) -> DispatchResult {
let who = ensure_signed(origin)?;
ensure!(
T::AccountPolicy::requires_protection(&who),
Error::<T>::AccountPolicyViolation
);
Self::do_create_pure(who, proxy_type, delay, index, true, false)
}Proxy.create_safe_pure — pallets/proxy/src/lib.rs#L800:
#[pallet::call_index(13)]
#[pallet::weight(T::WeightInfo::create_pure(T::MaxProxies::get())
.saturating_add(T::SafeDerivationWeight::get()))]
pub fn create_safe_pure(
origin: OriginFor<T>,
proxy_type: T::ProxyType,
delay: BlockNumberFor<T>,
index: u16,
) -> DispatchResult {
let who = ensure_signed(origin)?;
Self::do_create_pure(who, proxy_type, delay, index, false, true)
}Every file is browsable under /code exactly as built into the runtime, or as plain text under /code/raw/<path> (index: /code/index.json).