From 7d923fac92b76c21eef0e5bb8e415f68072718a6 Mon Sep 17 00:00:00 2001 From: kopy-kat Date: Fri, 23 Feb 2024 18:01:16 +0000 Subject: [PATCH] fix: linting issues --- examples/src/AutoSavings/AutoSavings.sol | 3 --- examples/src/{mfa => MultiFactor}/ECDSAFactor.sol | 1 - examples/src/{mfa => MultiFactor}/MultiFactor.sol | 2 -- examples/test/AutoSavings/AutoSavings.t.sol | 2 -- examples/test/AutoSend/AutoSend.t.sol | 1 - examples/test/{mfa => MultiFactor}/MultiFactor.t.sol | 3 +-- examples/test/TokenRevocation/ERC20Revocation.t.sol | 1 - package.json | 1 - .../modulekit/src/accountFactory/MultiAccountFactory.sol | 3 +++ .../src/accountFactory/referenceImpl/RefImplFactory.sol | 3 +++ .../src/integrations/interfaces/morpho/IMorphoAaveV2Lens.sol | 2 +- packages/modulekit/src/modules/ERC7579HookDestruct.sol | 5 ----- packages/modulekit/src/test/RhinestoneModuleKit.sol | 3 --- 13 files changed, 8 insertions(+), 22 deletions(-) rename examples/src/{mfa => MultiFactor}/ECDSAFactor.sol (97%) rename examples/src/{mfa => MultiFactor}/MultiFactor.sol (99%) rename examples/test/{mfa => MultiFactor}/MultiFactor.t.sol (98%) diff --git a/examples/src/AutoSavings/AutoSavings.sol b/examples/src/AutoSavings/AutoSavings.sol index 19c2e45e..9969b744 100644 --- a/examples/src/AutoSavings/AutoSavings.sol +++ b/examples/src/AutoSavings/AutoSavings.sol @@ -8,8 +8,6 @@ import { UniswapV3Integration } from "@rhinestone/modulekit/src/Integrations.sol import { Execution } from "@rhinestone/modulekit/src/Accounts.sol"; import { ERC7579ExecutorBase, SessionKeyBase } from "@rhinestone/modulekit/src/Modules.sol"; -import "forge-std/console2.sol"; - contract AutoSavingToVault is ERC7579ExecutorBase, SessionKeyBase { struct Params { address token; @@ -85,7 +83,6 @@ contract AutoSavingToVault is ERC7579ExecutorBase, SessionKeyBase { // execute swap on account bytes[] memory results = _execute(swap); - console2.log("swap results", results.length); // get return data of swap, and set it as amountIn. // this will be the actual amount that is subject to be saved amountIn = abi.decode(results[1], (uint256)); diff --git a/examples/src/mfa/ECDSAFactor.sol b/examples/src/MultiFactor/ECDSAFactor.sol similarity index 97% rename from examples/src/mfa/ECDSAFactor.sol rename to examples/src/MultiFactor/ECDSAFactor.sol index 4d6f369a..22078c77 100644 --- a/examples/src/mfa/ECDSAFactor.sol +++ b/examples/src/MultiFactor/ECDSAFactor.sol @@ -3,7 +3,6 @@ pragma solidity ^0.8.19; import { ECDSA } from "solady/src/utils/ECDSA.sol"; import { ERC7579ValidatorBase } from "@rhinestone/modulekit/src/Modules.sol"; -import "forge-std/console2.sol"; abstract contract ECDSAFactor is ERC7579ValidatorBase { struct FactorConfig { diff --git a/examples/src/mfa/MultiFactor.sol b/examples/src/MultiFactor/MultiFactor.sol similarity index 99% rename from examples/src/mfa/MultiFactor.sol rename to examples/src/MultiFactor/MultiFactor.sol index 2814f24e..843f5b10 100644 --- a/examples/src/mfa/MultiFactor.sol +++ b/examples/src/MultiFactor/MultiFactor.sol @@ -10,8 +10,6 @@ import { ECDSAFactor } from "./ECDSAFactor.sol"; import { ExecutionLib } from "erc7579/lib/ExecutionLib.sol"; import { ModeLib } from "erc7579/lib/ModeLib.sol"; -import "forge-std/console2.sol"; - struct ConfigData { address subValidator; bytes initData; diff --git a/examples/test/AutoSavings/AutoSavings.t.sol b/examples/test/AutoSavings/AutoSavings.t.sol index dd8760ce..0905bab6 100644 --- a/examples/test/AutoSavings/AutoSavings.t.sol +++ b/examples/test/AutoSavings/AutoSavings.t.sol @@ -11,8 +11,6 @@ import { AutoSavingToVault } from "src/AutoSavings/AutoSavings.sol"; import { MODULE_TYPE_EXECUTOR } from "@rhinestone/modulekit/src/external/ERC7579.sol"; -import "forge-std/console2.sol"; - contract AutoSavingsTest is RhinestoneModuleKit, Test { using ModuleKitHelpers for *; using ModuleKitSCM for *; diff --git a/examples/test/AutoSend/AutoSend.t.sol b/examples/test/AutoSend/AutoSend.t.sol index 633a923f..f8e29840 100644 --- a/examples/test/AutoSend/AutoSend.t.sol +++ b/examples/test/AutoSend/AutoSend.t.sol @@ -2,7 +2,6 @@ pragma solidity ^0.8.23; import "forge-std/Test.sol"; -import "forge-std/console2.sol"; import "@rhinestone/modulekit/src/ModuleKit.sol"; import "@rhinestone/modulekit/src/Modules.sol"; import "@rhinestone/modulekit/src/Mocks.sol"; diff --git a/examples/test/mfa/MultiFactor.t.sol b/examples/test/MultiFactor/MultiFactor.t.sol similarity index 98% rename from examples/test/mfa/MultiFactor.t.sol rename to examples/test/MultiFactor/MultiFactor.t.sol index 0cb184ff..c18b3b17 100644 --- a/examples/test/mfa/MultiFactor.t.sol +++ b/examples/test/MultiFactor/MultiFactor.t.sol @@ -2,12 +2,11 @@ pragma solidity ^0.8.23; import "forge-std/Test.sol"; -import "forge-std/console2.sol"; import "@rhinestone/modulekit/src/ModuleKit.sol"; import "@rhinestone/modulekit/src/Modules.sol"; import "@rhinestone/modulekit/src/Mocks.sol"; -import { MultiFactor, ECDSAFactor } from "src/MFA/MultiFactor.sol"; +import { MultiFactor, ECDSAFactor } from "src/MultiFactor/MultiFactor.sol"; import { SignatureCheckerLib } from "solady/src/utils/SignatureCheckerLib.sol"; import { ECDSA } from "solady/src/utils/ECDSA.sol"; import { Solarray } from "solarray/Solarray.sol"; diff --git a/examples/test/TokenRevocation/ERC20Revocation.t.sol b/examples/test/TokenRevocation/ERC20Revocation.t.sol index 4f8bc894..c69fc713 100644 --- a/examples/test/TokenRevocation/ERC20Revocation.t.sol +++ b/examples/test/TokenRevocation/ERC20Revocation.t.sol @@ -2,7 +2,6 @@ pragma solidity ^0.8.23; import "forge-std/Test.sol"; -import "forge-std/console2.sol"; import "@rhinestone/modulekit/src/ModuleKit.sol"; import "@rhinestone/modulekit/src/Modules.sol"; import "@rhinestone/modulekit/src/Mocks.sol"; diff --git a/package.json b/package.json index 3aeac978..0455470a 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "@rhinestone/sessionkeymanager": "workspace:*", "@rhinestone/safe7579": "workspace:*", "@rhinestone/modulekit": "workspace:*", - "@rhinestone/modulekit": "workspace:*", "prettier": "^2.8.8", "solhint": "^4.1.1" }, diff --git a/packages/modulekit/src/accountFactory/MultiAccountFactory.sol b/packages/modulekit/src/accountFactory/MultiAccountFactory.sol index 69f82a6b..0faacb61 100644 --- a/packages/modulekit/src/accountFactory/MultiAccountFactory.sol +++ b/packages/modulekit/src/accountFactory/MultiAccountFactory.sol @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.23; + import "forge-std/Base.sol"; import "./safe7579/Safe7579Factory.sol"; import "./referenceImpl/RefImplFactory.sol"; diff --git a/packages/modulekit/src/accountFactory/referenceImpl/RefImplFactory.sol b/packages/modulekit/src/accountFactory/referenceImpl/RefImplFactory.sol index a0be61cd..a44e83e1 100644 --- a/packages/modulekit/src/accountFactory/referenceImpl/RefImplFactory.sol +++ b/packages/modulekit/src/accountFactory/referenceImpl/RefImplFactory.sol @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.23; + import "../../external/ERC7579.sol"; import { LibClone } from "solady/src/utils/LibClone.sol"; diff --git a/packages/modulekit/src/integrations/interfaces/morpho/IMorphoAaveV2Lens.sol b/packages/modulekit/src/integrations/interfaces/morpho/IMorphoAaveV2Lens.sol index 36b1ac05..06303636 100644 --- a/packages/modulekit/src/integrations/interfaces/morpho/IMorphoAaveV2Lens.sol +++ b/packages/modulekit/src/integrations/interfaces/morpho/IMorphoAaveV2Lens.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GNU AGPLv3 -pragma solidity >=0.5.0; +pragma solidity >=0.8.0; import "./MorphoTypes.sol"; diff --git a/packages/modulekit/src/modules/ERC7579HookDestruct.sol b/packages/modulekit/src/modules/ERC7579HookDestruct.sol index 1b89c33a..f50df6a6 100644 --- a/packages/modulekit/src/modules/ERC7579HookDestruct.sol +++ b/packages/modulekit/src/modules/ERC7579HookDestruct.sol @@ -118,11 +118,6 @@ abstract contract ERC7579HookDestruct is ERC7579HookBase { // } // } else if (selector == IERC7579Account.executeFromExecutor.selector) { // uint256 offset = msgData.offset(); - // console2.log("\n\n offset %s msgData.length %s", offset, msgData.length); - // console2.log("\nmsgData:"); - // console2.logBytes(msgData); - // console2.log("\nmsgData cleaned:"); - // console2.logBytes(msgData[36:offset]); // // ModeCode mode = ModeCode.wrap(bytes32(msgData[4:36])); // CallType calltype = ModeLib.getCallType(mode); diff --git a/packages/modulekit/src/test/RhinestoneModuleKit.sol b/packages/modulekit/src/test/RhinestoneModuleKit.sol index 2aeff995..c0a8e445 100644 --- a/packages/modulekit/src/test/RhinestoneModuleKit.sol +++ b/packages/modulekit/src/test/RhinestoneModuleKit.sol @@ -23,8 +23,6 @@ import "./utils/Vm.sol"; import "./utils/ModuleKitCache.sol"; import "./utils/Log.sol"; -import "forge-std/console2.sol"; - struct AccountInstance { address account; Auxiliary aux; @@ -152,7 +150,6 @@ contract RhinestoneModuleKit is AuxiliaryFactory { bytes memory bootstrapCalldata = accountFactory.getBootstrapCallData(validators, executors, hook, fallBack); address account = accountFactory.getAddress(salt, bootstrapCalldata); - console2.log("Account address: ", account); // using MSAFactory from ERC7579 repo. bytes memory createAccountOnFactory =