diff --git a/src/account/AccountLoupe.sol b/src/account/AccountLoupe.sol index 44870e90..0593298a 100644 --- a/src/account/AccountLoupe.sol +++ b/src/account/AccountLoupe.sol @@ -20,7 +20,7 @@ abstract contract AccountLoupe is IAccountLoupe { using EnumerableSet for EnumerableSet.AddressSet; /// @inheritdoc IAccountLoupe - function getExecutionFunctionHandler(bytes4 selector) external view returns (address plugin) { + function getExecutionFunctionHandler(bytes4 selector) external view override returns (address plugin) { AccountStorage storage _storage = getAccountStorage(); if ( @@ -36,12 +36,17 @@ abstract contract AccountLoupe is IAccountLoupe { } /// @inheritdoc IAccountLoupe - function getValidationFunctions(bytes4 selector) external view returns (FunctionReference[] memory) { + function getValidations(bytes4 selector) external view override returns (FunctionReference[] memory) { return toFunctionReferenceArray(getAccountStorage().selectorData[selector].validations); } /// @inheritdoc IAccountLoupe - function getExecutionHooks(bytes4 selector) external view returns (ExecutionHook[] memory execHooks) { + function getExecutionHooks(bytes4 selector) + external + view + override + returns (ExecutionHook[] memory execHooks) + { SelectorData storage selectorData = getAccountStorage().selectorData[selector]; uint256 executionHooksLength = selectorData.executionHooks.length(); @@ -58,6 +63,7 @@ abstract contract AccountLoupe is IAccountLoupe { function getPreValidationHooks(bytes4 selector) external view + override returns (FunctionReference[] memory preValidationHooks) { preValidationHooks = @@ -65,7 +71,7 @@ abstract contract AccountLoupe is IAccountLoupe { } /// @inheritdoc IAccountLoupe - function getInstalledPlugins() external view returns (address[] memory pluginAddresses) { + function getInstalledPlugins() external view override returns (address[] memory pluginAddresses) { pluginAddresses = getAccountStorage().plugins.values(); } } diff --git a/src/interfaces/IAccountLoupe.sol b/src/interfaces/IAccountLoupe.sol index 91a648f1..b474149c 100644 --- a/src/interfaces/IAccountLoupe.sol +++ b/src/interfaces/IAccountLoupe.sol @@ -21,7 +21,7 @@ interface IAccountLoupe { /// @notice Get the validation functions for a selector. /// @param selector The selector to get the validation functions for. /// @return The validation functions for this selector. - function getValidationFunctions(bytes4 selector) external view returns (FunctionReference[] memory); + function getValidations(bytes4 selector) external view returns (FunctionReference[] memory); /// @notice Get the pre and post execution hooks for a selector. /// @param selector The selector to get the hooks for. diff --git a/test/account/AccountLoupe.t.sol b/test/account/AccountLoupe.t.sol index 43c7187f..a6ed44eb 100644 --- a/test/account/AccountLoupe.t.sol +++ b/test/account/AccountLoupe.t.sol @@ -77,7 +77,7 @@ contract AccountLoupeTest is AccountTestBase { } function test_pluginLoupe_getValidationFunctions() public { - FunctionReference[] memory validations = account1.getValidationFunctions(comprehensivePlugin.foo.selector); + FunctionReference[] memory validations = account1.getValidations(comprehensivePlugin.foo.selector); assertEq(validations.length, 1); assertEq( @@ -89,7 +89,7 @@ contract AccountLoupeTest is AccountTestBase { ) ); - validations = account1.getValidationFunctions(account1.execute.selector); + validations = account1.getValidations(account1.execute.selector); assertEq(validations.length, 1); assertEq(FunctionReference.unwrap(validations[0]), FunctionReference.unwrap(ownerValidation)); diff --git a/test/account/MultiValidation.t.sol b/test/account/MultiValidation.t.sol index 8d552d4e..9ca70857 100644 --- a/test/account/MultiValidation.t.sol +++ b/test/account/MultiValidation.t.sol @@ -45,8 +45,7 @@ contract MultiValidationTest is AccountTestBase { ); validations[1] = FunctionReferenceLib.pack(address(validator2), uint8(ISingleOwnerPlugin.FunctionId.VALIDATION_OWNER)); - FunctionReference[] memory validations2 = - account1.getValidationFunctions(IStandardExecutor.execute.selector); + FunctionReference[] memory validations2 = account1.getValidations(IStandardExecutor.execute.selector); assertEq(validations2.length, 2); assertEq(FunctionReference.unwrap(validations2[0]), FunctionReference.unwrap(validations[0])); assertEq(FunctionReference.unwrap(validations2[1]), FunctionReference.unwrap(validations[1]));