alchemyplatform / alchemyplatform/aa-sdk
FR: do not allow uninstall plug-in if only one installed - avoid bricked accounts
@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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.