add_proxy

Call v149 → current #1

Register a new proxy for the sender's account.

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: stakersvalidatorsdeveloperswallets

The Big Picture

Adding a proxy authorizes another account to act on your behalf.

Use Cases

  • Set up cold/hot wallet architecture
  • Authorize staking services

From Chain Metadata

See [`Pallet::add_proxy`].

Input Parameters

#NameTypeDescription
0
delegate
MultiAddress AccountIdLookupOf<T>Account to authorize as proxy
1
proxy_type
ProxyType Type of proxy permission (Any, NonTransfer, Staking, etc.)
2
delay
u32 BlockNumberFor<T>Announcement delay in blocks (0 = immediate)

Permissions

Origin
Unknown
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Sufficient balance for deposit
  • MaxProxies limit not exceeded

Effects

Events Emitted

Storage Modified

Postconditions

  • Proxy relationship created
  • Deposit reserved
  • ProxyAdded event emitted

Side Effects

  • Balance reserved for proxy deposit

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 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,
});

On-Chain Activity

Usage Frequency
●●○○○○ Low 1K–10K extrinsics

Infrequent

#50 most used call

Success Rate Moderate

50–80% of submissions succeed

As of block 7,429,232

Runtime Info

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