as_derivative

Call v120 → current #1

Executes a call as a derivative account of the sender.

View calls on chain

Click items to navigate. Pan and zoom to explore.

From Chain Metadata

Send a call through an indexed pseudonym of the sender. Filter from origin are passed along. The call will be dispatched with an origin which use the same filter as the origin of this call. NOTE: If you need to ensure that any account-based filtering is not honored (i.e. because you expect `proxy` to have been used prior in the call stack and you do not want the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` in the Multisig pallet instead. NOTE: Prior to version *12, this was called `as_limited_sub`. The dispatch origin for this call must be _Signed_.

Input Parameters

#NameTypeDescription
0
index
u16 index (u16)
1
call
RuntimeCall call (RuntimeCall)

Permissions

Origin
Signed
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Origin is signed
  • Index is valid

Effects

Postconditions

  • Call executed from derived account

Side Effects

  • Origin filter applied to call

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 as_derivative call
const index = 0;
const call = 0 as any /* RuntimeCall */;

const call = api.tx[stringCamelCase("Utility")][stringCamelCase("as_derivative")](
  index,
  call
);

Runtime Info

Pallet Index
11
Call Index
1
First Version
v120
Current Version
v393