31 releases (18 major breaking)

new 20.0.0 Mar 26, 2023
19.0.0 Mar 5, 2023
18.0.0 Feb 26, 2023
17.0.0 Feb 19, 2023
2.0.0-alpha.5 Mar 24, 2020

#1167 in Magic Beans

Download history 90/week @ 2022-12-07 192/week @ 2022-12-14 88/week @ 2022-12-21 51/week @ 2022-12-28 39/week @ 2023-01-04 100/week @ 2023-01-11 108/week @ 2023-01-18 87/week @ 2023-01-25 140/week @ 2023-02-01 100/week @ 2023-02-08 153/week @ 2023-02-15 85/week @ 2023-02-22 71/week @ 2023-03-01 70/week @ 2023-03-08 126/week @ 2023-03-15 53/week @ 2023-03-22

327 downloads per month
Used in 2 crates

Apache-2.0

2MB
36K SLoC

Utility Module

A stateless module with helpers for dispatch management which does no re-authentication.

Overview

This module contains two basic pieces of functionality:

  • 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 * 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. Derivative accounts are, for the purposes of proxy filtering considered exactly the same as the oigin and are thus hampered with the origin's filters.

Since proxy filters are respected in all dispatches of this module, it should never need to be filtered by any proxy.

Interface

Dispatchable Functions

For batch dispatch

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

For pseudonymal dispatch

  • as_derivative - Dispatch a call from a derivative signed origin.

License: Apache-2.0

Dependencies

~8–43MB
~746K SLoC