diff --git a/src/SsoAccount.sol b/src/SsoAccount.sol index adbf2da4..4a1b1635 100644 --- a/src/SsoAccount.sol +++ b/src/SsoAccount.sol @@ -11,7 +11,6 @@ import { Utils } from "@matterlabs/zksync-contracts/l2/system-contracts/librarie import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { HookManager } from "./managers/HookManager.sol"; -import { ModuleManager } from "./managers/ModuleManager.sol"; import { TokenCallbackHandler, IERC165 } from "./helpers/TokenCallbackHandler.sol"; @@ -30,15 +29,7 @@ import { ISsoAccount } from "./interfaces/ISsoAccount.sol"; /// @notice This contract is a modular and extensible account implementation with support of /// multi-ownership, custom modules, validation/execution hooks and different signature validation formats. /// @dev Contract is expected to be used as Beacon proxy implementation. -contract SsoAccount is - Initializable, - HookManager, - ModuleManager, - ERC1271Handler, - TokenCallbackHandler, - BatchCaller, - ISsoAccount -{ +contract SsoAccount is Initializable, HookManager, ERC1271Handler, TokenCallbackHandler, BatchCaller, ISsoAccount { // Helper library for the Transaction struct using TransactionHelper for Transaction; diff --git a/src/interfaces/IModuleManager.sol b/src/interfaces/IModuleManager.sol deleted file mode 100644 index 108acce7..00000000 --- a/src/interfaces/IModuleManager.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.24; - -/** - * @title Interface of the manager contract for modules - * @author https://getclave.io - */ -interface IModuleManager { - /** - * @notice Event emitted when a module is removed - * @param module address - Address of the removed module - */ - event RemoveModule(address indexed module); -} diff --git a/src/interfaces/ISsoAccount.sol b/src/interfaces/ISsoAccount.sol index b26acac9..36ae812a 100644 --- a/src/interfaces/ISsoAccount.sol +++ b/src/interfaces/ISsoAccount.sol @@ -9,7 +9,6 @@ import { IERC721Receiver } from "@openzeppelin/contracts/token/ERC721/IERC721Rec import { IERC1155Receiver } from "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; import { IHookManager } from "./IHookManager.sol"; -import { IModuleManager } from "./IModuleManager.sol"; import { IOwnerManager } from "./IOwnerManager.sol"; import { IValidatorManager } from "./IValidatorManager.sol"; @@ -23,7 +22,6 @@ interface ISsoAccount is IERC721Receiver, IERC1155Receiver, IHookManager, - IModuleManager, IOwnerManager, IValidatorManager, IAccount diff --git a/src/managers/ModuleManager.sol b/src/managers/ModuleManager.sol deleted file mode 100644 index 6e41c83d..00000000 --- a/src/managers/ModuleManager.sol +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.24; - -import { ERC165Checker } from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; -import { ExcessivelySafeCall } from "@nomad-xyz/excessively-safe-call/src/ExcessivelySafeCall.sol"; - -import { SsoStorage } from "../libraries/SsoStorage.sol"; -import { Auth } from "../auth/Auth.sol"; -import { AddressLinkedList } from "../libraries/LinkedList.sol"; -import { Errors } from "../libraries/Errors.sol"; -import { IInitable } from "../interfaces/IInitable.sol"; -import { ISsoAccount } from "../interfaces/ISsoAccount.sol"; -import { IModuleManager } from "../interfaces/IModuleManager.sol"; -import { IModuleValidator } from "../interfaces/IModuleValidator.sol"; - -/** - * @title Manager contract for modules - * @notice Abstract contract for managing the enabled modules of the account - * @dev Module addresses are stored in a linked list - * @author https://getclave.io - */ -abstract contract ModuleManager is IModuleManager, Auth { - // Helper library for address to address mappings - using AddressLinkedList for mapping(address => address); - // Interface helper library - using ERC165Checker for address; - // Low level calls helper library - using ExcessivelySafeCall for address; - - function _supportsModule(address module) internal view returns (bool) { - // this is pretty dumb, since type(IModule).interfaceId is 0x00000000, but is correct as per ERC165 - // context: https://github.com/ethereum/solidity/issues/7856#issuecomment-585337461 - return module.supportsInterface(type(IModuleValidator).interfaceId); - } -}