The Main Module Upgradeable is a key contract in the wallet system, allowing for seamless upgrades without changing the wallet address.
MainModule
is used as the initial code implementation.
This module uses the counterfactual address of the wallet to validate the imageHash
of the wallet configuration.
When the wallet configuration is updated, the MainModule
will automatically replace the wallet code implementation with MainModuleUpgradeable
, while handling the storage initialization.