[][src]Crate pallet_utility

Utility Module

A module with helpers for dispatch management.

Overview

This module contains three basic pieces of functionality, two of which are stateless:

  • Batch dispatch: A stateless operation, allowing any origin to execute multiple calls in a single dispatch. This can be useful to amalgamate proposals, combining set_code with corresponding set_storages, for efficient multiple payouts with just a single signature verify, or in combination with one of the other two dispatch functionality.
  • Pseudonymal dispatch: A stateless operation, allowing a signed origin to execute a call from an alternative signed origin. Each account has 2**16 possible "pseudonyms" (alternative account IDs) and these can be stacked. This can be useful as a key management tool, where you need multiple distinct accounts (e.g. as controllers for many staking accounts), but where it's perfectly fine to have each of them controlled by the same underlying keypair.
  • Multisig dispatch (stateful): A potentially stateful operation, allowing multiple signed origins (accounts) to coordinate and dispatch a call from a well-known origin, derivable deterministically from the set of account IDs and the threshold number of accounts from the set that must approve it. In the case that the threshold is just one then this is a stateless operation. This is useful for multisig wallets where cryptographic threshold signatures are not available or desired.

Interface

Dispatchable Functions

For batch dispatch

  • batch - Dispatch multiple calls from the sender's origin.

For pseudonymal dispatch

  • as_sub - Dispatch a call from a secondary ("sub") signed origin.

For multisig dispatch

  • as_multi - Approve and if possible dispatch a call from a composite origin formed from a number of signed origins.
  • approve_as_multi - Approve a call from a composite origin.
  • cancel_as_multi - Cancel a call from a composite origin.

Structs

Module
Multisig

An open multisig operation.

Multisigs

The set of open multisig operations.

Timepoint

A global extrinsic index, formed as the extrinsic index within a block, together with that block's height. This allows a transaction in which a multisig operation of a particular composite was created to be uniquely identified.

Enums

Call

Dispatchable calls.

Error
RawEvent

Events for this module.

Traits

Trait

Configuration trait.

Type Definitions

Event

RawEvent specialized for the configuration Trait