From 5b3e04b3802b325dfcf6697959cb864d7b911a8f Mon Sep 17 00:00:00 2001 From: adam Date: Wed, 17 Apr 2024 15:49:34 -0400 Subject: [PATCH 1/3] Remove unchecked loop increments --- src/account/AccountLoupe.sol | 15 +-- src/account/AccountStorage.sol | 6 +- src/account/PluginManagerInternals.sol | 117 ++++------------------ src/account/UpgradeableModularAccount.sol | 44 ++------ 4 files changed, 35 insertions(+), 147 deletions(-) diff --git a/src/account/AccountLoupe.sol b/src/account/AccountLoupe.sol index 8b6f42a2..c3b8055c 100644 --- a/src/account/AccountLoupe.sol +++ b/src/account/AccountLoupe.sol @@ -47,11 +47,10 @@ abstract contract AccountLoupe is IAccountLoupe { uint256 maxExecHooksLength = postOnlyExecHooksLength; // There can only be as many associated post hooks to run as there are pre hooks. - for (uint256 i = 0; i < preExecHooksLength;) { + for (uint256 i = 0; i < preExecHooksLength; ++i) { (, uint256 count) = selectorData.preHooks.at(i); unchecked { maxExecHooksLength += (count + 1); - ++i; } } @@ -59,20 +58,19 @@ abstract contract AccountLoupe is IAccountLoupe { execHooks = new ExecutionHooks[](maxExecHooksLength); uint256 actualExecHooksLength; - for (uint256 i = 0; i < preExecHooksLength;) { + for (uint256 i = 0; i < preExecHooksLength; ++i) { (bytes32 key,) = selectorData.preHooks.at(i); FunctionReference preExecHook = FunctionReference.wrap(bytes21(key)); uint256 associatedPostExecHooksLength = selectorData.associatedPostHooks[preExecHook].length(); if (associatedPostExecHooksLength > 0) { - for (uint256 j = 0; j < associatedPostExecHooksLength;) { + for (uint256 j = 0; j < associatedPostExecHooksLength; ++j) { execHooks[actualExecHooksLength].preExecHook = preExecHook; (key,) = selectorData.associatedPostHooks[preExecHook].at(j); execHooks[actualExecHooksLength].postExecHook = FunctionReference.wrap(bytes21(key)); unchecked { ++actualExecHooksLength; - ++j; } } } else { @@ -82,19 +80,14 @@ abstract contract AccountLoupe is IAccountLoupe { ++actualExecHooksLength; } } - - unchecked { - ++i; - } } - for (uint256 i = 0; i < postOnlyExecHooksLength;) { + for (uint256 i = 0; i < postOnlyExecHooksLength; ++i) { (bytes32 key,) = selectorData.postOnlyHooks.at(i); execHooks[actualExecHooksLength].postExecHook = FunctionReference.wrap(bytes21(key)); unchecked { ++actualExecHooksLength; - ++i; } } diff --git a/src/account/AccountStorage.sol b/src/account/AccountStorage.sol index deb31228..34961442 100644 --- a/src/account/AccountStorage.sol +++ b/src/account/AccountStorage.sol @@ -83,13 +83,9 @@ function toFunctionReferenceArray(EnumerableMap.Bytes32ToUintMap storage map) { uint256 length = map.length(); FunctionReference[] memory result = new FunctionReference[](length); - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { (bytes32 key,) = map.at(i); result[i] = FunctionReference.wrap(bytes21(key)); - - unchecked { - ++i; - } } return result; } diff --git a/src/account/PluginManagerInternals.sol b/src/account/PluginManagerInternals.sol index dc5fbb8a..c9b2b18f 100644 --- a/src/account/PluginManagerInternals.sol +++ b/src/account/PluginManagerInternals.sol @@ -209,7 +209,7 @@ abstract contract PluginManagerInternals is IPluginManager { } uint256 length = dependencies.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { // Check the dependency interface id over the address of the dependency. (address dependencyAddr,) = dependencies[i].unpack(); @@ -225,10 +225,6 @@ abstract contract PluginManagerInternals is IPluginManager { // Increment the dependency's dependents counter. _storage.pluginData[dependencyAddr].dependentCount += 1; - - unchecked { - ++i; - } } // Add the plugin metadata to the account @@ -243,24 +239,16 @@ abstract contract PluginManagerInternals is IPluginManager { } length = manifest.executionFunctions.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { _setExecutionFunction(manifest.executionFunctions[i], plugin); - - unchecked { - ++i; - } } // Add installed plugin and selectors this plugin can call length = manifest.permittedExecutionSelectors.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { // If there are duplicates, this will just enable the flag again. This is not a problem, since the // boolean will be set to false twice during uninstall, which is fine. _storage.callPermitted[getPermittedCallKey(plugin, manifest.permittedExecutionSelectors[i])] = true; - - unchecked { - ++i; - } } // Add the permitted external calls to the account. @@ -269,7 +257,7 @@ abstract contract PluginManagerInternals is IPluginManager { } else { // Only store the specific permitted external calls if "permit any" flag was not set. length = manifest.permittedExternalCalls.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { ManifestExternalCallPermission memory externalCallPermission = manifest.permittedExternalCalls[i]; PermittedExternalCallData storage permittedExternalCallData = @@ -281,23 +269,15 @@ abstract contract PluginManagerInternals is IPluginManager { permittedExternalCallData.anySelectorPermitted = true; } else { uint256 externalContractSelectorsLength = externalCallPermission.selectors.length; - for (uint256 j = 0; j < externalContractSelectorsLength;) { + for (uint256 j = 0; j < externalContractSelectorsLength; ++j) { permittedExternalCallData.permittedSelectors[externalCallPermission.selectors[j]] = true; - - unchecked { - ++j; - } } } - - unchecked { - ++i; - } } } length = manifest.validationFunctions.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { ManifestAssociatedFunction memory mv = manifest.validationFunctions[i]; _addValidationFunction( mv.executionSelector, @@ -308,17 +288,13 @@ abstract contract PluginManagerInternals is IPluginManager { ManifestAssociatedFunctionType.RUNTIME_VALIDATION_ALWAYS_ALLOW ) ); - - unchecked { - ++i; - } } // Hooks are not allowed to be provided as dependencies, so we use an empty array for resolving them. FunctionReference[] memory emptyDependencies; length = manifest.preUserOpValidationHooks.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { ManifestAssociatedFunction memory mh = manifest.preUserOpValidationHooks[i]; _addPreUserOpValidationHook( mh.executionSelector, @@ -329,14 +305,10 @@ abstract contract PluginManagerInternals is IPluginManager { ManifestAssociatedFunctionType.PRE_HOOK_ALWAYS_DENY ) ); - - unchecked { - ++i; - } } length = manifest.preRuntimeValidationHooks.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { ManifestAssociatedFunction memory mh = manifest.preRuntimeValidationHooks[i]; _addPreRuntimeValidationHook( mh.executionSelector, @@ -347,13 +319,10 @@ abstract contract PluginManagerInternals is IPluginManager { ManifestAssociatedFunctionType.PRE_HOOK_ALWAYS_DENY ) ); - unchecked { - ++i; - } } length = manifest.executionHooks.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { ManifestExecutionHook memory mh = manifest.executionHooks[i]; _addExecHooks( mh.executionSelector, @@ -364,18 +333,11 @@ abstract contract PluginManagerInternals is IPluginManager { mh.postExecHook, plugin, emptyDependencies, ManifestAssociatedFunctionType.NONE ) ); - - unchecked { - ++i; - } } length = manifest.interfaceIds.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { _storage.supportedIfaces[manifest.interfaceIds[i]] += 1; - unchecked { - ++i; - } } // Initialize the plugin storage for the account. @@ -412,16 +374,12 @@ abstract contract PluginManagerInternals is IPluginManager { // Remove this plugin as a dependent from its dependencies. FunctionReference[] memory dependencies = _storage.pluginData[plugin].dependencies; uint256 length = dependencies.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { FunctionReference dependency = dependencies[i]; (address dependencyAddr,) = dependency.unpack(); // Decrement the dependent count for the dependency function. _storage.pluginData[dependencyAddr].dependentCount -= 1; - - unchecked { - ++i; - } } // Remove components according to the manifest, in reverse order (by component type) of their installation. @@ -430,7 +388,7 @@ abstract contract PluginManagerInternals is IPluginManager { FunctionReference[] memory emptyDependencies; length = manifest.executionHooks.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { ManifestExecutionHook memory mh = manifest.executionHooks[i]; _removeExecHooks( mh.executionSelector, @@ -441,14 +399,10 @@ abstract contract PluginManagerInternals is IPluginManager { mh.postExecHook, plugin, emptyDependencies, ManifestAssociatedFunctionType.NONE ) ); - - unchecked { - ++i; - } } length = manifest.preRuntimeValidationHooks.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { ManifestAssociatedFunction memory mh = manifest.preRuntimeValidationHooks[i]; _removePreRuntimeValidationHook( mh.executionSelector, @@ -459,14 +413,10 @@ abstract contract PluginManagerInternals is IPluginManager { ManifestAssociatedFunctionType.PRE_HOOK_ALWAYS_DENY ) ); - - unchecked { - ++i; - } } length = manifest.preUserOpValidationHooks.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { ManifestAssociatedFunction memory mh = manifest.preUserOpValidationHooks[i]; _removePreUserOpValidationHook( mh.executionSelector, @@ -477,14 +427,10 @@ abstract contract PluginManagerInternals is IPluginManager { ManifestAssociatedFunctionType.PRE_HOOK_ALWAYS_DENY ) ); - - unchecked { - ++i; - } } length = manifest.validationFunctions.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { ManifestAssociatedFunction memory mv = manifest.validationFunctions[i]; _removeValidationFunction( mv.executionSelector, @@ -495,10 +441,6 @@ abstract contract PluginManagerInternals is IPluginManager { ManifestAssociatedFunctionType.RUNTIME_VALIDATION_ALWAYS_ALLOW ) ); - - unchecked { - ++i; - } } // remove external call permissions @@ -509,7 +451,7 @@ abstract contract PluginManagerInternals is IPluginManager { } else { // Only clear the specific permitted external calls if "permit any" flag was not set. length = manifest.permittedExternalCalls.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { ManifestExternalCallPermission memory externalCallPermission = manifest.permittedExternalCalls[i]; PermittedExternalCallData storage permittedExternalCallData = @@ -522,45 +464,26 @@ abstract contract PluginManagerInternals is IPluginManager { permittedExternalCallData.anySelectorPermitted = false; } else { uint256 externalContractSelectorsLength = externalCallPermission.selectors.length; - for (uint256 j = 0; j < externalContractSelectorsLength;) { + for (uint256 j = 0; j < externalContractSelectorsLength; ++j) { permittedExternalCallData.permittedSelectors[externalCallPermission.selectors[j]] = false; - - unchecked { - ++j; - } } } - - unchecked { - ++i; - } } } length = manifest.permittedExecutionSelectors.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { _storage.callPermitted[getPermittedCallKey(plugin, manifest.permittedExecutionSelectors[i])] = false; - - unchecked { - ++i; - } } length = manifest.executionFunctions.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { _removeExecutionFunction(manifest.executionFunctions[i]); - - unchecked { - ++i; - } } length = manifest.interfaceIds.length; - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { _storage.supportedIfaces[manifest.interfaceIds[i]] -= 1; - unchecked { - ++i; - } } // Remove the plugin metadata from the account. diff --git a/src/account/UpgradeableModularAccount.sol b/src/account/UpgradeableModularAccount.sol index 24a87ea1..e3c4d0ff 100644 --- a/src/account/UpgradeableModularAccount.sol +++ b/src/account/UpgradeableModularAccount.sol @@ -101,12 +101,8 @@ contract UpgradeableModularAccount is FunctionReference[] memory emptyDependencies = new FunctionReference[](0); - for (uint256 i = 0; i < length;) { + for (uint256 i = 0; i < length; ++i) { _installPlugin(plugins[i], manifestHashes[i], pluginInstallDatas[i], emptyDependencies); - - unchecked { - ++i; - } } emit ModularAccountInitialized(_ENTRY_POINT); @@ -166,12 +162,8 @@ contract UpgradeableModularAccount is uint256 callsLength = calls.length; results = new bytes[](callsLength); - for (uint256 i = 0; i < callsLength;) { + for (uint256 i = 0; i < callsLength; ++i) { results[i] = _exec(calls[i].target, calls[i].value, calls[i].data); - - unchecked { - ++i; - } } } @@ -359,7 +351,7 @@ contract UpgradeableModularAccount is getAccountStorage().selectorData[selector].preUserOpValidationHooks; uint256 preUserOpValidationHooksLength = preUserOpValidationHooks.length(); - for (uint256 i = 0; i < preUserOpValidationHooksLength;) { + for (uint256 i = 0; i < preUserOpValidationHooksLength; ++i) { (bytes32 key,) = preUserOpValidationHooks.at(i); FunctionReference preUserOpValidationHook = _toFunctionReference(key); @@ -376,10 +368,6 @@ contract UpgradeableModularAccount is // Function reference cannot be 0 and _RUNTIME_VALIDATION_ALWAYS_ALLOW is not permitted here. revert InvalidConfiguration(); } - - unchecked { - ++i; - } } // Run the user op validationFunction @@ -412,7 +400,7 @@ contract UpgradeableModularAccount is getAccountStorage().selectorData[msg.sig].preRuntimeValidationHooks; uint256 preRuntimeValidationHooksLength = preRuntimeValidationHooks.length(); - for (uint256 i = 0; i < preRuntimeValidationHooksLength;) { + for (uint256 i = 0; i < preRuntimeValidationHooksLength; ++i) { (bytes32 key,) = preRuntimeValidationHooks.at(i); FunctionReference preRuntimeValidationHook = _toFunctionReference(key); @@ -423,10 +411,6 @@ contract UpgradeableModularAccount is catch (bytes memory revertReason) { revert PreRuntimeValidationHookFailed(plugin, functionId, revertReason); } - - unchecked { - ++i; - } } else { if (preRuntimeValidationHook.eq(FunctionReferenceLib._PRE_HOOK_ALWAYS_DENY)) { revert AlwaysDenyRule(); @@ -466,11 +450,10 @@ contract UpgradeableModularAccount is uint256 maxPostExecHooksLength = postOnlyHooksLength; // There can only be as many associated post hooks to run as there are pre hooks. - for (uint256 i = 0; i < preExecHooksLength;) { + for (uint256 i = 0; i < preExecHooksLength; ++i) { (, uint256 count) = selectorData.preHooks.at(i); unchecked { maxPostExecHooksLength += (count + 1); - ++i; } } @@ -479,18 +462,17 @@ contract UpgradeableModularAccount is uint256 actualPostHooksToRunLength; // Copy post-only hooks to the array. - for (uint256 i = 0; i < postOnlyHooksLength;) { + for (uint256 i = 0; i < postOnlyHooksLength; ++i) { (bytes32 key,) = selectorData.postOnlyHooks.at(i); postHooksToRun[actualPostHooksToRunLength].postExecHook = _toFunctionReference(key); unchecked { ++actualPostHooksToRunLength; - ++i; } } // Then run the pre hooks and copy the associated post hooks (along with their pre hook's return data) to // the array. - for (uint256 i = 0; i < preExecHooksLength;) { + for (uint256 i = 0; i < preExecHooksLength; ++i) { (bytes32 key,) = selectorData.preHooks.at(i); FunctionReference preExecHook = _toFunctionReference(key); @@ -504,21 +486,16 @@ contract UpgradeableModularAccount is uint256 associatedPostExecHooksLength = selectorData.associatedPostHooks[preExecHook].length(); if (associatedPostExecHooksLength > 0) { - for (uint256 j = 0; j < associatedPostExecHooksLength;) { + for (uint256 j = 0; j < associatedPostExecHooksLength; ++j) { (key,) = selectorData.associatedPostHooks[preExecHook].at(j); postHooksToRun[actualPostHooksToRunLength].postExecHook = _toFunctionReference(key); postHooksToRun[actualPostHooksToRunLength].preExecHookReturnData = preExecHookReturnData; unchecked { ++actualPostHooksToRunLength; - ++j; } } } - - unchecked { - ++i; - } } // Trim the post hook array to the actual length, since we may have overallocated. @@ -545,9 +522,8 @@ contract UpgradeableModularAccount is function _doCachedPostExecHooks(PostExecToRun[] memory postHooksToRun) internal { uint256 postHooksToRunLength = postHooksToRun.length; for (uint256 i = postHooksToRunLength; i > 0;) { - unchecked { - --i; - } + // Decrement here, instead of in the loop body, to handle the case where length is 0. + --i; PostExecToRun memory postHookToRun = postHooksToRun[i]; (address plugin, uint8 functionId) = postHookToRun.postExecHook.unpack(); From e885dd021dd02fef6006496d800e3cfe20ae84b1 Mon Sep 17 00:00:00 2001 From: adam Date: Wed, 17 Apr 2024 16:13:22 -0400 Subject: [PATCH 2/3] remove unused error --- src/account/AccountLoupe.sol | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/account/AccountLoupe.sol b/src/account/AccountLoupe.sol index c3b8055c..5f4d4fa8 100644 --- a/src/account/AccountLoupe.sol +++ b/src/account/AccountLoupe.sol @@ -14,8 +14,6 @@ abstract contract AccountLoupe is IAccountLoupe { using EnumerableMap for EnumerableMap.Bytes32ToUintMap; using EnumerableSet for EnumerableSet.AddressSet; - error ManifestDiscrepancy(address plugin); - /// @inheritdoc IAccountLoupe function getExecutionFunctionConfig(bytes4 selector) external From 2816b1319769928c7448b54400a5e5728f50ca1d Mon Sep 17 00:00:00 2001 From: adam Date: Wed, 17 Apr 2024 16:13:30 -0400 Subject: [PATCH 3/3] bump solidity version --- .vscode/settings.json | 2 +- foundry.toml | 2 +- src/account/AccountExecutor.sol | 2 +- src/account/AccountLoupe.sol | 2 +- src/account/AccountStorage.sol | 2 +- src/account/AccountStorageInitializable.sol | 2 +- src/account/PluginManagerInternals.sol | 2 +- src/account/UpgradeableModularAccount.sol | 2 +- src/helpers/FunctionReferenceLib.sol | 2 +- src/helpers/ValidationDataHelpers.sol | 2 +- src/interfaces/IAccountLoupe.sol | 2 +- src/interfaces/IPlugin.sol | 2 +- src/interfaces/IPluginExecutor.sol | 2 +- src/interfaces/IPluginManager.sol | 2 +- src/interfaces/IStandardExecutor.sol | 2 +- src/libraries/AssociatedLinkedListSetLib.sol | 2 +- src/libraries/PluginStorageLib.sol | 2 +- src/plugins/BasePlugin.sol | 2 +- src/plugins/TokenReceiverPlugin.sol | 2 +- src/plugins/owner/ISingleOwnerPlugin.sol | 2 +- src/plugins/owner/SingleOwnerPlugin.sol | 2 +- src/samples/plugins/ModularSessionKeyPlugin.sol | 2 +- src/samples/plugins/TokenSessionKeyPlugin.sol | 2 +- src/samples/plugins/interfaces/ISessionKeyPlugin.sol | 2 +- src/samples/plugins/interfaces/ITokenSessionKeyPlugin.sol | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 03ec7c76..c47446a7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "solidity.packageDefaultDependenciesContractsDirectory": "src", "solidity.packageDefaultDependenciesDirectory": "lib", - "solidity.compileUsingRemoteVersion": "v0.8.19", + "solidity.compileUsingRemoteVersion": "v0.8.25", "editor.formatOnSave": true, "[solidity]": { "editor.defaultFormatter": "JuanBlanco.solidity" diff --git a/foundry.toml b/foundry.toml index be310db9..5aad32a4 100644 --- a/foundry.toml +++ b/foundry.toml @@ -1,5 +1,5 @@ [profile.default] -solc = '0.8.19' +solc = '0.8.25' via_ir = false src = 'src' test = 'test' diff --git a/src/account/AccountExecutor.sol b/src/account/AccountExecutor.sol index de77512c..136676f6 100644 --- a/src/account/AccountExecutor.sol +++ b/src/account/AccountExecutor.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {ERC165Checker} from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import {IPlugin} from "../interfaces/IPlugin.sol"; diff --git a/src/account/AccountLoupe.sol b/src/account/AccountLoupe.sol index 5f4d4fa8..8bff326c 100644 --- a/src/account/AccountLoupe.sol +++ b/src/account/AccountLoupe.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; import {EnumerableMap} from "@openzeppelin/contracts/utils/structs/EnumerableMap.sol"; diff --git a/src/account/AccountStorage.sol b/src/account/AccountStorage.sol index 34961442..35b3eabb 100644 --- a/src/account/AccountStorage.sol +++ b/src/account/AccountStorage.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {EnumerableMap} from "@openzeppelin/contracts/utils/structs/EnumerableMap.sol"; import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; diff --git a/src/account/AccountStorageInitializable.sol b/src/account/AccountStorageInitializable.sol index ab7617db..5131978b 100644 --- a/src/account/AccountStorageInitializable.sol +++ b/src/account/AccountStorageInitializable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; diff --git a/src/account/PluginManagerInternals.sol b/src/account/PluginManagerInternals.sol index c9b2b18f..8257963d 100644 --- a/src/account/PluginManagerInternals.sol +++ b/src/account/PluginManagerInternals.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {ERC165Checker} from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import {EnumerableMap} from "@openzeppelin/contracts/utils/structs/EnumerableMap.sol"; diff --git a/src/account/UpgradeableModularAccount.sol b/src/account/UpgradeableModularAccount.sol index e3c4d0ff..1a7c0ac3 100644 --- a/src/account/UpgradeableModularAccount.sol +++ b/src/account/UpgradeableModularAccount.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {BaseAccount} from "@eth-infinitism/account-abstraction/core/BaseAccount.sol"; import {IEntryPoint} from "@eth-infinitism/account-abstraction/interfaces/IEntryPoint.sol"; diff --git a/src/helpers/FunctionReferenceLib.sol b/src/helpers/FunctionReferenceLib.sol index 07a0abbc..a938eef5 100644 --- a/src/helpers/FunctionReferenceLib.sol +++ b/src/helpers/FunctionReferenceLib.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {FunctionReference} from "../interfaces/IPluginManager.sol"; diff --git a/src/helpers/ValidationDataHelpers.sol b/src/helpers/ValidationDataHelpers.sol index 14e0131a..3f61b19c 100644 --- a/src/helpers/ValidationDataHelpers.sol +++ b/src/helpers/ValidationDataHelpers.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; // solhint-disable-next-line private-vars-leading-underscore function _coalescePreValidation(uint256 validationData1, uint256 validationData2) diff --git a/src/interfaces/IAccountLoupe.sol b/src/interfaces/IAccountLoupe.sol index 300a81b1..9076b28d 100644 --- a/src/interfaces/IAccountLoupe.sol +++ b/src/interfaces/IAccountLoupe.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: CC0-1.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {FunctionReference} from "../interfaces/IPluginManager.sol"; diff --git a/src/interfaces/IPlugin.sol b/src/interfaces/IPlugin.sol index e8edaf4a..5c4702d2 100644 --- a/src/interfaces/IPlugin.sol +++ b/src/interfaces/IPlugin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: CC0-1.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {UserOperation} from "@eth-infinitism/account-abstraction/interfaces/UserOperation.sol"; diff --git a/src/interfaces/IPluginExecutor.sol b/src/interfaces/IPluginExecutor.sol index d18ba665..e1989958 100644 --- a/src/interfaces/IPluginExecutor.sol +++ b/src/interfaces/IPluginExecutor.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: CC0-1.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; interface IPluginExecutor { /// @notice Execute a call from a plugin to another plugin, via an execution function installed on the account. diff --git a/src/interfaces/IPluginManager.sol b/src/interfaces/IPluginManager.sol index 21054d27..dd4dc672 100644 --- a/src/interfaces/IPluginManager.sol +++ b/src/interfaces/IPluginManager.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: CC0-1.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; type FunctionReference is bytes21; diff --git a/src/interfaces/IStandardExecutor.sol b/src/interfaces/IStandardExecutor.sol index a5618be6..30b6deee 100644 --- a/src/interfaces/IStandardExecutor.sol +++ b/src/interfaces/IStandardExecutor.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: CC0-1.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; struct Call { // The target address for the account to call. diff --git a/src/libraries/AssociatedLinkedListSetLib.sol b/src/libraries/AssociatedLinkedListSetLib.sol index 97974b2c..4663e4ac 100644 --- a/src/libraries/AssociatedLinkedListSetLib.sol +++ b/src/libraries/AssociatedLinkedListSetLib.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; // type SetValue is bytes30; diff --git a/src/libraries/PluginStorageLib.sol b/src/libraries/PluginStorageLib.sol index 35aaa7bb..5811f8f8 100644 --- a/src/libraries/PluginStorageLib.sol +++ b/src/libraries/PluginStorageLib.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; // type StoragePointer is bytes32; diff --git a/src/plugins/BasePlugin.sol b/src/plugins/BasePlugin.sol index 5dbcb2b3..5a89b982 100644 --- a/src/plugins/BasePlugin.sol +++ b/src/plugins/BasePlugin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {UserOperation} from "@eth-infinitism/account-abstraction/interfaces/UserOperation.sol"; import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; diff --git a/src/plugins/TokenReceiverPlugin.sol b/src/plugins/TokenReceiverPlugin.sol index e138f8f3..f22ae3ba 100644 --- a/src/plugins/TokenReceiverPlugin.sol +++ b/src/plugins/TokenReceiverPlugin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import {IERC777Recipient} from "@openzeppelin/contracts/interfaces/IERC777Recipient.sol"; diff --git a/src/plugins/owner/ISingleOwnerPlugin.sol b/src/plugins/owner/ISingleOwnerPlugin.sol index 4f5257e5..d20296ef 100644 --- a/src/plugins/owner/ISingleOwnerPlugin.sol +++ b/src/plugins/owner/ISingleOwnerPlugin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; interface ISingleOwnerPlugin { enum FunctionId { diff --git a/src/plugins/owner/SingleOwnerPlugin.sol b/src/plugins/owner/SingleOwnerPlugin.sol index 3c3507e2..5e3b432a 100644 --- a/src/plugins/owner/SingleOwnerPlugin.sol +++ b/src/plugins/owner/SingleOwnerPlugin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol"; diff --git a/src/samples/plugins/ModularSessionKeyPlugin.sol b/src/samples/plugins/ModularSessionKeyPlugin.sol index 035b62fa..ceed7108 100644 --- a/src/samples/plugins/ModularSessionKeyPlugin.sol +++ b/src/samples/plugins/ModularSessionKeyPlugin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; // import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; // import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; diff --git a/src/samples/plugins/TokenSessionKeyPlugin.sol b/src/samples/plugins/TokenSessionKeyPlugin.sol index 82cc6d24..09275374 100644 --- a/src/samples/plugins/TokenSessionKeyPlugin.sol +++ b/src/samples/plugins/TokenSessionKeyPlugin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; // import { // ManifestFunction, diff --git a/src/samples/plugins/interfaces/ISessionKeyPlugin.sol b/src/samples/plugins/interfaces/ISessionKeyPlugin.sol index 3d378d29..99d94456 100644 --- a/src/samples/plugins/interfaces/ISessionKeyPlugin.sol +++ b/src/samples/plugins/interfaces/ISessionKeyPlugin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; // import {UserOperation} from "@eth-infinitism/account-abstraction/interfaces/UserOperation.sol"; diff --git a/src/samples/plugins/interfaces/ITokenSessionKeyPlugin.sol b/src/samples/plugins/interfaces/ITokenSessionKeyPlugin.sol index 2e990ef7..09a3bf84 100644 --- a/src/samples/plugins/interfaces/ITokenSessionKeyPlugin.sol +++ b/src/samples/plugins/interfaces/ITokenSessionKeyPlugin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.19; +pragma solidity ^0.8.25; // import {UserOperation} from "@eth-infinitism/account-abstraction/interfaces/UserOperation.sol";