All pallets

Multisig docs

Look up any call, event, or storage item with code examples. Runtime v472 · Block #9,197,056

Developer documentation for the Multisig pallet of the Subtensor blockchain, part of the Bittensor decentralized AI network. This page is designed for developers integrating with the chain: look up any call, event, or storage item, copy code examples in TypeScript, Python, or Rust, and filter by your role. For in-depth explanations, version history, and relationships between items, see the Reference section.

Multisig

Immediately dispatch a multi-signature call using a single approval from the caller.

Index: 13 28 items

Calls 5

as_multi_threshold_1

call details

Immediately dispatch a call using a single approval from the caller.

Parameters

NameTypeFormatDescription
other_signatoriesVec<AccountId>Array of SS58 Addressother_signatories: list of Account address (32 bytes, SS58-encoded)
callRuntimeCall—call (RuntimeCall)
// ----------------------------------------------------------------------
// 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 as_multi_threshold_1 call (typed, named args)
const other_signatories = [] as [];
const call = undefined as any /* RuntimeCall — replace with real value */;

const tx = api.tx.Multisig.as_multi_threshold_1({
  other_signatories,
  call,
});

as_multi

call details

Register approval for a dispatch, executing if threshold is reached.

Parameters

NameTypeFormatDescription
thresholdu16Integer (0-65535)threshold (u16)
other_signatoriesVec<AccountId>Array of SS58 Addressother_signatories: list of Account address (32 bytes, SS58-encoded)
maybe_timepointOption—maybe_timepoint (Option)
callRuntimeCall—call (RuntimeCall)
max_weightWeightExecution Weightmax_weight: Substrate dispatch weight (computational cost)
Modifies: Multisigs
// ----------------------------------------------------------------------
// HEADS UP: 2 args below have a complex type with no usable default.
// Look for `undefined as any` and replace them with real values
// 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 as_multi call (typed, named args)
const threshold = 0;
const other_signatories = [] as [];
const timepoint = undefined;
const call = undefined as any /* RuntimeCall — replace with real value */;
const max_weight = undefined as any /* Weight — replace with real value */;

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

approve_as_multi

call details

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

Parameters

NameTypeFormatDescription
thresholdu16Integer (0-65535)threshold (u16)
other_signatoriesVec<AccountId>Array of SS58 Addressother_signatories: list of Account address (32 bytes, SS58-encoded)
maybe_timepointOption—maybe_timepoint (Option)
call_hash[u8; 32]—call_hash ([u8; 32])
max_weightWeightExecution Weightmax_weight: Substrate dispatch weight (computational cost)
Modifies: Multisigs
// ----------------------------------------------------------------------
// 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,
});

cancel_as_multi

call details

Cancel a pending multisig operation and reclaim the deposit.

Parameters

NameTypeFormatDescription
thresholdu16Integer (0-65535)threshold (u16)
other_signatoriesVec<AccountId>Array of SS58 Addressother_signatories: list of Account address (32 bytes, SS58-encoded)
timepointTimepoint—timepoint (Timepoint)
call_hash[u8; 32]—call_hash ([u8; 32])
Modifies: Multisigs
// ----------------------------------------------------------------------
// 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 cancel_as_multi call (typed, named args)
const threshold = 0;
const other_signatories = [] as [];
const timepoint = undefined as any /* Timepoint — replace with real value */;
const call_hash = "0x0000000000000000000000000000000000000000000000000000000000000000";

const tx = api.tx.Multisig.cancel_as_multi({
  threshold,
  other_signatories,
  timepoint,
  call_hash,
});

poke_deposit

call details

Update the deposit for an existing multisig operation.

Parameters

NameTypeFormatDescription
thresholdu16Integer (0-65535)threshold (u16)
other_signatoriesVec<AccountId>Array of SS58 Addressother_signatories: list of Account address (32 bytes, SS58-encoded)
call_hash[u8; 32]—call_hash ([u8; 32])
Errors: NotFound
Modifies: Multisigs
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 poke_deposit call (typed, named args)
const threshold = 0;
const other_signatories = [] as [];
const call_hash = "0x0000000000000000000000000000000000000000000000000000000000000000";

const tx = api.tx.Multisig.poke_deposit({
  threshold,
  other_signatories,
  call_hash,
});

Events 5

NewMultisig

event details

Emitted when a new multisig operation is initiated.

