Skip to content

Commit ec59fe8

Browse files
adamegyedhowydev
andauthored
feat: start updating spec for v0.8 (#150)
Co-authored-by: howy <[email protected]>
1 parent e2211d1 commit ec59fe8

File tree

6 files changed

+79
-198
lines changed

6 files changed

+79
-198
lines changed

src/account/ModuleManagerInternals.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ abstract contract ModuleManagerInternals is IModularAccount {
286286
revert ArrayLengthMismatch();
287287
}
288288

289-
// Hook uninstall data is provided in the order of pre-validation hooks, then permission hooks.
289+
// Hook uninstall data is provided in the order of pre validation hooks, then permission hooks.
290290
uint256 hookIndex = 0;
291291
for (uint256 i = 0; i < _validationData.preValidationHooks.length; ++i) {
292292
bytes calldata hookData = hookUninstallDatas[hookIndex];

src/account/ReferenceModularAccount.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ contract ReferenceModularAccount is
442442
}
443443
}
444444

445-
// Run the pre hooks and copy their return data to the post hooks array, if an associated post-exec hook
445+
// Run the pre hooks and copy their return data to the post hooks array, if an associated post exec hook
446446
// exists.
447447
for (uint256 i = 0; i < hooksLength; ++i) {
448448
HookConfig hookConfig = toHookConfig(executionHooks.at(i));
@@ -452,7 +452,7 @@ contract ReferenceModularAccount is
452452

453453
preExecHookReturnData = _runPreExecHook(hookConfig.moduleEntity(), data);
454454

455-
// If there is an associated post-exec hook, save the return data.
455+
// If there is an associated post exec hook, save the return data.
456456
if (hookConfig.hasPostHook()) {
457457
postHooksToRun[i].preExecHookReturnData = preExecHookReturnData;
458458
}
@@ -523,15 +523,15 @@ contract ReferenceModularAccount is
523523
/**
524524
* Order of operations:
525525
* 1. Check if the sender is the entry point, the account itself, or the selector called is public.
526-
* - Yes: Return an empty array, there are no post-permissionHooks.
526+
* - Yes: Return an empty array, there are no post permissionHooks.
527527
* - No: Continue
528528
* 2. Check if the called selector (msg.sig) is included in the set of selectors the msg.sender can
529529
* directly call.
530530
* - Yes: Continue
531531
* - No: Revert, the caller is not allowed to call this selector
532532
* 3. If there are runtime validation hooks associated with this caller-sig combination, run them.
533-
* 4. Run the pre-permissionHooks associated with this caller-sig combination, and return the
534-
* post-permissionHooks to run later.
533+
* 4. Run the pre permissionHooks associated with this caller-sig combination, and return the
534+
* post permissionHooks to run later.
535535
*/
536536
function _checkPermittedCallerAndAssociatedHooks()
537537
internal

src/helpers/Constants.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pragma solidity ^0.8.25;
44
// Index marking the start of the data for the validation function.
55
uint8 constant RESERVED_VALIDATION_DATA_INDEX = type(uint8).max;
66

7-
// Maximum number of pre-validation hooks that can be registered.
7+
// Maximum number of pre validation hooks that can be registered.
88
uint8 constant MAX_PRE_VALIDATION_HOOKS = type(uint8).max;
99

1010
// Magic value for the Entity ID of direct call validation.

src/interfaces/IModularAccount.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ interface IModularAccount {
6565
/// @param selectors The selectors to install the validation function for.
6666
/// @param installData Optional data to be decoded and used by the module to setup initial module state.
6767
/// @param hooks Optional hooks to install, associated with the validation function. These may be
68-
/// pre-validation hooks or execution hooks. The expected format is a bytes26 HookConfig, followed by the
68+
/// pre validation hooks or execution hooks. The expected format is a bytes26 HookConfig, followed by the
6969
/// install data, if any.
7070
function installValidation(
7171
ValidationConfig validationConfig,
@@ -79,8 +79,8 @@ interface IModularAccount {
7979
/// @param uninstallData Optional data to be decoded and used by the module to clear module data for the
8080
/// account.
8181
/// @param hookUninstallData Optional data to be used by hooks for cleanup. If any are provided, the array must
82-
/// be of a length equal to existing pre-validation hooks plus permission hooks. Hooks are indexed by
83-
/// pre-validation hook order first, then permission hooks.
82+
/// be of a length equal to existing pre validation hooks plus permission hooks. Hooks are indexed by
83+
/// pre validation hook order first, then permission hooks.
8484
function uninstallValidation(
8585
ModuleEntity validationFunction,
8686
bytes calldata uninstallData,

0 commit comments

Comments
 (0)