11// SPDX-License-Identifier: GPL-3.0
22pragma solidity ^ 0.8.20 ;
33
4- import {ERC165Checker } from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol " ;
54import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol " ;
65
76import {collectReturnData} from "../helpers/CollectReturnData.sol " ;
87import {MAX_VALIDATION_ASSOC_HOOKS} from "../helpers/Constants.sol " ;
9- import {IExecutionHookModule} from "../interfaces/IExecutionHookModule.sol " ;
108import {ExecutionManifest, ManifestExecutionHook} from "../interfaces/IExecutionModule.sol " ;
119import {
1210 HookConfig,
@@ -16,8 +14,6 @@ import {
1614 ValidationFlags
1715} from "../interfaces/IModularAccount.sol " ;
1816import {IModule} from "../interfaces/IModule.sol " ;
19- import {IValidationHookModule} from "../interfaces/IValidationHookModule.sol " ;
20- import {IValidationModule} from "../interfaces/IValidationModule.sol " ;
2117import {HookConfigLib} from "../libraries/HookConfigLib.sol " ;
2218import {KnownSelectorsLib} from "../libraries/KnownSelectorsLib.sol " ;
2319import {ModuleEntityLib} from "../libraries/ModuleEntityLib.sol " ;
@@ -152,7 +148,7 @@ abstract contract ModuleManagerInternals is IModularAccount {
152148 _storage.supportedIfaces[manifest.interfaceIds[i]] += 1 ;
153149 }
154150
155- _onInstall (module, moduleInstallData, type (IModule).interfaceId );
151+ _onInstall (module, moduleInstallData);
156152
157153 emit ExecutionInstalled (module, manifest);
158154 }
@@ -195,11 +191,8 @@ abstract contract ModuleManagerInternals is IModularAccount {
195191 emit ExecutionUninstalled (module, onUninstallSuccess, manifest);
196192 }
197193
198- function _onInstall (address module , bytes calldata data , bytes4 interfaceId ) internal {
194+ function _onInstall (address module , bytes calldata data ) internal {
199195 if (data.length > 0 ) {
200- if (! ERC165Checker .supportsInterface (module, interfaceId)) {
201- revert InterfaceNotSupported (module);
202- }
203196 // solhint-disable-next-line no-empty-blocks
204197 try IModule (module).onInstall (data) {}
205198 catch {
@@ -243,14 +236,14 @@ abstract contract ModuleManagerInternals is IModularAccount {
243236 revert PreValidationHookLimitExceeded ();
244237 }
245238
246- _onInstall (hookConfig.module (), hookData, type (IValidationHookModule).interfaceId );
239+ _onInstall (hookConfig.module (), hookData);
247240
248241 continue ;
249242 }
250243 // Hook is an execution hook
251244 _addExecHooks (_validationStorage.executionHooks, hookConfig);
252245
253- _onInstall (hookConfig.module (), hookData, type (IExecutionHookModule).interfaceId );
246+ _onInstall (hookConfig.module (), hookData);
254247 }
255248
256249 for (uint256 i = 0 ; i < selectors.length ; ++ i) {
@@ -262,7 +255,7 @@ abstract contract ModuleManagerInternals is IModularAccount {
262255
263256 _validationStorage.validationFlags = validationFlags;
264257
265- _onInstall (validationConfig.module (), installData, type (IValidationModule).interfaceId );
258+ _onInstall (validationConfig.module (), installData);
266259 emit ValidationInstalled (validationConfig.module (), validationConfig.entityId ());
267260 }
268261
0 commit comments