approve_as_multi
Call v123 → current #2Register approval without providing full call data (hash only).
View calls on chainCall Workflow
Click items to navigate. Pan and zoom to explore.
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
Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. Payment: `DepositBase` will be reserved if this is the first approval, plus `threshold` times `DepositFactor`. It is returned once this dispatch happens or is cancelled. The dispatch origin for this call must be _Signed_. `threshold`: The total number of approvals for this dispatch before it is executed. `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is not the first approval, then it must be `Some`, with the timepoint (block number and transaction index) of the first approval transaction. `call_hash`: The hash of the call to be executed. NOTE: If this is the final approval, you will want to use `as_multi` instead. ## Complexity `O(S)`. Up to one balance-reserve or unreserve operation. One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. One encode & hash, both of complexity `O(S)`. Up to one binary search and insert (`O(logS + S)`). I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. One event. Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit taken for its lifetime of `DepositBase + threshold * DepositFactor`.
Input Parameters
| # | Name | Type | Description |
|---|---|---|---|
| 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 | 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
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
Events Emitted
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
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 approve_as_multi call
const threshold = 0;
const other_signatories = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const maybe_timepoint = 0 as any /* Option */;
const call_hash = 0;
const max_weight = 0 as any /* Weight */;
const call = api.tx[stringCamelCase("Multisig")][stringCamelCase("approve_as_multi")](
threshold,
other_signatories,
maybe_timepoint,
call_hash,
max_weight
);Runtime Info
- Pallet Index
- 13
- Call Index
- 2
- First Version
- v123
- Current Version
- v393