Multisig::Call

Variant 164 v393

pallet_multisig::pallet::Call

Contains a variant per dispatchable extrinsic that this pallet has.

About This Type

Call enum for the Call pallet.

Contains all dispatchable functions (extrinsics) for the Call pallet. Each variant represents a different callable function with its parameters.

Variants (5)

IndexNameFieldsDocs
0as_multi_threshold_1
other_signatories: Vec<AccountId>
Immediately dispatch a multi-signature call using a single approval from the caller. The dispatch origin for this call must be _Signed_. - `other_signatories`: The accounts (other than the sender) who are part of the multi-signature, but do not participate in the approval process. - `call`: The call to be executed. Result is equivalent to the dispatched result. ## Complexity O(Z + C) where Z is the length of the call and C its execution weight.
1as_multi
threshold: u16
other_signatories: Vec<AccountId>
maybe_timepoint: Option
max_weight: Weight
Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. If there are enough, then dispatch the call. 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`: The call to be executed. NOTE: Unless this is the final approval, you will generally want to use `approve_as_multi` instead, since it only requires a hash of the call. Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise on success, result is `Ok` and the result from the interior call, if it was executed, may be found in the deposited `MultisigExecuted` event. ## Complexity - `O(S + Z + Call)`. - 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 call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. - 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. - The weight of the `call`. - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit taken for its lifetime of `DepositBase + threshold * DepositFactor`.
2approve_as_multi
threshold: u16
other_signatories: Vec<AccountId>
maybe_timepoint: Option
call_hash: [u8; 32]
max_weight: Weight
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`.
3cancel_as_multi
threshold: u16
other_signatories: Vec<AccountId>
timepoint: Timepoint
call_hash: [u8; 32]
Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously for this operation will be unreserved on success. 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. - `timepoint`: The timepoint (block number and transaction index) of the first approval transaction for this dispatch. - `call_hash`: The hash of the call to be executed. ## 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)`. - One event. - I/O: 1 read `O(S)`, one remove. - Storage: removes one item.
4poke_deposit
threshold: u16
other_signatories: Vec<AccountId>
call_hash: [u8; 32]
Poke the deposit reserved for an existing multisig operation. The dispatch origin for this call must be _Signed_ and must be the original depositor of the multisig operation. The transaction fee is waived if the deposit amount has changed. - `threshold`: The total number of approvals needed for this multisig. - `other_signatories`: The accounts (other than the sender) who are part of the multisig. - `call_hash`: The hash of the call this deposit is reserved for. Emits `DepositPoked` if successful.

SCALE Encoding

Rule
1-byte variant index followed by variant-specific field data. 5 possible variants.
Size
variable (1+ bytes)

Examples

as_multi_threshold_1 = as_multi_threshold_1(other_signatories, call)
0x00<field0><field1>
00 Variant index 0 = as_multi_threshold_1
field 0 other_signatories: Vec<AccountId>
field 1 call: RuntimeCall
as_multi = as_multi(threshold, other_signatories, maybe_timepoint, call, max_weight)
0x01<field0><field1><field2><field3><field4>
01 Variant index 1 = as_multi
field 0 threshold: u16
field 1 other_signatories: Vec<AccountId>
field 2 maybe_timepoint: Option
field 3 call: RuntimeCall
field 4 max_weight: Weight
approve_as_multi = approve_as_multi(threshold, other_signatories, maybe_timepoint, call_hash, max_weight)
0x02<field0><field1><field2><field3><field4>
02 Variant index 2 = approve_as_multi
field 0 threshold: u16
field 1 other_signatories: Vec<AccountId>
field 2 maybe_timepoint: Option
field 3 call_hash: [u8; 32]
field 4 max_weight: Weight

Code Examples

import { TypeRegistry } from "@polkadot/types";

const registry = new TypeRegistry();

// Encode Multisig::Call — variant "as_multi_threshold_1"
const value = registry.createType("Multisig::Call", { as_multi_threshold_1: { other_signatories: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", call: 0 } });
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
164
Kind
Variant
Path
pallet_multisig::pallet::Call
Runtime
v393