@@ -44,30 +44,7 @@ abstract contract AccountLoupe is IAccountLoupe {
4444
4545 /// @inheritdoc IAccountLoupe
4646 function getExecutionHooks (bytes4 selector ) external view returns (ExecutionHooks[] memory execHooks ) {
47- execHooks = _getHooks (getAccountStorage ().selectorData[selector].executionHooks);
48- }
49-
50- /// @inheritdoc IAccountLoupe
51- function getPreValidationHooks (bytes4 selector )
52- external
53- view
54- returns (
55- FunctionReference[] memory preUserOpValidationHooks ,
56- FunctionReference[] memory preRuntimeValidationHooks
57- )
58- {
59- preUserOpValidationHooks =
60- toFunctionReferenceArray (getAccountStorage ().selectorData[selector].preUserOpValidationHooks);
61- preRuntimeValidationHooks =
62- toFunctionReferenceArray (getAccountStorage ().selectorData[selector].preRuntimeValidationHooks);
63- }
64-
65- /// @inheritdoc IAccountLoupe
66- function getInstalledPlugins () external view returns (address [] memory pluginAddresses ) {
67- pluginAddresses = getAccountStorage ().plugins.values ();
68- }
69-
70- function _getHooks (HookGroup storage hooks ) internal view returns (ExecutionHooks[] memory execHooks ) {
47+ HookGroup storage hooks = getAccountStorage ().selectorData[selector].executionHooks;
7148 uint256 preExecHooksLength = hooks.preHooks.length ();
7249 uint256 postOnlyExecHooksLength = hooks.postOnlyHooks.length ();
7350 uint256 maxExecHooksLength = postOnlyExecHooksLength;
@@ -129,4 +106,24 @@ abstract contract AccountLoupe is IAccountLoupe {
129106 mstore (execHooks, actualExecHooksLength)
130107 }
131108 }
109+
110+ /// @inheritdoc IAccountLoupe
111+ function getPreValidationHooks (bytes4 selector )
112+ external
113+ view
114+ returns (
115+ FunctionReference[] memory preUserOpValidationHooks ,
116+ FunctionReference[] memory preRuntimeValidationHooks
117+ )
118+ {
119+ preUserOpValidationHooks =
120+ toFunctionReferenceArray (getAccountStorage ().selectorData[selector].preUserOpValidationHooks);
121+ preRuntimeValidationHooks =
122+ toFunctionReferenceArray (getAccountStorage ().selectorData[selector].preRuntimeValidationHooks);
123+ }
124+
125+ /// @inheritdoc IAccountLoupe
126+ function getInstalledPlugins () external view returns (address [] memory pluginAddresses ) {
127+ pluginAddresses = getAccountStorage ().plugins.values ();
128+ }
132129}
0 commit comments