diff --git a/src/account/ModuleManagerInternals.sol b/src/account/ModuleManagerInternals.sol index 6b5e9ad2..a82a6764 100644 --- a/src/account/ModuleManagerInternals.sol +++ b/src/account/ModuleManagerInternals.sol @@ -5,7 +5,7 @@ import {ERC165Checker} from "@openzeppelin/contracts/utils/introspection/ERC165C import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import {collectReturnData} from "../helpers/CollectReturnData.sol"; -import {MAX_PRE_VALIDATION_HOOKS} from "../helpers/Constants.sol"; +import {MAX_VALIDATION_ASSOC_HOOKS} from "../helpers/Constants.sol"; import {IExecutionHookModule} from "../interfaces/IExecutionHookModule.sol"; import {ExecutionManifest, ManifestExecutionHook} from "../interfaces/IExecutionModule.sol"; import {HookConfig, IModularAccount, ModuleEntity, ValidationConfig} from "../interfaces/IModularAccount.sol"; @@ -236,7 +236,7 @@ abstract contract ModuleManagerInternals is IModularAccount { _validationStorage.validationHooks.push(hookConfig); // Avoid collision between reserved index and actual indices - if (_validationStorage.validationHooks.length > MAX_PRE_VALIDATION_HOOKS) { + if (_validationStorage.validationHooks.length > MAX_VALIDATION_ASSOC_HOOKS) { revert PreValidationHookLimitExceeded(); } diff --git a/src/helpers/Constants.sol b/src/helpers/Constants.sol index 61f2b730..2c047d31 100644 --- a/src/helpers/Constants.sol +++ b/src/helpers/Constants.sol @@ -4,8 +4,8 @@ pragma solidity ^0.8.20; // Index marking the start of the data for the validation function. uint8 constant RESERVED_VALIDATION_DATA_INDEX = type(uint8).max; -// Maximum number of pre validation hooks that can be registered. -uint8 constant MAX_PRE_VALIDATION_HOOKS = type(uint8).max; +// Maximum number of validation-associated hooks that can be registered. +uint8 constant MAX_VALIDATION_ASSOC_HOOKS = type(uint8).max; // Magic value for the Entity ID of direct call validation. uint32 constant DIRECT_CALL_VALIDATION_ENTITYID = type(uint32).max;