Proxy docs
Look up any call, event, or storage item with code examples. Runtime v490 · Block #9,478,217
Developer documentation for the Proxy pallet of the Subtensor blockchain, part of the Bittensor decentralized AI network. This page is designed for developers integrating with the chain: look up any call, event, or storage item, copy code examples in TypeScript, Python, or Rust, and filter by your role. For in-depth explanations, version history, and relationships between items, see the Reference section.
Proxy
See [`Pallet::proxy`].
Calls 15
Execute a call on behalf of another account via proxy.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
real | MultiAddress | — | real: Account address as a lookup source (typically resolves to AccountId) |
force_proxy_type | Option | — | force_proxy_type (Option) |
call | RuntimeCall | — | call (RuntimeCall) |
// ----------------------------------------------------------------------
// 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 proxy call (typed, named args)
const real = undefined as any /* MultiAddress — replace with real value */;
const force_proxy_type = undefined;
const call = undefined as any /* RuntimeCall — replace with real value */;
const tx = api.tx.Proxy.proxy({
real,
force_proxy_type,
call,
});Register a new proxy for the sender's account.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
delegate | MultiAddress | — | delegate: Account address as a lookup source (typically resolves to AccountId) |
proxy_type | ProxyType | — | proxy_type (ProxyType) |
delay | u32 | Integer | delay: Block number |
// ----------------------------------------------------------------------
// 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 add_proxy call (typed, named args)
const delegate = undefined as any /* MultiAddress — replace with real value */;
const proxy_type = undefined as any /* ProxyType — replace with real value */;
const delay = 0;
const tx = api.tx.Proxy.add_proxy({
delegate,
proxy_type,
delay,
});Remove a previously registered proxy.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
delegate | MultiAddress | — | delegate: Account address as a lookup source (typically resolves to AccountId) |
proxy_type | ProxyType | — | proxy_type (ProxyType) |
delay | u32 | Integer | delay: Block number |
// ----------------------------------------------------------------------
// 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 remove_proxy call (typed, named args)
const delegate = undefined as any /* MultiAddress — replace with real value */;
const proxy_type = undefined as any /* ProxyType — replace with real value */;
const delay = 0;
const tx = api.tx.Proxy.remove_proxy({
delegate,
proxy_type,
delay,
});Remove all proxy registrations for the caller's account.
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 remove_proxies call (no parameters)
const tx = api.tx.Proxy.remove_proxies();Create a new account with no private key, only accessible via proxy.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
proxy_type | ProxyType | — | proxy_type (ProxyType) |
delay | u32 | Integer | delay: Block number |
index | u16 | Integer (0-65535) | index (u16) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// 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 create_pure call (typed, named args)
const proxy_type = undefined as any /* ProxyType — replace with real value */;
const delay = 0;
const index = 0;
const tx = api.tx.Proxy.create_pure({
proxy_type,
delay,
index,
});Remove a pure proxy account, returning deposits.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
spawner | MultiAddress | — | spawner: Account address as a lookup source (typically resolves to AccountId) |
proxy_type | ProxyType | — | proxy_type (ProxyType) |
index | u16 | Integer (0-65535) | index (u16) |
height | Compact<u32> | Integer | height: Block number |
ext_index | Compact<u32> | Integer | ext_index (Compact<u32>) |
// ----------------------------------------------------------------------
// 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,
});Announce an upcoming proxy call for time-delayed proxies.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
real | MultiAddress | — | real: Account address as a lookup source (typically resolves to AccountId) |
call_hash | H256 | 256-bit Hash | call_hash (H256) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// 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 announce call (typed, named args)
const real = undefined as any /* MultiAddress — replace with real value */;
const call_hash = "0x0000000000000000000000000000000000000000000000000000000000000000";
const tx = api.tx.Proxy.announce({
real,
call_hash,
});Cancel a pending announcement made by this proxy.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
real | MultiAddress | — | real: Account address as a lookup source (typically resolves to AccountId) |
call_hash | H256 | 256-bit Hash | call_hash (H256) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// 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 remove_announcement call (typed, named args)
const real = undefined as any /* MultiAddress — replace with real value */;
const call_hash = "0x0000000000000000000000000000000000000000000000000000000000000000";
const tx = api.tx.Proxy.remove_announcement({
real,
call_hash,
});Reject a pending announcement from a delegate.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
delegate | MultiAddress | — | delegate: Account address as a lookup source (typically resolves to AccountId) |
call_hash | H256 | 256-bit Hash | call_hash (H256) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// 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 reject_announcement call (typed, named args)
const delegate = undefined as any /* MultiAddress — replace with real value */;
const call_hash = "0x0000000000000000000000000000000000000000000000000000000000000000";
const tx = api.tx.Proxy.reject_announcement({
delegate,
call_hash,
});Execute a previously announced proxy call after delay.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
delegate | MultiAddress | — | delegate: Account address as a lookup source (typically resolves to AccountId) |
real | MultiAddress | — | real: Account address as a lookup source (typically resolves to AccountId) |
force_proxy_type | Option | — | force_proxy_type (Option) |
call | RuntimeCall | — | call (RuntimeCall) |
// ----------------------------------------------------------------------
// HEADS UP: 3 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 proxy_announced call (typed, named args)
const delegate = undefined as any /* MultiAddress — replace with real value */;
const real = undefined as any /* MultiAddress — replace with real value */;
const force_proxy_type = undefined;
const call = undefined as any /* RuntimeCall — replace with real value */;
const tx = api.tx.Proxy.proxy_announced({
delegate,
real,
force_proxy_type,
call,
});Update proxy deposit amounts based on current parameters.
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 poke_deposit call (no parameters)
const tx = api.tx.Proxy.poke_deposit();Set whether the real account pays transaction fees for proxy calls made by a
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
delegate | MultiAddress | — | delegate: Account address as a lookup source (typically resolves to AccountId) |
pays_fee | bool | Boolean (true/false) | pays_fee (bool) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// 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 set_real_pays_fee call (typed, named args)
const delegate = undefined as any /* MultiAddress — replace with real value */;
const pays_fee = true;
const tx = api.tx.Proxy.set_real_pays_fee({
delegate,
pays_fee,
});Creates a pure proxy at the same address Proxy.create_pure derives and registers it as a protected derived authority in HashedAccounts in the same transaction.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
proxy_type | ProxyType | — | proxy_type (ProxyType) |
delay | u32 | Integer | delay: Block number |
index | u16 | Integer (0-65535) | index (u16) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// 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 create_protected_pure call (typed, named args)
const proxy_type = undefined as any /* ProxyType — replace with real value */;
const delay = 0;
const index = 0;
const tx = api.tx.Proxy.create_protected_pure({
proxy_type,
delay,
index,
});Creates a pure proxy whose account id uses the safe derivation: a domain-separated blake2_256 hash that is neither an Ed25519 nor a Ristretto point.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
proxy_type | ProxyType | — | proxy_type (ProxyType) |
delay | u32 | Integer | delay: Block number |
index | u16 | Integer (0-65535) | index (u16) |
// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// 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 create_safe_pure call (typed, named args)
const proxy_type = undefined as any /* ProxyType — replace with real value */;
const delay = 0;
const index = 0;
const tx = api.tx.Proxy.create_safe_pure({
proxy_type,
delay,
index,
});Removes a pure proxy created by Proxy.create_safe_pure and returns its proxy deposit to the spawner.
Parameters
| Name | Type | Format | Description |
|---|---|---|---|
spawner | MultiAddress | — | spawner: Account address as a lookup source (typically resolves to AccountId) |
proxy_type | ProxyType | — | proxy_type (ProxyType) |
index | u16 | Integer (0-65535) | index (u16) |
height | Compact<u32> | Integer | height: Block number |
ext_index | Compact<u32> | Integer | ext_index (Compact<u32>) |
// ----------------------------------------------------------------------
// 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_safe_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_safe_pure({
spawner,
proxy_type,
index,
height,
ext_index,
});Events 8
Emitted after a proxy call is executed, showing the result.
When it fires
- Proxy relationship exists
- Proxy type permits the call
Fields
| Name | Type | Format | Description |
|---|---|---|---|
result | Result | — | Result of the proxied call execution (Ok or Err with dispatch error) |
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);
// Subscribe to ProxyExecuted events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Proxy.ProxyExecuted.get(block.hash);
for (const evt of events) {
console.log("ProxyExecuted:", evt.payload);
}
});Emitted when a new keyless (pure) proxy account is created.
When it fires
- Sufficient deposit
- No duplicate pure proxy
Fields
| Name | Type | Format | Description |
|---|---|---|---|
pure | AccountId | SS58 Address | The newly created pure proxy account address |
who | AccountId | SS58 Address | Account that created the pure proxy |
proxy_type | ProxyType | — | Type of proxy (Any, NonTransfer, Staking, etc.) |
disambiguation_index | u16 | Integer (0-65535) | Index to distinguish multiple pure proxies with same parameters |
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);
// Subscribe to PureCreated events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Proxy.PureCreated.get(block.hash);
for (const evt of events) {
console.log("PureCreated:", evt.payload);
}
});Emitted when a pure proxy account is destroyed.
When it fires
- Pure account called kill_pure via proxy
Fields
| Name | Type | Format | Description |
|---|---|---|---|
pure | AccountId | SS58 Address | The pure proxy account address that was killed |
spawner | AccountId | SS58 Address | Account that originally created the pure proxy |
proxy_type | ProxyType | — | Type of proxy permission held by the pure proxy |
disambiguation_index | u16 | Integer (0-65535) | Index used to disambiguate multiple pure proxies for the same spawner |
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);
// Subscribe to PureKilled events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Proxy.PureKilled.get(block.hash);
for (const evt of events) {
console.log("PureKilled:", evt.payload);
}
});Emitted when a time-delayed proxy announces a future call.
When it fires
- Proxy has delay > 0
- MaxPending not exceeded
Fields
| Name | Type | Format | Description |
|---|---|---|---|
real | AccountId | SS58 Address | The account for which the announcement was made |
proxy | AccountId | SS58 Address | The proxy account that made the announcement |
call_hash | H256 | 256-bit Hash | Blake2-256 hash of the announced call |
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);
// Subscribe to Announced events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Proxy.Announced.get(block.hash);
for (const evt of events) {
console.log("Announced:", evt.payload);
}
});Emitted when a new proxy is registered for an account.
When it fires
- Sufficient deposit
- MaxProxies not exceeded
Fields
| Name | Type | Format | Description |
|---|---|---|---|
delegator | AccountId | SS58 Address | Account that delegated proxy permission |
delegatee | AccountId | SS58 Address | Account receiving proxy permission |
proxy_type | ProxyType | — | Type of proxy permission granted |
delay | u32 | Integer | Number of blocks before proxy can execute (0 = immediate) |
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);
// Subscribe to ProxyAdded events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Proxy.ProxyAdded.get(block.hash);
for (const evt of events) {
console.log("ProxyAdded:", evt.payload);
}
});Emitted when a proxy is unregistered from an account.
When it fires
- Proxy exists
- Called by delegator
Fields
| Name | Type | Format | Description |
|---|---|---|---|
delegator | AccountId | SS58 Address | Account that revoked proxy permission |
delegatee | AccountId | SS58 Address | Account whose proxy permission was revoked |
proxy_type | ProxyType | — | Type of proxy permission removed |
delay | u32 | Integer | Delay that was configured for this proxy |
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);
// Subscribe to ProxyRemoved events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Proxy.ProxyRemoved.get(block.hash);
for (const evt of events) {
console.log("ProxyRemoved:", evt.payload);
}
});Emitted when proxy or announcement deposits are recalculated.
When it fires
- Account has proxy or announcement deposits
Fields
| Name | Type | Format | Description |
|---|---|---|---|
who | AccountId | SS58 Address | Account whose proxy deposit was adjusted |
kind | DepositKind | — | Kind of deposit being poked (announcement / proxy) |
old_deposit | TaoBalance | — | Previous deposit amount (BalanceOf<T>, RAO) |
new_deposit | TaoBalance | — | New deposit amount after adjustment (BalanceOf<T>, RAO) |
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);
// Subscribe to DepositPoked events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Proxy.DepositPoked.get(block.hash);
for (const evt of events) {
console.log("DepositPoked:", evt.payload);
}
});The real-pays-fee setting was updated for a proxy relationship.
When it fires
- Caller authorized to make changes
Fields
| Name | Type | Format | Description |
|---|---|---|---|
real | AccountId | SS58 Address | real: Account address (32 bytes, SS58-encoded) |
delegate | AccountId | SS58 Address | delegate: Account address (32 bytes, SS58-encoded) |
pays_fee | bool | Boolean (true/false) | pays_fee (bool) |
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);
// Subscribe to RealPaysFeeSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Proxy.RealPaysFeeSet.get(block.hash);
for (const evt of events) {
console.log("RealPaysFeeSet:", evt.payload);
}
});Storage 5
Pending announcements made by time-delayed proxies.
(BoundedVec, TaoBalance) Keys
| Name | Type | Format | Description |
|---|---|---|---|
key1 | AccountId | SS58 Address | — |
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);
// Query Announcements storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const result = await api.query.Proxy.Announcements.getValue(key1);
console.log("Announcements:", result);Block number from which proxy announcements count. Announcements made at a lower height can no longer authorize Proxy.proxy_announced. VALUE Option<u32>.
u32 (Integer)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);
// Query AnnouncementValidFrom storage (no keys - plain value)
const result = await api.query.Proxy.AnnouncementValidFrom.getValue();
console.log("AnnouncementValidFrom:", result);The result of the last proxied call made by an account.
Result Keys
| Name | Type | Format | Description |
|---|---|---|---|
key1 | AccountId | SS58 Address | — |
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);
// Query LastCallResult storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const result = await api.query.Proxy.LastCallResult.getValue(key1);
console.log("LastCallResult:", result);The set of account proxies. Maps accounts to their proxy delegates and deposit amounts.
(BoundedVec, TaoBalance) Keys
| Name | Type | Format | Description |
|---|---|---|---|
key1 | AccountId | SS58 Address | — |
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);
// Query Proxies storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const result = await api.query.Proxy.Proxies.getValue(key1);
console.log("Proxies:", result);Tracks which (real, delegate) pairs have opted in to the real account paying
() Keys
| Name | Type | Format | Description |
|---|---|---|---|
key1 | AccountId | SS58 Address | — |
key2 | AccountId | SS58 Address | — |
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);
// Query RealPaysFeeConsentV1 storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const key2 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const result = await api.query.Proxy.RealPaysFeeConsentV1.getValue(key1, key2);
console.log("RealPaysFeeConsentV1:", result);Constants 6
Base deposit for proxy announcements.
TaoBalance"36000000"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);
// Query AnnouncementDepositBase constant
const value = await api.constants.Proxy.AnnouncementDepositBase();
console.log("AnnouncementDepositBase:", value);
// Balance: divide by 10^9 for TAO
const tao = value / 1_000_000_000n;Per-byte deposit for announcement data.
TaoBalance"68000000"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);
// Query AnnouncementDepositFactor constant
const value = await api.constants.Proxy.AnnouncementDepositFactor();
console.log("AnnouncementDepositFactor:", value);
// Balance: divide by 10^9 for TAO
const tao = value / 1_000_000_000n;Maximum pending announcements per account.
u3275import { 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);
// Query MaxPending constant
const value = await api.constants.Proxy.MaxPending();
console.log("MaxPending:", value);Maximum proxies per account.
u3220import { 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);
// Query MaxProxies constant
const value = await api.constants.Proxy.MaxProxies();
console.log("MaxProxies:", value);Base deposit for creating a proxy.
TaoBalance"60000000"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);
// Query ProxyDepositBase constant
const value = await api.constants.Proxy.ProxyDepositBase();
console.log("ProxyDepositBase:", value);
// Balance: divide by 10^9 for TAO
const tao = value / 1_000_000_000n;Per-proxy additional deposit.
TaoBalance"33000000"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);
// Query ProxyDepositFactor constant
const value = await api.constants.Proxy.ProxyDepositFactor();
console.log("ProxyDepositFactor:", value);
// Balance: divide by 10^9 for TAO
const tao = value / 1_000_000_000n;Errors 12
You've exceeded the maximum number of proxies or pending announcements.
Common Causes
- Account has MaxProxies proxies
- Proxy has MaxPending announcements
How to Fix
Remove unused proxies,Execute or cancel pending announcements
The proxy relationship you're trying to remove doesn't exist.
Common Causes
- Already removed
- Wrong parameters
- Never added
How to Fix
Query Proxies storage to see actual relationships,Verify exact parameters
You're not an authorized proxy for the account you're trying to act on.
Common Causes
- No proxy relationship
- Was removed
- Wrong proxy type
How to Fix
Verify proxy exists,Check proxy type permits this call
The call is not allowed by your proxy type.
Common Causes
- Proxy type doesn't permit this call category
How to Fix
Check your proxy type's permitted calls,Request different proxy type
A proxy with these exact parameters already exists.
Common Causes
- add_proxy for existing relationship
How to Fix
Check Proxies storage,No action needed if it exists
This call could escalate proxy privileges.
Common Causes
- Trying to add more permissive proxy via proxy
How to Fix
Have the account owner make this call directly
Trying to execute a delayed proxy call without announcing.
Common Causes
- Skipped announce step
- Announcement was removed
- Delay hasn't passed
- From v488: the announcement height is below Proxy.AnnouncementValidFrom, so proxy_announced does not match it
- From v488: a proxy grant from a real account that has a HashedAccounts record removed this delegate announcements for that account
How to Fix
Call announce first,Wait for delay period,From v488: compare the announcement height with Proxy.AnnouncementValidFrom and announce again when it is lower
You cannot add yourself as your own proxy.
Common Causes
- Passing your own address as delegate
How to Fix
Use a different address for the proxy delegate
Internal error computing announcement deposits.
Common Causes
- Bug in runtime
How to Fix
Report this issue
Failed to derive a valid account ID for pure proxy.
Common Causes
- Invalid inputs to create_pure
How to Fix
Try different parameters or disambiguation index
The runtime account policy rejected a proxy grant, a proxy use or a pure-proxy creation because of the HashedAccounts security floor of the accounts involved.
Common Causes
- Proxy.add_proxy: the real account is registered in HashedAccounts and the delegate does not meet its floor
- Proxy.proxy, Proxy.proxy_announced or Proxy.set_real_pays_fee: the same floor check on (real, delegate) fails before the proxy definition is looked up
- Proxy.create_pure called by an account with a HashedAccounts.MlDsaAccounts or HashedAccounts.DerivedAuthorities record
- Proxy.create_protected_pure called by an account without such a record
How to Fix
Find the real account kind: HashedAccounts.Accounts (floor Committed), HashedAccounts.MlDsaAccounts or HashedAccounts.DerivedAuthorities (floor PqRequired), none of them (no restriction),For a Committed real, use a delegate present in any of the three maps. For a PqRequired real, use a delegate present in MlDsaAccounts or DerivedAuthorities,For pure proxies, call create_protected_pure from a PqRequired account and create_pure or create_safe_pure from any other account
Proxy.create_safe_pure or Proxy.kill_safe_pure could not derive the safe pure account: all 64 candidate hashes decode as an Ed25519 or Ristretto point, or the chosen 32 bytes do not round-trip as the runtime AccountId.
Common Causes
- Every attempt 0 to 63 of blake2_256(SCALE("subtensor/safe-pure/v1", (spawner, proxy_type, index, height, ext_index)) ++ attempt) decompresses as a curve point
How to Fix
For create_safe_pure, resubmit. height and ext_index change with the block and extrinsic position, and a different index also changes the manifest,For kill_safe_pure, check the creation parameters. A wrong parameter normally derives a different account and returns Proxy.NoPermission. This error means the supplied tuple has no safe candidate, so it is not the tuple of an existing safe pure proxy