cancel_as_multi

Call v123 → current #3

Cancel a pending multisig operation and reclaim the deposit.

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: developerswalletsvalidators

The Big Picture

cancel_as_multi lets the original depositor pull the plug, recover their deposit, and clean up the on-chain state when a multisig operation needs to be aborted.

Use Cases

  • Abort a mistaken multisig operation
  • Cancel an operation that's no longer needed
  • Reclaim deposit when signatories become unavailable

From Chain Metadata

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.

Input Parameters

#NameTypeDescription
0
threshold
u16 Number of approvals required
1
other_signatories
Vec<AccountId> VecList of other signatory accounts (sorted, excludes caller)
2
timepoint
Timepoint Timepoint when the multisig was created
3
call_hash
[u8; 32] [32]Blake2-256 hash of the call to cancel

Permissions

Origin
Signed
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Caller is the original depositor (first approver)
  • Multisig operation exists and is pending
  • Timepoint matches the operation to cancel

Effects

Events Emitted

Storage Modified

Postconditions

  • Multisig operation removed from storage
  • Deposit returned to the original depositor

Side Effects

  • All existing approvals are invalidated
  • Emits MultisigCancelled event

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 cancel_as_multi call
const threshold = 0;
const other_signatories = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const timepoint = 0 as any /* Timepoint */;
const call_hash = 0;

const call = api.tx[stringCamelCase("Multisig")][stringCamelCase("cancel_as_multi")](
  threshold,
  other_signatories,
  timepoint,
  call_hash
);

Runtime Info

Pallet Index
13
Call Index
3
First Version
v123
Current Version
v393