22pragma solidity ^ 0.8.23 ;
33
44// Interface
5+
6+ import {IInstallationCallback} from "./interface/IInstallationCallback.sol " ;
57import {IModularCore} from "./interface/IModularCore.sol " ;
68import {IModularExtension} from "./interface/IModularExtension.sol " ;
7- import {IInstallationCallback} from "./interface/IInstallationCallback.sol " ;
89
910// Utils
1011import {Role} from "./Role.sol " ;
@@ -13,6 +14,7 @@ import {EnumerableSetLib} from "@solady/utils/EnumerableSetLib.sol";
1314import {ReentrancyGuard} from "@solady/utils/ReentrancyGuard.sol " ;
1415
1516abstract contract ModularCore is IModularCore , OwnableRoles , ReentrancyGuard {
17+
1618 using EnumerableSetLib for EnumerableSetLib.AddressSet;
1719
1820 /*//////////////////////////////////////////////////////////////
@@ -147,8 +149,12 @@ abstract contract ModularCore is IModularCore, OwnableRoles, ReentrancyGuard {
147149
148150 /// @notice Returns whether a given interface is implemented by the contract.
149151 function supportsInterface (bytes4 interfaceId ) public view virtual returns (bool ) {
150- if (interfaceId == 0xffffffff ) return false ;
151- if (supportedInterfaceRefCounter[interfaceId] > 0 ) return true ;
152+ if (interfaceId == 0xffffffff ) {
153+ return false ;
154+ }
155+ if (supportedInterfaceRefCounter[interfaceId] > 0 ) {
156+ return true ;
157+ }
152158 return false ;
153159 }
154160
@@ -158,8 +164,12 @@ abstract contract ModularCore is IModularCore, OwnableRoles, ReentrancyGuard {
158164
159165 /// @notice Returns whether a given interface is implemented by the contract.
160166 function _supportsInterfaceViaExtensions (bytes4 interfaceId ) internal view virtual returns (bool ) {
161- if (interfaceId == 0xffffffff ) return false ;
162- if (supportedInterfaceRefCounter[interfaceId] > 0 ) return true ;
167+ if (interfaceId == 0xffffffff ) {
168+ return false ;
169+ }
170+ if (supportedInterfaceRefCounter[interfaceId] > 0 ) {
171+ return true ;
172+ }
163173 return false ;
164174 }
165175
@@ -208,7 +218,9 @@ abstract contract ModularCore is IModularCore, OwnableRoles, ReentrancyGuard {
208218 break ;
209219 }
210220 }
211- if (! supported) revert CallbackFunctionNotSupported ();
221+ if (! supported) {
222+ revert CallbackFunctionNotSupported ();
223+ }
212224
213225 functionData_[callbackFunction.selector ] =
214226 InstalledFunction ({implementation: _extension, permissionBits: 0 , fnType: FunctionType.CALLBACK});
@@ -388,4 +400,5 @@ abstract contract ModularCore is IModularCore, OwnableRoles, ReentrancyGuard {
388400 }
389401 }
390402 }
403+
391404}
0 commit comments