Fallback Modules
Overview
Fallback modules handle incoming calls that do not match any known function signatures. These modules allow dynamic handling of unexpected interactions, often by reverting or logging them.
- Module Type ID:
MODULE_TYPE_FALLBACK
- Interface: Implements
IFallback
.
Interface
interface IFallback is IModule {}
Sample Fallback Modules
- Error Logger Fallback: Logs the details of unknown or failed transactions for further analysis.
- Emergency Stop Fallback: Pauses all wallet operations when an unknown or unauthorized function is called.
Installation and Uninstallation
All modules follow a similar installation and uninstallation process. When a module is installed or uninstalled, the corresponding onInstall
or onUninstall
functions are called with any necessary initialization or cleanup data.
Module Type Verification
Modules implement the isModuleType
function to verify their type (Validator, Executor, Hook, Fallback), as specified by their moduleTypeId
.