-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Context
Current multisig functionality is based on associated keys which can be configured for an account and used to sign deploys.
This approach exposes key management functions through a WASM runtime API, which means that setting up and managing multisig for an account requires writing and deploying WASM. This is somewhat inconvenient and potentially error-prone, since the API is very granular and it's relatively easy to render an account unusable (for example by upping action thresholds before key weights).
Goal
The goal of this task is to add a system contract for managing associated keys etc. similar to the auction contract and others.
This new contract does not necessarily have to be a 1:1 translation of the existing solution, but could instead expose methods for handling common use-cases, for example setup_account_recovery, setup_action_thresholds etc.
References
- there are already some functionalities with similar parallel implementations, for example
mint_nativeandmint_internal - it can be a trait (something like
KeyManagementProvider) that we then implement for WASMRuntimeandRuntimeNative - keep in mind that this implementation can be simplified compared to existing WASM one since there will no longer be a need to validate everything in each function
- use
TransactionCategory::Entity