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 |
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. 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. |
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#L332:
#[pallet::call_index(4)]
#[pallet::weight(T::WeightInfo::create_pure(T::MaxProxies::get()))]
pub fn create_pure(
origin: OriginFor<T>,
proxy_type: T::ProxyType,
delay: BlockNumberFor<T>,
index: u16,
) -> DispatchResult {
let who = ensure_signed(origin)?;
let pure = Self::pure_account(&who, &proxy_type, index, None)?;
ensure!(!Proxies::<T>::contains_key(&pure), Error::<T>::Duplicate);
let proxy_def = ProxyDefinition {
delegate: who.clone(),
proxy_type: proxy_type.clone(),
delay,
};
let bounded_proxies: BoundedVec<_, T::MaxProxies> = vec![proxy_def]
.try_into()
.map_err(|_| Error::<T>::TooMany)?;
let deposit = T::ProxyDepositBase::get().saturating_add(T::ProxyDepositFactor::get());
T::Currency::reserve(&who, deposit)?;
Proxies::<T>::insert(&pure, (bounded_proxies, deposit));
Self::deposit_event(Event::PureCreated {
pure,
who,
proxy_type,
disambiguation_index: index,
});
Ok(())
}Delegates to pure_account.
Every file is browsable under /code exactly as built into the runtime, or as plain text under /code/raw/<path> (index: /code/index.json).