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 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> CptBlock height when pure proxy was created (SCALE compact -> integer)
4
ext_index
Compact<u32> CptExtrinsic 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

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Build kill_pure call
const spawner = 0 as any /* MultiAddress */;
const proxy_type = 0 as any /* ProxyType */;
const index = 0;
const height = 0;
const ext_index = 0;

const call = api.tx[stringCamelCase("Proxy")][stringCamelCase("kill_pure")](
  spawner,
  proxy_type,
  index,
  height,
  ext_index
);

Runtime Info

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