IERC7579ModuleConfig
ERC-7579 Module Config. Accounts should implement this interface to allow installing and uninstalling modules.
Functions
installModule
Installs a Module of a certain type on the smart account
function installModule(uint256 moduleTypeId, address module, bytes calldata initData) external;
Parameters
| Name | Type | Description |
|---|---|---|
moduleTypeId | uint256 | the module type ID according to the ERC-7579 spec |
module | address | the module address |
initData | bytes | arbitrary data that may be passed to the module during onInstall initialization. MUST implement authorization control MUST call onInstall on the module with the initData parameter if provided MUST emit ModuleInstalled event MUST revert if the module is already installed or the initialization on the module failed |
uninstallModule
Uninstalls a Module of a certain type on the smart account
function uninstallModule(uint256 moduleTypeId, address module, bytes calldata deInitData) external;
Parameters
| Name | Type | Description |
|---|---|---|
moduleTypeId | uint256 | the module type ID according the ERC-7579 spec |
module | address | the module address |
deInitData | bytes | arbitrary data that may be passed to the module during onUninstall deinitialization. MUST implement authorization control MUST call onUninstall on the module with the deInitData parameter if provided MUST emit ModuleUninstalled event MUST revert if the module is not installed or the deInitialization on the module failed |
isModuleInstalled
Returns whether a module is installed on the smart account
function isModuleInstalled(uint256 moduleTypeId, address module, bytes calldata additionalContext)
external
view
returns (bool);
Parameters
| Name | Type | Description |
|---|---|---|
moduleTypeId | uint256 | the module type ID according the ERC-7579 spec |
module | address | the module address |
additionalContext | bytes | arbitrary data that may be passed to determine if the module is installed MUST return true if the module is installed and false otherwise |
Events
ModuleInstalled
event ModuleInstalled(uint256 moduleTypeId, address module);
ModuleUninstalled
event ModuleUninstalled(uint256 moduleTypeId, address module);