When it fires

  • Caller is one of the signatories
  • This is the first approval for this call
  • Threshold is 2 or greater

Fields

NameTypeFormatDescription
approvingAccountIdSS58 AddressAccount that initiated the multisig operation
multisig_accountAccountIdSS58 AddressThe derived multisig account address
call_hash[u8; 32]—Blake2-256 hash of the call to be executed
Modifies: Multisigs
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);

// Subscribe to NewMultisig events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.Multisig.NewMultisig.get(block.hash);
  for (const evt of events) {
    console.log("NewMultisig:", evt.payload);
  }
});

MultisigApproval

event details

Emitted when a signatory approves a pending multisig operation.

When it fires

  • Multisig operation exists
  • Caller is an authorized signatory
  • Caller hasn't already approved

Fields

NameTypeFormatDescription
approvingAccountIdSS58 AddressAccount that approved the operation
timepointTimepoint—Block height and extrinsic index when operation was created
multisig_accountAccountIdSS58 AddressThe derived multisig account address
call_hash[u8; 32]—Blake2-256 hash of the call to be executed
Modifies: Multisigs
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);

// Subscribe to MultisigApproval events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.Multisig.MultisigApproval.get(block.hash);
  for (const evt of events) {
    console.log("MultisigApproval:", evt.payload);
  }
});

MultisigExecuted

event details

Emitted when a multisig operation is executed after reaching threshold.

When it fires

  • Required threshold of approvals reached
  • Final approval provided with full call data

Fields

NameTypeFormatDescription
approvingAccountIdSS58 AddressAccount that provided the final approval
timepointTimepoint—Block height and extrinsic index when operation was created
multisig_accountAccountIdSS58 AddressThe derived multisig account address
call_hash[u8; 32]—Blake2-256 hash of the executed call
resultResult—Result of the call execution (Ok or Err with dispatch error)
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);

// Subscribe to MultisigExecuted events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.Multisig.MultisigExecuted.get(block.hash);
  for (const evt of events) {
    console.log("MultisigExecuted:", evt.payload);
  }
});

MultisigCancelled

event details

Emitted when a pending multisig operation is cancelled.

When it fires

  • Multisig operation exists
  • Caller is the original depositor

Fields

NameTypeFormatDescription
cancellingAccountIdSS58 AddressAccount that cancelled the operation
timepointTimepoint—Block height and extrinsic index when operation was created
multisig_accountAccountIdSS58 AddressThe derived multisig account address
call_hash[u8; 32]—Blake2-256 hash of the cancelled call
Emitted by: cancel_as_multi
Modifies: Multisigs
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);

// Subscribe to MultisigCancelled events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.Multisig.MultisigCancelled.get(block.hash);
  for (const evt of events) {
    console.log("MultisigCancelled:", evt.payload);
  }
});

DepositPoked

event details

Emitted when a multisig deposit is updated after parameter changes.

When it fires

  • Multisig operation exists
  • Caller is the original depositor

Fields

NameTypeFormatDescription
whoAccountIdSS58 AddressAccount whose multisig deposit was adjusted
call_hash[u8; 32]—Blake2-256 hash of the call held by the multisig
old_depositTaoBalance—Previous deposit amount (BalanceOf<T>, RAO)
new_depositTaoBalance—New deposit amount after adjustment (BalanceOf<T>, RAO)
Emitted by: poke_deposit
Modifies: Multisigs
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);

// Subscribe to DepositPoked events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.Multisig.DepositPoked.get(block.hash);
  for (const evt of events) {
    console.log("DepositPoked:", evt.payload);
  }
});

Storage 1

Multisigs

storage details

The set of open multisig operations.

Modifier: Optional Keys: 2 Returns: Multisig

Keys

NameTypeFormatDescription
key1AccountIdSS58 Address—
key2[u8; 32]——
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);

// Query Multisigs storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const key2 = "0x0000000000000000000000000000000000000000000000000000000000000000";

const result = await api.query.Multisig.Multisigs.getValue(key1, key2);
console.log("Multisigs:", result);

Constants 3

DepositBase

constant details

Base deposit for creating a multisig.

Type: TaoBalance
Value: "132000000"
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);

// Query DepositBase constant
const value = await api.constants.Multisig.DepositBase();
console.log("DepositBase:", value);
// Balance: divide by 10^9 for TAO
const tao = value / 1_000_000_000n;

DepositFactor

constant details

Per-signatory deposit factor.

Type: TaoBalance
Value: "32000000"
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);

// Query DepositFactor constant
const value = await api.constants.Multisig.DepositFactor();
console.log("DepositFactor:", value);
// Balance: divide by 10^9 for TAO
const tao = value / 1_000_000_000n;

MaxSignatories

constant details

Maximum signatories for a multisig.

Type: u32
Value: 100
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);

// Query MaxSignatories constant
const value = await api.constants.Multisig.MaxSignatories();
console.log("MaxSignatories:", value);

Errors 14

MinimumThreshold

error details #0

Threshold must be at least 2 for multisig operations.

Common Causes

  • Setting threshold to 1 (use regular calls instead)
  • Setting threshold to 0

How to Fix

Use threshold of 2 or higher for multisig,For single-signer operations, use regular calls

AlreadyApproved

error details #1

This signatory has already approved this multisig call.

Common Causes

  • Accidentally calling approve_as_multi twice
  • Signatory confusion about approval status

How to Fix

Check current approvals before submitting,Wait for other signatories to approve

NoApprovalsNeeded

error details #2

Threshold of 1 means no additional approvals needed.

Common Causes

  • Using approve_as_multi with threshold 1
  • Misconfigured multisig

How to Fix

Use as_multi_threshold_1 for single-signer calls,Set threshold to 2 or higher if multisig is intended

Thrown by: approve_as_multi

TooFewSignatories

error details #3

Not enough signatories provided for the multisig.

Common Causes

  • Signatory list shorter than threshold
  • Missing signatories in the list

How to Fix

Provide at least threshold number of signatories,Verify all intended signatories are included

TooManySignatories

error details #4

Signatory count exceeds the maximum allowed.

Common Causes

  • Adding too many signatories
  • Exceeding MaxSignatories constant

How to Fix

Reduce signatory count to MaxSignatories or less,Check MaxSignatories constant for the limit

SignatoriesOutOfOrder

error details #5

Signatories must be provided in sorted order.

Common Causes

  • Signatory addresses not sorted
  • Incorrect ordering of addresses

How to Fix

Sort signatory addresses in ascending order,Use lexicographic sorting on raw bytes

SenderInSignatories

error details #6

The sender should not be included in the signatories list.

Common Causes

  • Including caller's address in signatories
  • Confusion about who counts as a signatory

How to Fix

Remove the caller from the signatories list,Caller is implicitly counted as a signatory

NotFound

error details #7

No multisig operation found for this call hash.

Common Causes

  • Multisig operation was never created
  • Wrong call hash provided
  • Multisig was already executed or cancelled

How to Fix

Verify the call hash is correct,Check if the multisig was already completed,Create a new multisig operation if needed

NotOwner

error details #8

Caller is not an owner/signatory of this multisig.

Common Causes

  • Wrong account trying to approve/cancel
  • Account not in the original signatory list

How to Fix

Use an account that is a signatory,Verify the signatory list matches

Thrown by: cancel_as_multi

NoTimepoint

error details #9

A timepoint is required but was not provided.

Common Causes

  • Missing timepoint parameter
  • Calling approve without previous operation

How to Fix

Provide the timepoint from the original operation,Query Multisigs storage for the correct timepoint

WrongTimepoint

error details #10

The provided timepoint does not match the stored operation.

Common Causes

  • Using timepoint from a different operation
  • Timepoint changed due to re-creation

How to Fix

Query the correct timepoint from storage,Use the timepoint from the operation creation

UnexpectedTimepoint

error details #11

A timepoint was provided when none was expected.

Common Causes

  • Providing timepoint for new operation
  • Providing timepoint for as_multi_threshold_1

How to Fix

Omit timepoint for the first approval,Check if operation already exists

MaxWeightTooLow

error details #12

The maximum weight specified is too low for the call.

Common Causes

  • Underestimating call weight
  • Weight limits too restrictive

How to Fix

Increase the max_weight parameter,Estimate call weight more accurately

Thrown by: as_multi

AlreadyStored

error details #13

The call data is already stored on-chain.

Common Causes

  • Attempting to store call data twice
  • Operation already created with store_call=true

How to Fix

Use existing stored call instead,Omit call data and use call hash

Thrown by: as_multi