Contract Account Dynamic Upgrade

As we all know, Ethereum smart contracts do not inherently support upgrading or modifying the contract's code once deployed. This is because one of the key features of blockchain, and Ethereum in particular, is the immutability of the contract code once it is deployed on the blockchain. Obviously, this is not good news for us to do abstract accounts.

We are compatible with ERC-4337, but there may be situations similar to onERC721Received in the future, so we need to add the ability to upgrade our AA dynamically.

We designed a plug-in mechanism for adding plug-ins to AA.

The first to bear the brunt is Plug-in Registry and Wallet Factory. Wallet Factory is used to create AA, and Plug-in Registry is used to register plug-ins. When the Contract Account created by Wallet Factory cannot find the corresponding interface, it will find the corresponding plug-in through the Plug-in Registry. In addition, we also allow AA to register its own separate Plug-in.

Since we have the Plug-in mechanism, we can upgrade the contract dynamically. We believe this is a huge step forward for AA.

Last updated