kill_pure

Call v149 → current #5

Remove a pure proxy account, returning deposits.

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: validatorsdeveloperswallets

The Big Picture

Destroy pure accounts when no longer needed. Warning: remaining funds are lost.

Use Cases

  • Clean up unused pure accounts
  • Recover deposits

From Chain Metadata

See [`Pallet::kill_pure`].

Input Parameters

#NameTypeDescription
0
spawner
MultiAddress AccountIdLookupOf<T>Original account that created the pure proxy
1
proxy_type
ProxyType Proxy type used when creating the pure account
2
index
u16 Disambiguation index used at creation
3
height
Compact<u32> Cpt BlockNumberFor<T>Block height when pure proxy was created (SCALE compact -> integer)
4
ext_index
Compact<u32> Cpt Extrinsic index within the creation block (SCALE compact -> integer)

Permissions

Origin
Unknown
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Caller is the pure account (via proxy)
  • Must provide original creation parameters

Effects

Events Emitted

Storage Modified

Postconditions

  • Pure account removed
  • Deposits returned
  • PureKilled event emitted

Side Effects

  • Any remaining funds become inaccessible

Code Examples

// ----------------------------------------------------------------------
// HEADS UP: 2 args below have a complex type with no usable default.
// Look for `undefined as any` and replace them with real values
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Build kill_pure call (typed, named args)
const spawner = undefined as any /* MultiAddress — replace with real value */;
const proxy_type = undefined as any /* ProxyType — replace with real value */;
const index = 0;
const height = 0;
const ext_index = 0;

const tx = api.tx.Proxy.kill_pure({
  spawner,
  proxy_type,
  index,
  height,
  ext_index,
});

Runtime Info

Pallet Index
16
Call Index
5
First Version
v149
Current Version
v411