alchemyplatform / alchemyplatform/aa-sdk

FR: do not allow uninstall plug-in if only one installed - avoid bricked accounts

Open
#885 0 comments 2 reactions 1 assignee View on GitHub

@jaypaik is already working on this.

Since Jul 31, 2024.

Dominant language
TypeScript
Stars
321
Forks
231
Avg merge
43m
Merged PRs (30d)
3

Description

Is your feature request related to a problem? Please describe.
Bricked accounts can occur when uninstalling plug-ins if there is only 1 plug-in installed. For example, using a createAlchemyModularAccountClient will default install multi-owner plugin. If you uninstall this plugin in a single action, the account will no longer have a validation function and will become bricked.

Valid use case: adding on multi-sig functionality to a modular account

Describe the solution you would like

  • when calling uninstallPlugin actions, enforce that more than 1 plugin is installed, and throw if it's the last plugin
  • can use getInstalledPlugins().length == 1 for a check

Describe alternatives you have considered

  • Expose MA action that allows for simple switch from MA with one owner to multi-sig ownership (this will avoid requiring calldata to be encoded manually and can be exposed with account actions instead)
  • This should be a fast follow to the check for currently installed plugins

Additional context
Related discussion

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.