From 7cb599a261c4cfaea9cfd9e85ee4e3854f9e4ffd Mon Sep 17 00:00:00 2001 From: zeroknots Date: Tue, 23 Apr 2024 09:20:29 +0700 Subject: [PATCH] cleaning up --- accounts/safe7579/notes.txt | 0 accounts/safe7579/src/ISafe7579.sol | 4 ++-- accounts/safe7579/src/Safe7579.sol | 2 +- accounts/safe7579/src/Safe7579Launchpad.sol | 6 +++--- accounts/safe7579/src/core/AccessControl.sol | 2 +- .../safe7579/src/core/ExecutionHelper.sol | 2 +- accounts/safe7579/src/core/Initializer.sol | 2 +- accounts/safe7579/src/core/ModuleManager.sol | 2 +- .../safe7579/src/core/RegistryAdapter.sol | 2 +- accounts/safe7579/src/core/SetupDCUtil.sol | 2 +- accounts/safe7579/src/interfaces/IERC1271.sol | 2 +- .../src/interfaces/IERC7579Account.sol | 2 +- .../src/interfaces/IERC7579Module.sol | 2 +- .../src/interfaces/ISafe7579Init.sol.bak | 19 ------------------- accounts/safe7579/src/lib/ExecutionLib.sol | 1 + accounts/safe7579/src/lib/ModeLib.sol | 1 + 16 files changed, 17 insertions(+), 34 deletions(-) delete mode 100644 accounts/safe7579/notes.txt delete mode 100644 accounts/safe7579/src/interfaces/ISafe7579Init.sol.bak diff --git a/accounts/safe7579/notes.txt b/accounts/safe7579/notes.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/accounts/safe7579/src/ISafe7579.sol b/accounts/safe7579/src/ISafe7579.sol index 55f3f6cc..d5830355 100644 --- a/accounts/safe7579/src/ISafe7579.sol +++ b/accounts/safe7579/src/ISafe7579.sol @@ -1,5 +1,5 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.25; +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; import "./DataTypes.sol"; import { IERC7579Account } from "./interfaces//IERC7579Account.sol"; diff --git a/accounts/safe7579/src/Safe7579.sol b/accounts/safe7579/src/Safe7579.sol index 68cdb73f..7cad04a7 100644 --- a/accounts/safe7579/src/Safe7579.sol +++ b/accounts/safe7579/src/Safe7579.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.25; +pragma solidity ^0.8.20; import { IERC7579Account, Execution } from "./interfaces/IERC7579Account.sol"; import { diff --git a/accounts/safe7579/src/Safe7579Launchpad.sol b/accounts/safe7579/src/Safe7579Launchpad.sol index 781c48d3..0d2e4b8a 100644 --- a/accounts/safe7579/src/Safe7579Launchpad.sol +++ b/accounts/safe7579/src/Safe7579Launchpad.sol @@ -1,5 +1,5 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.22; +// SPDX-License-Identifier: GPL-3.0 +pragma solidity ^0.8.20; import { IAccount, PackedUserOperation } from "account-abstraction/interfaces/IAccount.sol"; import { ISafe } from "./interfaces/ISafe.sol"; @@ -17,7 +17,7 @@ import { SafeStorage } from "@safe-global/safe-contracts/contracts/libraries/Saf * Check Readme.md for more information. * Special thanks to [nlordell (Safe)](https://github.com/nlordell), who came up with [this * technique](https://github.com/safe-global/safe-modules/pull/184) - * @author rhinestone | zeroknots.eth + * @author rhinestone | zeroknots.eth. Concept by nlordell (Safe) */ contract Safe7579Launchpad is IAccount, SafeStorage { event ModuleInstalled(uint256 moduleTypeId, address module); diff --git a/accounts/safe7579/src/core/AccessControl.sol b/accounts/safe7579/src/core/AccessControl.sol index d868d3db..0e972b30 100644 --- a/accounts/safe7579/src/core/AccessControl.sol +++ b/accounts/safe7579/src/core/AccessControl.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.23; +pragma solidity ^0.8.20; import { HandlerContext } from "@safe-global/safe-contracts/contracts/handler/HandlerContext.sol"; import { AccountBase } from "erc7579/core/AccountBase.sol"; diff --git a/accounts/safe7579/src/core/ExecutionHelper.sol b/accounts/safe7579/src/core/ExecutionHelper.sol index 7dc60b7d..00ca29fc 100644 --- a/accounts/safe7579/src/core/ExecutionHelper.sol +++ b/accounts/safe7579/src/core/ExecutionHelper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.23; +pragma solidity ^0.8.20; import { Safe7579DCUtil, Safe7579DCUtilSetup } from "./SetupDCUtil.sol"; import { BatchedExecUtil } from "../utils/DCUtil.sol"; diff --git a/accounts/safe7579/src/core/Initializer.sol b/accounts/safe7579/src/core/Initializer.sol index 66e15558..e59a4de8 100644 --- a/accounts/safe7579/src/core/Initializer.sol +++ b/accounts/safe7579/src/core/Initializer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.23; +pragma solidity ^0.8.20; import { ISafe7579 } from "../ISafe7579.sol"; import "../DataTypes.sol"; diff --git a/accounts/safe7579/src/core/ModuleManager.sol b/accounts/safe7579/src/core/ModuleManager.sol index 210c39ff..8ca8f2e4 100644 --- a/accounts/safe7579/src/core/ModuleManager.sol +++ b/accounts/safe7579/src/core/ModuleManager.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.23; +pragma solidity ^0.8.20; import { SentinelListLib } from "sentinellist/SentinelList.sol"; import { SentinelList4337Lib } from "sentinellist/SentinelList4337.sol"; diff --git a/accounts/safe7579/src/core/RegistryAdapter.sol b/accounts/safe7579/src/core/RegistryAdapter.sol index 77ac4146..3b399fe6 100644 --- a/accounts/safe7579/src/core/RegistryAdapter.sol +++ b/accounts/safe7579/src/core/RegistryAdapter.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.23; +pragma solidity ^0.8.20; import { IERC7484 } from "../interfaces/IERC7484.sol"; import { ExecutionHelper } from "./ExecutionHelper.sol"; diff --git a/accounts/safe7579/src/core/SetupDCUtil.sol b/accounts/safe7579/src/core/SetupDCUtil.sol index 7cd143dd..02e3f8e7 100644 --- a/accounts/safe7579/src/core/SetupDCUtil.sol +++ b/accounts/safe7579/src/core/SetupDCUtil.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.25; +pragma solidity ^0.8.20; import { Safe7579DCUtil } from "../utils/DCUtil.sol"; diff --git a/accounts/safe7579/src/interfaces/IERC1271.sol b/accounts/safe7579/src/interfaces/IERC1271.sol index 5aff1322..5d870ac6 100644 --- a/accounts/safe7579/src/interfaces/IERC1271.sol +++ b/accounts/safe7579/src/interfaces/IERC1271.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity ^0.8.23; +pragma solidity ^0.8.20; interface IERC1271 { /** diff --git a/accounts/safe7579/src/interfaces/IERC7579Account.sol b/accounts/safe7579/src/interfaces/IERC7579Account.sol index 7904d829..262ecad3 100644 --- a/accounts/safe7579/src/interfaces/IERC7579Account.sol +++ b/accounts/safe7579/src/interfaces/IERC7579Account.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.21; +pragma solidity ^0.8.20; import { CallType, ExecType, ModeCode } from "../lib/ModeLib.sol"; diff --git a/accounts/safe7579/src/interfaces/IERC7579Module.sol b/accounts/safe7579/src/interfaces/IERC7579Module.sol index a8217024..8479856a 100644 --- a/accounts/safe7579/src/interfaces/IERC7579Module.sol +++ b/accounts/safe7579/src/interfaces/IERC7579Module.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.8.21; +pragma solidity ^0.8.20; import { PackedUserOperation } from "account-abstraction/interfaces/PackedUserOperation.sol"; diff --git a/accounts/safe7579/src/interfaces/ISafe7579Init.sol.bak b/accounts/safe7579/src/interfaces/ISafe7579Init.sol.bak deleted file mode 100644 index fb986f44..00000000 --- a/accounts/safe7579/src/interfaces/ISafe7579Init.sol.bak +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.23; - -import { IERC7484 } from "./IERC7484.sol"; -import "./DataTypes.sol"; - -interface ISafe7579 { - function initializeAccount( - ModuleInit[] calldata validators, - ModuleInit[] calldata executors, - ModuleInit[] calldata fallbacks, - ModuleInit[] calldata hooks, - RegistryInit calldata registryInit - ) - external - payable; - - function launchpadValidators(ModuleInit[] calldata validators) external payable; -} diff --git a/accounts/safe7579/src/lib/ExecutionLib.sol b/accounts/safe7579/src/lib/ExecutionLib.sol index 3d509eb3..f0c4e59c 100644 --- a/accounts/safe7579/src/lib/ExecutionLib.sol +++ b/accounts/safe7579/src/lib/ExecutionLib.sol @@ -6,6 +6,7 @@ import { Execution } from "../interfaces/IERC7579Account.sol"; /** * Helper Library for decoding Execution calldata * malloc for memory allocation is bad for gas. use this assembly instead + * @author rhinestone | zeroknots.eth, Konrad Kopp (@kopy-kat) */ library ExecutionLib { function decodeBatch(bytes calldata callData) diff --git a/accounts/safe7579/src/lib/ModeLib.sol b/accounts/safe7579/src/lib/ModeLib.sol index df594a6d..957e1246 100644 --- a/accounts/safe7579/src/lib/ModeLib.sol +++ b/accounts/safe7579/src/lib/ModeLib.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.23; /** * @title ModeLib + * @author rhinestone | zeroknots.eth, Konrad Kopp (@kopy-kat) * To allow smart accounts to be very simple, but allow for more complex execution, A custom mode * encoding is used. * Function Signature of execute function: