approve_as_multi

Call v123 → v148, v149 → current #2

Register approval without providing full call data (hash only).

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: developerswalletsvalidators

The Big Picture

approve_as_multi lets intermediate approvers just submit a hash, proving they've reviewed the call without re-transmitting it. The final approver uses as_multi with full data.

Use Cases

  • Approve a pending multisig without needing full call data
  • Gas-efficient intermediate approvals
  • Sign off on operations you've verified off-chain

From Chain Metadata

See [`Pallet::approve_as_multi`].

Input Parameters

#NameTypeDescription
0
threshold
u16 Number of approvals required (2 or higher)
1
other_signatories
Vec<AccountId> Vec List of other signatory accounts (sorted, excludes caller)
2
maybe_timepoint
→ timepoint
Option Option<Timepoint<BlockNumberFor<T>>>Timepoint from first approval (None for first approval)
3
call_hash
[u8; 32] [32] Blake2-256 hash of the call to approve
4
max_weight
Weight Maximum weight allowed for the call execution

Permissions

Origin
Unknown
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Caller is one of the signatories
  • Threshold is 2 or greater
  • Multisig operation exists (or this is first approval)
  • Caller hasn't already approved this operation

Effects

Storage Modified

Postconditions

  • Approval recorded for this signatory
  • Call NOT executed (even if threshold reached - need as_multi for final)

Side Effects

  • Deposit reserved on first approval
  • Emits MultisigApproval event
  • Lighter weight than as_multi (no call data)

Code Examples

// ----------------------------------------------------------------------
// 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 approve_as_multi call (typed, named args)
const threshold = 0;
const other_signatories = [] as [];
const timepoint = undefined;
const call_hash = "0x0000000000000000000000000000000000000000000000000000000000000000";
const max_weight = undefined as any /* Weight — replace with real value */;

const tx = api.tx.Multisig.approve_as_multi({
  threshold,
  other_signatories,
  maybe_timepoint: timepoint,
  call_hash,
  max_weight,
});

Version History

v123 block 720,235 5 args
v149 block 3,014,339 5 args Current

Runtime Info

Pallet Index
13
Call Index
2
First Version
v123
Current Version
v411