@@ -89,13 +89,13 @@ contract ReferenceModularAccount is
8989 // Wraps execution of a native function with runtime validation and hooks
9090 // Used for upgradeTo, upgradeToAndCall, execute, executeBatch, installExecution, uninstallExecution
9191 modifier wrapNativeFunction () {
92- (PostExecToRun[] memory postValidatorExecHooks , PostExecToRun[] memory postSelectorExecHooks ) =
92+ (PostExecToRun[] memory postExecHooksForEntity , PostExecToRun[] memory postExecHooksForSelector ) =
9393 _checkPermittedCallerAndAssociatedHooks ();
9494
9595 _;
9696
97- _doCachedPostExecHooks (postSelectorExecHooks );
98- _doCachedPostExecHooks (postValidatorExecHooks );
97+ _doCachedPostExecHooks (postExecHooksForSelector );
98+ _doCachedPostExecHooks (postExecHooksForEntity );
9999 }
100100
101101 constructor (IEntryPoint anEntryPoint ) {
@@ -115,7 +115,7 @@ contract ReferenceModularAccount is
115115 if (execModule == address (0 )) {
116116 revert UnrecognizedFunction (msg .sig );
117117 }
118- (PostExecToRun[] memory postValidatorExecHooks , PostExecToRun[] memory postSelectorExecHooks ) =
118+ (PostExecToRun[] memory postExecHooksForEntity , PostExecToRun[] memory postExecHooksForSelector ) =
119119 _checkPermittedCallerAndAssociatedHooks ();
120120
121121 // execute the function, bubbling up any reverts
@@ -128,8 +128,8 @@ contract ReferenceModularAccount is
128128 }
129129 }
130130
131- _doCachedPostExecHooks (postSelectorExecHooks );
132- _doCachedPostExecHooks (postValidatorExecHooks );
131+ _doCachedPostExecHooks (postExecHooksForSelector );
132+ _doCachedPostExecHooks (postExecHooksForEntity );
133133
134134 return execReturnData;
135135 }
@@ -144,7 +144,7 @@ contract ReferenceModularAccount is
144144
145145 ModuleEntity userOpValidationFunction = ModuleEntity.wrap (bytes24 (userOp.signature[:24 ]));
146146
147- PostExecToRun[] memory postValidatorExecHooks =
147+ PostExecToRun[] memory postExecHooksForEntity =
148148 _doPreHooks (getAccountStorage ().validationStorage[userOpValidationFunction].executionHooks, msg .data );
149149
150150 (bool success , bytes memory result ) = address (this ).call (userOp.callData[4 :]);
@@ -156,7 +156,7 @@ contract ReferenceModularAccount is
156156 }
157157 }
158158
159- _doCachedPostExecHooks (postValidatorExecHooks );
159+ _doCachedPostExecHooks (postExecHooksForEntity );
160160 }
161161
162162 /// @inheritdoc IModularAccount
@@ -207,8 +207,8 @@ contract ReferenceModularAccount is
207207
208208 _doRuntimeValidation (runtimeValidationFunction, data, authorization[25 :]);
209209
210- // If runtime validation passes, run exec hooks associated with the validator
211- PostExecToRun[] memory postValidatorExecHooks =
210+ // If runtime validation passes, run exec hooks associated with the entity
211+ PostExecToRun[] memory postExecHooksForEntity =
212212 _doPreHooks (getAccountStorage ().validationStorage[runtimeValidationFunction].executionHooks, data);
213213
214214 // Execute the call
@@ -220,7 +220,7 @@ contract ReferenceModularAccount is
220220 }
221221 }
222222
223- _doCachedPostExecHooks (postValidatorExecHooks );
223+ _doCachedPostExecHooks (postExecHooksForEntity );
224224
225225 return returnData;
226226 }
@@ -365,7 +365,7 @@ contract ReferenceModularAccount is
365365 isGlobalValidation ? ValidationCheckingType.GLOBAL : ValidationCheckingType.SELECTOR
366366 );
367367
368- // Check if there are execution hooks associated with the validator , and revert if the call isn't to
368+ // Check if there are execution hooks associated with the entity , and revert if the call isn't to
369369 // `executeUserOp`
370370 // This check must be here because if context isn't passed, we can't tell in execution which hooks should
371371 // have ran
@@ -549,16 +549,16 @@ contract ReferenceModularAccount is
549549 * directly call.
550550 * - Yes: Continue
551551 * - No: Revert, the caller is not allowed to call this selector
552- * 3. If there are runtime validation hooks associated with this caller-sig combination , run them.
553- * 4. Run the pre executionHooks associated with this caller-sig combination , and return the
552+ * 3. If there are runtime validation hooks associated with this entity , run them.
553+ * 4. Run the pre executionHooks associated with this entity , and return the
554554 * post executionHooks to run later.
555555 */
556556 function _checkPermittedCallerAndAssociatedHooks ()
557557 internal
558558 returns (PostExecToRun[] memory , PostExecToRun[] memory )
559559 {
560560 AccountStorage storage _storage = getAccountStorage ();
561- PostExecToRun[] memory postValidatorExecutionHooks ;
561+ PostExecToRun[] memory postExecHooksForEntity ;
562562
563563 // We only need to handle execution hooks when the sender is not the entry point or the account itself,
564564 // and the selector isn't public.
@@ -582,16 +582,16 @@ contract ReferenceModularAccount is
582582 _doPreRuntimeValidationHook (preRuntimeValidationHooks[i].moduleEntity (), msg .data , "" );
583583 }
584584
585- // Execution hooks associated with the validator
586- postValidatorExecutionHooks =
585+ // Execution hooks associated with the entity
586+ postExecHooksForEntity =
587587 _doPreHooks (_storage.validationStorage[directCallValidationKey].executionHooks, msg .data );
588588 }
589589
590590 // Exec hooks associated with the selector
591- PostExecToRun[] memory postSelectorExecutionHooks =
591+ PostExecToRun[] memory postExecHooksForSelector =
592592 _doPreHooks (_storage.executionStorage[msg .sig ].executionHooks, msg .data );
593593
594- return (postValidatorExecutionHooks, postSelectorExecutionHooks );
594+ return (postExecHooksForEntity, postExecHooksForSelector );
595595 }
596596
597597 function _execUserOpValidation (
0 commit comments