From ae535a15954dee0f50b9b9456c12343bd5df294e Mon Sep 17 00:00:00 2001 From: Michael Heuer Date: Fri, 6 Oct 2023 09:45:05 +0200 Subject: [PATCH 1/2] feat: made solc pragma less restrictive --- packages/contracts/CHANGELOG.md | 1 + packages/contracts/src/core/dao/DAO.sol | 2 +- packages/contracts/src/core/dao/IEIP4824.sol | 2 +- packages/contracts/src/core/utils/BitMap.sol | 2 +- packages/contracts/src/core/utils/CallbackHandler.sol | 2 +- packages/contracts/src/framework/dao/DAOFactory.sol | 2 +- packages/contracts/src/framework/dao/DAORegistry.sol | 2 +- packages/contracts/src/framework/plugin/repo/IPluginRepo.sol | 2 +- packages/contracts/src/framework/plugin/repo/PluginRepo.sol | 2 +- .../contracts/src/framework/plugin/repo/PluginRepoFactory.sol | 2 +- .../contracts/src/framework/plugin/repo/PluginRepoRegistry.sol | 2 +- .../src/framework/plugin/setup/PluginSetupProcessor.sol | 2 +- .../src/framework/plugin/setup/PluginSetupProcessorHelpers.sol | 2 +- .../contracts/src/framework/utils/InterfaceBasedRegistry.sol | 2 +- packages/contracts/src/framework/utils/RegistryUtils.sol | 2 +- packages/contracts/src/framework/utils/TokenFactory.sol | 2 +- packages/contracts/src/framework/utils/ens/ENSMigration.sol | 2 +- .../contracts/src/framework/utils/ens/ENSSubdomainRegistrar.sol | 2 +- .../contracts/src/plugins/counter-example/MultiplyHelper.sol | 2 +- packages/contracts/src/plugins/counter-example/v1/CounterV1.sol | 2 +- .../src/plugins/counter-example/v1/CounterV1PluginSetup.sol | 2 +- packages/contracts/src/plugins/counter-example/v2/CounterV2.sol | 2 +- .../src/plugins/counter-example/v2/CounterV2PluginSetup.sol | 2 +- packages/contracts/src/plugins/governance/admin/Admin.sol | 2 +- packages/contracts/src/plugins/governance/admin/AdminSetup.sol | 2 +- .../majority-voting/addresslist/AddresslistVoting.sol | 2 +- .../majority-voting/addresslist/AddresslistVotingSetup.sol | 2 +- .../plugins/governance/majority-voting/token/TokenVoting.sol | 2 +- .../governance/majority-voting/token/TokenVotingSetup.sol | 2 +- .../contracts/src/plugins/governance/multisig/IMultisig.sol | 2 +- packages/contracts/src/plugins/governance/multisig/Multisig.sol | 2 +- .../contracts/src/plugins/governance/multisig/MultisigSetup.sol | 2 +- .../src/plugins/placeholder-version/PlaceholderSetup.sol | 2 +- packages/contracts/src/plugins/token/IMerkleDistributor.sol | 2 +- packages/contracts/src/plugins/token/IMerkleMinter.sol | 2 +- packages/contracts/src/plugins/token/MerkleDistributor.sol | 2 +- packages/contracts/src/plugins/token/MerkleMinter.sol | 2 +- packages/contracts/src/test/Migration.sol | 2 +- packages/contracts/src/test/dao/ActionExecute.sol | 2 +- packages/contracts/src/test/dao/CallbackHandlerHelperMock.sol | 2 +- packages/contracts/src/test/dao/DAOMock.sol | 2 +- packages/contracts/src/test/dao/GasConsumerHelper.sol | 2 +- .../test/permission/ParameterScopingPermissionConditionTest.sol | 2 +- .../contracts/src/test/permission/PermissionConditionMock.sol | 2 +- .../contracts/src/test/permission/PermissionManagerTest.sol | 2 +- packages/contracts/src/test/plugin/AddresslistMock.sol | 2 +- packages/contracts/src/test/plugin/AdminCloneFactory.sol | 2 +- .../contracts/src/test/plugin/Clonable/PluginCloneableMock.sol | 2 +- .../src/test/plugin/Clonable/PluginCloneableSetupMock.sol | 2 +- packages/contracts/src/test/plugin/Constructable/PluginMock.sol | 2 +- packages/contracts/src/test/plugin/MajorityVotingMock.sol | 2 +- packages/contracts/src/test/plugin/PluginMockData.sol | 2 +- packages/contracts/src/test/plugin/PluginTest.sol | 2 +- packages/contracts/src/test/plugin/SharedPluginTest.sol | 2 +- .../test/plugin/UUPSUpgradeable/PluginUUPSUpgradeableMock.sol | 2 +- .../plugin/UUPSUpgradeable/PluginUUPSUpgradeableSetupMock.sol | 2 +- packages/contracts/src/test/token/GovernanceERC20Mock.sol | 2 +- packages/contracts/src/test/token/TestERC1155.sol | 2 +- packages/contracts/src/test/token/TestERC20.sol | 2 +- packages/contracts/src/test/token/TestERC721.sol | 2 +- .../contracts/src/test/utils/InterfaceBasedRegistryMock.sol | 2 +- packages/contracts/src/test/utils/RatioTest.sol | 2 +- packages/contracts/src/test/utils/RegistryUtilsTest.sol | 2 +- .../contracts/src/token/ERC20/IERC20MintableUpgradeable.sol | 2 +- .../contracts/src/token/ERC20/governance/GovernanceERC20.sol | 2 +- .../src/token/ERC20/governance/GovernanceWrappedERC20.sol | 2 +- .../src/token/ERC20/governance/IGovernanceWrappedERC20.sol | 2 +- packages/contracts/src/utils/protocol/ProtocolVersion.sol | 2 +- 68 files changed, 68 insertions(+), 67 deletions(-) diff --git a/packages/contracts/CHANGELOG.md b/packages/contracts/CHANGELOG.md index 9a1ca2713..798e7e254 100644 --- a/packages/contracts/CHANGELOG.md +++ b/packages/contracts/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Changed the solidity compiler pragma from `0.8.17` to `^0.8.8` for all files. - Improved type safety by using `abi.encodeCall` instead of `abi.encodeWithSelector` and the more explicit bracket syntax for permissions. - Bumped OpenZeppelin dependencies to `4.9.3`. - Refactored the fallback in the `isGranted` function in `PermissionManager` to make conditions mutually exclusive: Specific conditions answering `false` do not fall back to generic caller conditions (`_who: ANY_ADDR`) or generic target conditions (`_where: ANY_ADDR`). diff --git a/packages/contracts/src/core/dao/DAO.sol b/packages/contracts/src/core/dao/DAO.sol index 35f245d29..48ba76aa1 100644 --- a/packages/contracts/src/core/dao/DAO.sol +++ b/packages/contracts/src/core/dao/DAO.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; diff --git a/packages/contracts/src/core/dao/IEIP4824.sol b/packages/contracts/src/core/dao/IEIP4824.sol index 6b9ce9a50..3f0f8a707 100644 --- a/packages/contracts/src/core/dao/IEIP4824.sol +++ b/packages/contracts/src/core/dao/IEIP4824.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; /// @title EIP-4824 Common Interfaces for DAOs /// @dev See https://eips.ethereum.org/EIPS/eip-4824 diff --git a/packages/contracts/src/core/utils/BitMap.sol b/packages/contracts/src/core/utils/BitMap.sol index a699c1361..d390f20ea 100644 --- a/packages/contracts/src/core/utils/BitMap.sol +++ b/packages/contracts/src/core/utils/BitMap.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; /// @param bitmap The `uint256` representation of bits. /// @param index The index number to check whether 1 or 0 is set. diff --git a/packages/contracts/src/core/utils/CallbackHandler.sol b/packages/contracts/src/core/utils/CallbackHandler.sol index 98e195b75..e42e103ff 100644 --- a/packages/contracts/src/core/utils/CallbackHandler.sol +++ b/packages/contracts/src/core/utils/CallbackHandler.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; /// @title CallbackHandler /// @author Aragon Association - 2022-2023 diff --git a/packages/contracts/src/framework/dao/DAOFactory.sol b/packages/contracts/src/framework/dao/DAOFactory.sol index 8af16fb0b..aa53efa68 100644 --- a/packages/contracts/src/framework/dao/DAOFactory.sol +++ b/packages/contracts/src/framework/dao/DAOFactory.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; diff --git a/packages/contracts/src/framework/dao/DAORegistry.sol b/packages/contracts/src/framework/dao/DAORegistry.sol index d8204d05c..48de5ef77 100644 --- a/packages/contracts/src/framework/dao/DAORegistry.sol +++ b/packages/contracts/src/framework/dao/DAORegistry.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {ProtocolVersion} from "../../utils/protocol/ProtocolVersion.sol"; import {IDAO} from "../../core/dao/IDAO.sol"; diff --git a/packages/contracts/src/framework/plugin/repo/IPluginRepo.sol b/packages/contracts/src/framework/plugin/repo/IPluginRepo.sol index 69a11c068..6536be3fa 100644 --- a/packages/contracts/src/framework/plugin/repo/IPluginRepo.sol +++ b/packages/contracts/src/framework/plugin/repo/IPluginRepo.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; /// @title IPluginRepo /// @author Aragon Association - 2022-2023 diff --git a/packages/contracts/src/framework/plugin/repo/PluginRepo.sol b/packages/contracts/src/framework/plugin/repo/PluginRepo.sol index 80dbc5e74..3721705f7 100644 --- a/packages/contracts/src/framework/plugin/repo/PluginRepo.sol +++ b/packages/contracts/src/framework/plugin/repo/PluginRepo.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import {ERC165Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; diff --git a/packages/contracts/src/framework/plugin/repo/PluginRepoFactory.sol b/packages/contracts/src/framework/plugin/repo/PluginRepoFactory.sol index 6f4c5bb72..e556f31b9 100644 --- a/packages/contracts/src/framework/plugin/repo/PluginRepoFactory.sol +++ b/packages/contracts/src/framework/plugin/repo/PluginRepoFactory.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; diff --git a/packages/contracts/src/framework/plugin/repo/PluginRepoRegistry.sol b/packages/contracts/src/framework/plugin/repo/PluginRepoRegistry.sol index f0d31d0db..b13a398a2 100644 --- a/packages/contracts/src/framework/plugin/repo/PluginRepoRegistry.sol +++ b/packages/contracts/src/framework/plugin/repo/PluginRepoRegistry.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {ProtocolVersion} from "../../../utils/protocol/ProtocolVersion.sol"; import {IDAO} from "../../../core/dao/IDAO.sol"; diff --git a/packages/contracts/src/framework/plugin/setup/PluginSetupProcessor.sol b/packages/contracts/src/framework/plugin/setup/PluginSetupProcessor.sol index 9e404f551..6da4f8030 100644 --- a/packages/contracts/src/framework/plugin/setup/PluginSetupProcessor.sol +++ b/packages/contracts/src/framework/plugin/setup/PluginSetupProcessor.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {ERC165Checker} from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; diff --git a/packages/contracts/src/framework/plugin/setup/PluginSetupProcessorHelpers.sol b/packages/contracts/src/framework/plugin/setup/PluginSetupProcessorHelpers.sol index 2eca46fc7..bba91f61d 100644 --- a/packages/contracts/src/framework/plugin/setup/PluginSetupProcessorHelpers.sol +++ b/packages/contracts/src/framework/plugin/setup/PluginSetupProcessorHelpers.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {PermissionLib} from "../../../core/permission/PermissionLib.sol"; import {PluginRepo} from "../repo/PluginRepo.sol"; diff --git a/packages/contracts/src/framework/utils/InterfaceBasedRegistry.sol b/packages/contracts/src/framework/utils/InterfaceBasedRegistry.sol index 78bba3e03..23bf947ca 100644 --- a/packages/contracts/src/framework/utils/InterfaceBasedRegistry.sol +++ b/packages/contracts/src/framework/utils/InterfaceBasedRegistry.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import {ERC165CheckerUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol"; diff --git a/packages/contracts/src/framework/utils/RegistryUtils.sol b/packages/contracts/src/framework/utils/RegistryUtils.sol index 9d3a16b88..86a507218 100644 --- a/packages/contracts/src/framework/utils/RegistryUtils.sol +++ b/packages/contracts/src/framework/utils/RegistryUtils.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; /// @notice Validates that a subdomain name is composed only from characters in the allowed character set: /// - the lowercase letters `a-z` diff --git a/packages/contracts/src/framework/utils/TokenFactory.sol b/packages/contracts/src/framework/utils/TokenFactory.sol index bef76233b..d0c4b93c4 100644 --- a/packages/contracts/src/framework/utils/TokenFactory.sol +++ b/packages/contracts/src/framework/utils/TokenFactory.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; diff --git a/packages/contracts/src/framework/utils/ens/ENSMigration.sol b/packages/contracts/src/framework/utils/ens/ENSMigration.sol index b1de22296..6aa9e64e5 100644 --- a/packages/contracts/src/framework/utils/ens/ENSMigration.sol +++ b/packages/contracts/src/framework/utils/ens/ENSMigration.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later // This is a migration file as suggested here https://docs.ens.domains/deploying-ens-on-a-private-chain#migration-file-example to compile the contracts and make their artifacts available in our tests. -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import "@ensdomains/ens-contracts/contracts/registry/ENSRegistry.sol"; import "@ensdomains/ens-contracts/contracts/resolvers/PublicResolver.sol"; diff --git a/packages/contracts/src/framework/utils/ens/ENSSubdomainRegistrar.sol b/packages/contracts/src/framework/utils/ens/ENSSubdomainRegistrar.sol index fbdc87202..ddad5b729 100644 --- a/packages/contracts/src/framework/utils/ens/ENSSubdomainRegistrar.sol +++ b/packages/contracts/src/framework/utils/ens/ENSSubdomainRegistrar.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import "@ensdomains/ens-contracts/contracts/registry/ENS.sol"; import "@ensdomains/ens-contracts/contracts/resolvers/Resolver.sol"; diff --git a/packages/contracts/src/plugins/counter-example/MultiplyHelper.sol b/packages/contracts/src/plugins/counter-example/MultiplyHelper.sol index 3434d1f2b..0e9e63d12 100644 --- a/packages/contracts/src/plugins/counter-example/MultiplyHelper.sol +++ b/packages/contracts/src/plugins/counter-example/MultiplyHelper.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {PluginUUPSUpgradeable} from "../../core/plugin/PluginUUPSUpgradeable.sol"; diff --git a/packages/contracts/src/plugins/counter-example/v1/CounterV1.sol b/packages/contracts/src/plugins/counter-example/v1/CounterV1.sol index 73fcc03a7..d7d8f322f 100644 --- a/packages/contracts/src/plugins/counter-example/v1/CounterV1.sol +++ b/packages/contracts/src/plugins/counter-example/v1/CounterV1.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {PluginUUPSUpgradeable} from "../../../core/plugin/PluginUUPSUpgradeable.sol"; import {MultiplyHelper} from "../MultiplyHelper.sol"; diff --git a/packages/contracts/src/plugins/counter-example/v1/CounterV1PluginSetup.sol b/packages/contracts/src/plugins/counter-example/v1/CounterV1PluginSetup.sol index 1b95e75b8..77849fc48 100644 --- a/packages/contracts/src/plugins/counter-example/v1/CounterV1PluginSetup.sol +++ b/packages/contracts/src/plugins/counter-example/v1/CounterV1PluginSetup.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol"; diff --git a/packages/contracts/src/plugins/counter-example/v2/CounterV2.sol b/packages/contracts/src/plugins/counter-example/v2/CounterV2.sol index 225d6ec53..1309e4bf0 100644 --- a/packages/contracts/src/plugins/counter-example/v2/CounterV2.sol +++ b/packages/contracts/src/plugins/counter-example/v2/CounterV2.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {PluginUUPSUpgradeable} from "../../../core/plugin/PluginUUPSUpgradeable.sol"; import {MultiplyHelper} from "../MultiplyHelper.sol"; diff --git a/packages/contracts/src/plugins/counter-example/v2/CounterV2PluginSetup.sol b/packages/contracts/src/plugins/counter-example/v2/CounterV2PluginSetup.sol index baa260832..ca0757f69 100644 --- a/packages/contracts/src/plugins/counter-example/v2/CounterV2PluginSetup.sol +++ b/packages/contracts/src/plugins/counter-example/v2/CounterV2PluginSetup.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol"; diff --git a/packages/contracts/src/plugins/governance/admin/Admin.sol b/packages/contracts/src/plugins/governance/admin/Admin.sol index 253ac22f0..d99a49810 100644 --- a/packages/contracts/src/plugins/governance/admin/Admin.sol +++ b/packages/contracts/src/plugins/governance/admin/Admin.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {SafeCastUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol"; diff --git a/packages/contracts/src/plugins/governance/admin/AdminSetup.sol b/packages/contracts/src/plugins/governance/admin/AdminSetup.sol index 452b7ef32..620b9f8e4 100644 --- a/packages/contracts/src/plugins/governance/admin/AdminSetup.sol +++ b/packages/contracts/src/plugins/governance/admin/AdminSetup.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol"; diff --git a/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVoting.sol b/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVoting.sol index 4e5482cc9..a0c1548dd 100644 --- a/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVoting.sol +++ b/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVoting.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {SafeCastUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol"; diff --git a/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVotingSetup.sol b/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVotingSetup.sol index 0b3665720..f67f82305 100644 --- a/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVotingSetup.sol +++ b/packages/contracts/src/plugins/governance/majority-voting/addresslist/AddresslistVotingSetup.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {IDAO} from "../../../../core/dao/IDAO.sol"; import {DAO} from "../../../../core/dao/DAO.sol"; diff --git a/packages/contracts/src/plugins/governance/majority-voting/token/TokenVoting.sol b/packages/contracts/src/plugins/governance/majority-voting/token/TokenVoting.sol index 4e6051aa6..e7df0b83d 100644 --- a/packages/contracts/src/plugins/governance/majority-voting/token/TokenVoting.sol +++ b/packages/contracts/src/plugins/governance/majority-voting/token/TokenVoting.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {IVotesUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol"; import {SafeCastUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol"; diff --git a/packages/contracts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol b/packages/contracts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol index d9981b240..db43e344c 100644 --- a/packages/contracts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol +++ b/packages/contracts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; diff --git a/packages/contracts/src/plugins/governance/multisig/IMultisig.sol b/packages/contracts/src/plugins/governance/multisig/IMultisig.sol index 77cdaa474..074fc6b4c 100644 --- a/packages/contracts/src/plugins/governance/multisig/IMultisig.sol +++ b/packages/contracts/src/plugins/governance/multisig/IMultisig.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {IDAO} from "../../../core/dao/IDAO.sol"; diff --git a/packages/contracts/src/plugins/governance/multisig/Multisig.sol b/packages/contracts/src/plugins/governance/multisig/Multisig.sol index db32e3cf6..a4ba44071 100644 --- a/packages/contracts/src/plugins/governance/multisig/Multisig.sol +++ b/packages/contracts/src/plugins/governance/multisig/Multisig.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {SafeCastUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol"; diff --git a/packages/contracts/src/plugins/governance/multisig/MultisigSetup.sol b/packages/contracts/src/plugins/governance/multisig/MultisigSetup.sol index 6a334d6a6..f3dda9922 100644 --- a/packages/contracts/src/plugins/governance/multisig/MultisigSetup.sol +++ b/packages/contracts/src/plugins/governance/multisig/MultisigSetup.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {IDAO} from "../../../core/dao/IDAO.sol"; import {DAO} from "../../../core/dao/DAO.sol"; diff --git a/packages/contracts/src/plugins/placeholder-version/PlaceholderSetup.sol b/packages/contracts/src/plugins/placeholder-version/PlaceholderSetup.sol index 0052aa3fe..daf5d7807 100644 --- a/packages/contracts/src/plugins/placeholder-version/PlaceholderSetup.sol +++ b/packages/contracts/src/plugins/placeholder-version/PlaceholderSetup.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {PermissionLib} from "../../core/permission/PermissionLib.sol"; import {PluginSetup, IPluginSetup} from "../../framework/plugin/setup/PluginSetup.sol"; diff --git a/packages/contracts/src/plugins/token/IMerkleDistributor.sol b/packages/contracts/src/plugins/token/IMerkleDistributor.sol index 24f163d85..71b6cf2d7 100644 --- a/packages/contracts/src/plugins/token/IMerkleDistributor.sol +++ b/packages/contracts/src/plugins/token/IMerkleDistributor.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {IERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import {ERC20WrapperUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20WrapperUpgradeable.sol"; diff --git a/packages/contracts/src/plugins/token/IMerkleMinter.sol b/packages/contracts/src/plugins/token/IMerkleMinter.sol index f20dde543..adfe2f35d 100644 --- a/packages/contracts/src/plugins/token/IMerkleMinter.sol +++ b/packages/contracts/src/plugins/token/IMerkleMinter.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {IERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; diff --git a/packages/contracts/src/plugins/token/MerkleDistributor.sol b/packages/contracts/src/plugins/token/MerkleDistributor.sol index 2ef51ccee..5b792d1dc 100644 --- a/packages/contracts/src/plugins/token/MerkleDistributor.sol +++ b/packages/contracts/src/plugins/token/MerkleDistributor.sol @@ -2,7 +2,7 @@ // Copied and modified from: https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {SafeERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import {ERC165Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; diff --git a/packages/contracts/src/plugins/token/MerkleMinter.sol b/packages/contracts/src/plugins/token/MerkleMinter.sol index 95fb5587a..70c40e998 100644 --- a/packages/contracts/src/plugins/token/MerkleMinter.sol +++ b/packages/contracts/src/plugins/token/MerkleMinter.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol"; import {ERC165Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; diff --git a/packages/contracts/src/test/Migration.sol b/packages/contracts/src/test/Migration.sol index fdb3b14bf..ffab75e69 100644 --- a/packages/contracts/src/test/Migration.sol +++ b/packages/contracts/src/test/Migration.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; /* * @title Migration diff --git a/packages/contracts/src/test/dao/ActionExecute.sol b/packages/contracts/src/test/dao/ActionExecute.sol index 34fb28ed6..705ddbfc9 100644 --- a/packages/contracts/src/test/dao/ActionExecute.sol +++ b/packages/contracts/src/test/dao/ActionExecute.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; /// @notice A dummy contract to test if DAO can successfully execute an action contract ActionExecute { diff --git a/packages/contracts/src/test/dao/CallbackHandlerHelperMock.sol b/packages/contracts/src/test/dao/CallbackHandlerHelperMock.sol index 9aeb0c6a7..1239973c1 100644 --- a/packages/contracts/src/test/dao/CallbackHandlerHelperMock.sol +++ b/packages/contracts/src/test/dao/CallbackHandlerHelperMock.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {CallbackHandler} from "../../core/utils/CallbackHandler.sol"; diff --git a/packages/contracts/src/test/dao/DAOMock.sol b/packages/contracts/src/test/dao/DAOMock.sol index 260a9135c..00aa1c6c9 100644 --- a/packages/contracts/src/test/dao/DAOMock.sol +++ b/packages/contracts/src/test/dao/DAOMock.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; diff --git a/packages/contracts/src/test/dao/GasConsumerHelper.sol b/packages/contracts/src/test/dao/GasConsumerHelper.sol index ade06815c..1eb2db573 100644 --- a/packages/contracts/src/test/dao/GasConsumerHelper.sol +++ b/packages/contracts/src/test/dao/GasConsumerHelper.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; /// @notice This contract is used for testing to consume gas. contract GasConsumer { diff --git a/packages/contracts/src/test/permission/ParameterScopingPermissionConditionTest.sol b/packages/contracts/src/test/permission/ParameterScopingPermissionConditionTest.sol index 6dff76de0..55d752807 100644 --- a/packages/contracts/src/test/permission/ParameterScopingPermissionConditionTest.sol +++ b/packages/contracts/src/test/permission/ParameterScopingPermissionConditionTest.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {PermissionCondition} from "../../core/permission/PermissionCondition.sol"; import {TestPlugin} from "../plugin/PluginTest.sol"; diff --git a/packages/contracts/src/test/permission/PermissionConditionMock.sol b/packages/contracts/src/test/permission/PermissionConditionMock.sol index c9c27a275..6a09c3a03 100644 --- a/packages/contracts/src/test/permission/PermissionConditionMock.sol +++ b/packages/contracts/src/test/permission/PermissionConditionMock.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import "../../core/permission/PermissionCondition.sol"; diff --git a/packages/contracts/src/test/permission/PermissionManagerTest.sol b/packages/contracts/src/test/permission/PermissionManagerTest.sol index 250b80910..8919e1a11 100644 --- a/packages/contracts/src/test/permission/PermissionManagerTest.sol +++ b/packages/contracts/src/test/permission/PermissionManagerTest.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; diff --git a/packages/contracts/src/test/plugin/AddresslistMock.sol b/packages/contracts/src/test/plugin/AddresslistMock.sol index e2836ea3a..99f8ff790 100644 --- a/packages/contracts/src/test/plugin/AddresslistMock.sol +++ b/packages/contracts/src/test/plugin/AddresslistMock.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import "../../plugins/utils/Addresslist.sol"; diff --git a/packages/contracts/src/test/plugin/AdminCloneFactory.sol b/packages/contracts/src/test/plugin/AdminCloneFactory.sol index ccc475344..b6bd6c506 100644 --- a/packages/contracts/src/test/plugin/AdminCloneFactory.sol +++ b/packages/contracts/src/test/plugin/AdminCloneFactory.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol"; diff --git a/packages/contracts/src/test/plugin/Clonable/PluginCloneableMock.sol b/packages/contracts/src/test/plugin/Clonable/PluginCloneableMock.sol index 23bf4aef5..406acf34f 100644 --- a/packages/contracts/src/test/plugin/Clonable/PluginCloneableMock.sol +++ b/packages/contracts/src/test/plugin/Clonable/PluginCloneableMock.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {PluginCloneable} from "../../../core/plugin/PluginCloneable.sol"; import {IDAO} from "../../../core/dao/IDAO.sol"; diff --git a/packages/contracts/src/test/plugin/Clonable/PluginCloneableSetupMock.sol b/packages/contracts/src/test/plugin/Clonable/PluginCloneableSetupMock.sol index 26f079a13..adb2277f4 100644 --- a/packages/contracts/src/test/plugin/Clonable/PluginCloneableSetupMock.sol +++ b/packages/contracts/src/test/plugin/Clonable/PluginCloneableSetupMock.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {PermissionLib} from "../../../core/permission/PermissionLib.sol"; import {IDAO} from "../../../core/dao/IDAO.sol"; diff --git a/packages/contracts/src/test/plugin/Constructable/PluginMock.sol b/packages/contracts/src/test/plugin/Constructable/PluginMock.sol index b0aace0ff..2fb32d172 100644 --- a/packages/contracts/src/test/plugin/Constructable/PluginMock.sol +++ b/packages/contracts/src/test/plugin/Constructable/PluginMock.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {Plugin} from "../../../core/plugin/Plugin.sol"; import {IDAO} from "../../../core/dao/IDAO.sol"; diff --git a/packages/contracts/src/test/plugin/MajorityVotingMock.sol b/packages/contracts/src/test/plugin/MajorityVotingMock.sol index 7d55a55f7..b12b3dd34 100644 --- a/packages/contracts/src/test/plugin/MajorityVotingMock.sol +++ b/packages/contracts/src/test/plugin/MajorityVotingMock.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import "../../plugins/governance/majority-voting/MajorityVotingBase.sol"; diff --git a/packages/contracts/src/test/plugin/PluginMockData.sol b/packages/contracts/src/test/plugin/PluginMockData.sol index 0bc2b8089..b61a03201 100644 --- a/packages/contracts/src/test/plugin/PluginMockData.sol +++ b/packages/contracts/src/test/plugin/PluginMockData.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {PermissionLib} from "../../core/permission/PermissionLib.sol"; import {createERC1967Proxy} from "../../utils/Proxy.sol"; diff --git a/packages/contracts/src/test/plugin/PluginTest.sol b/packages/contracts/src/test/plugin/PluginTest.sol index df5e82162..ddc650584 100644 --- a/packages/contracts/src/test/plugin/PluginTest.sol +++ b/packages/contracts/src/test/plugin/PluginTest.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {PluginUUPSUpgradeable} from "../../core/plugin/PluginUUPSUpgradeable.sol"; import {IDAO} from "../../core/dao/IDAO.sol"; diff --git a/packages/contracts/src/test/plugin/SharedPluginTest.sol b/packages/contracts/src/test/plugin/SharedPluginTest.sol index a37392ae0..6a8431303 100644 --- a/packages/contracts/src/test/plugin/SharedPluginTest.sol +++ b/packages/contracts/src/test/plugin/SharedPluginTest.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; diff --git a/packages/contracts/src/test/plugin/UUPSUpgradeable/PluginUUPSUpgradeableMock.sol b/packages/contracts/src/test/plugin/UUPSUpgradeable/PluginUUPSUpgradeableMock.sol index c595c142e..a463d4c57 100644 --- a/packages/contracts/src/test/plugin/UUPSUpgradeable/PluginUUPSUpgradeableMock.sol +++ b/packages/contracts/src/test/plugin/UUPSUpgradeable/PluginUUPSUpgradeableMock.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {PluginUUPSUpgradeable} from "../../../core/plugin/PluginUUPSUpgradeable.sol"; import {IDAO} from "../../../core/dao/IDAO.sol"; diff --git a/packages/contracts/src/test/plugin/UUPSUpgradeable/PluginUUPSUpgradeableSetupMock.sol b/packages/contracts/src/test/plugin/UUPSUpgradeable/PluginUUPSUpgradeableSetupMock.sol index 2c8330344..b93d9aa88 100644 --- a/packages/contracts/src/test/plugin/UUPSUpgradeable/PluginUUPSUpgradeableSetupMock.sol +++ b/packages/contracts/src/test/plugin/UUPSUpgradeable/PluginUUPSUpgradeableSetupMock.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {PermissionLib} from "../../../core/permission/PermissionLib.sol"; import {IDAO} from "../../../core/dao/IDAO.sol"; diff --git a/packages/contracts/src/test/token/GovernanceERC20Mock.sol b/packages/contracts/src/test/token/GovernanceERC20Mock.sol index cdc6aab5c..80fb653be 100644 --- a/packages/contracts/src/test/token/GovernanceERC20Mock.sol +++ b/packages/contracts/src/test/token/GovernanceERC20Mock.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {GovernanceERC20} from "../../token/ERC20/governance/GovernanceERC20.sol"; import {IDAO} from "../../core/dao/IDAO.sol"; diff --git a/packages/contracts/src/test/token/TestERC1155.sol b/packages/contracts/src/test/token/TestERC1155.sol index 84b213c16..0eb9f97c0 100644 --- a/packages/contracts/src/test/token/TestERC1155.sol +++ b/packages/contracts/src/test/token/TestERC1155.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; diff --git a/packages/contracts/src/test/token/TestERC20.sol b/packages/contracts/src/test/token/TestERC20.sol index 28d47d5d3..83d642b53 100644 --- a/packages/contracts/src/test/token/TestERC20.sol +++ b/packages/contracts/src/test/token/TestERC20.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; diff --git a/packages/contracts/src/test/token/TestERC721.sol b/packages/contracts/src/test/token/TestERC721.sol index 9687e0dba..897e535f3 100644 --- a/packages/contracts/src/test/token/TestERC721.sol +++ b/packages/contracts/src/test/token/TestERC721.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; diff --git a/packages/contracts/src/test/utils/InterfaceBasedRegistryMock.sol b/packages/contracts/src/test/utils/InterfaceBasedRegistryMock.sol index 75814b4e8..ce96592c2 100644 --- a/packages/contracts/src/test/utils/InterfaceBasedRegistryMock.sol +++ b/packages/contracts/src/test/utils/InterfaceBasedRegistryMock.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import "../../framework/utils/InterfaceBasedRegistry.sol"; diff --git a/packages/contracts/src/test/utils/RatioTest.sol b/packages/contracts/src/test/utils/RatioTest.sol index 1c425cad0..fa6c99e7b 100644 --- a/packages/contracts/src/test/utils/RatioTest.sol +++ b/packages/contracts/src/test/utils/RatioTest.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import "../../plugins/utils/Ratio.sol"; diff --git a/packages/contracts/src/test/utils/RegistryUtilsTest.sol b/packages/contracts/src/test/utils/RegistryUtilsTest.sol index 4b13c92c7..16d75d0f5 100644 --- a/packages/contracts/src/test/utils/RegistryUtilsTest.sol +++ b/packages/contracts/src/test/utils/RegistryUtilsTest.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {isSubdomainValid as _isSubdomainValid} from "../../framework/utils/RegistryUtils.sol"; diff --git a/packages/contracts/src/token/ERC20/IERC20MintableUpgradeable.sol b/packages/contracts/src/token/ERC20/IERC20MintableUpgradeable.sol index 82b96ffeb..f7d59ba0d 100644 --- a/packages/contracts/src/token/ERC20/IERC20MintableUpgradeable.sol +++ b/packages/contracts/src/token/ERC20/IERC20MintableUpgradeable.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; /// @title IERC20MintableUpgradeable /// @notice Interface to allow minting of [ERC-20](https://eips.ethereum.org/EIPS/eip-20) tokens. diff --git a/packages/contracts/src/token/ERC20/governance/GovernanceERC20.sol b/packages/contracts/src/token/ERC20/governance/GovernanceERC20.sol index 6c0146afe..550a60684 100644 --- a/packages/contracts/src/token/ERC20/governance/GovernanceERC20.sol +++ b/packages/contracts/src/token/ERC20/governance/GovernanceERC20.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {IERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol"; import {IERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; diff --git a/packages/contracts/src/token/ERC20/governance/GovernanceWrappedERC20.sol b/packages/contracts/src/token/ERC20/governance/GovernanceWrappedERC20.sol index 89f035f63..ad894e189 100644 --- a/packages/contracts/src/token/ERC20/governance/GovernanceWrappedERC20.sol +++ b/packages/contracts/src/token/ERC20/governance/GovernanceWrappedERC20.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import {ERC20WrapperUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20WrapperUpgradeable.sol"; diff --git a/packages/contracts/src/token/ERC20/governance/IGovernanceWrappedERC20.sol b/packages/contracts/src/token/ERC20/governance/IGovernanceWrappedERC20.sol index 92ed26db0..3c7504d22 100644 --- a/packages/contracts/src/token/ERC20/governance/IGovernanceWrappedERC20.sol +++ b/packages/contracts/src/token/ERC20/governance/IGovernanceWrappedERC20.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {IERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; diff --git a/packages/contracts/src/utils/protocol/ProtocolVersion.sol b/packages/contracts/src/utils/protocol/ProtocolVersion.sol index 89425ffe3..684aaf825 100644 --- a/packages/contracts/src/utils/protocol/ProtocolVersion.sol +++ b/packages/contracts/src/utils/protocol/ProtocolVersion.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity ^0.8.8; import {IProtocolVersion} from "./IProtocolVersion.sol"; From 542b552c7d3203de38e4ea962672dce4ce60005e Mon Sep 17 00:00:00 2001 From: Michael Heuer Date: Fri, 6 Oct 2023 09:45:57 +0200 Subject: [PATCH 2/2] docs: use solc 0.8.21 in the examples --- .../03-non-upgradeable-plugin/01-initialization.md | 4 ++-- .../03-non-upgradeable-plugin/03-setup.md | 4 ++-- .../03-non-upgradeable-plugin/index.md | 4 ++-- .../04-upgradeable-plugin/01-initialization.md | 2 +- .../04-upgradeable-plugin/03-setup.md | 4 ++-- .../04-upgradeable-plugin/05-updating-versions.md | 8 ++++---- .../02-how-to-guides/02-plugin-development/index.md | 4 ++-- packages/contracts/docs/developer-portal/index.md | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/01-initialization.md b/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/01-initialization.md index b087bd9ff..a6bbf1435 100644 --- a/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/01-initialization.md +++ b/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/01-initialization.md @@ -29,7 +29,7 @@ In this case, the compiler will force you to write a `constructor` function call ```solidity // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {Plugin, IDAO} from '@aragon/osx/core/plugin/Plugin.sol'; @@ -57,7 +57,7 @@ To deploy our plugin via the [minimal clones pattern (ERC-1167)](https://eips.et ```solidity // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {PluginCloneable, IDAO} from '@aragon/osx/core/plugin/PluginCloneable.sol'; diff --git a/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/03-setup.md b/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/03-setup.md index 9e42ca78b..7bc1d9c15 100644 --- a/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/03-setup.md +++ b/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/03-setup.md @@ -41,7 +41,7 @@ Each `PluginSetup` contract is deployed only once and we will publish a separate ```solidity // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {PluginSetup, IPluginSetup} from '@aragon/osx/framework/plugin/setup/PluginSetup.sol'; import {SimpleAdmin} from './SimpleAdmin.sol'; @@ -227,7 +227,7 @@ Now, it's time to wrap up everything together. You should have a contract that l ```solidity // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {Clones} from '@openzeppelin/contracts/proxy/Clones.sol'; diff --git a/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/index.md b/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/index.md index cff630408..ed2c078c4 100644 --- a/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/index.md +++ b/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/03-non-upgradeable-plugin/index.md @@ -85,7 +85,7 @@ Then, inside of the file, add the functionality: ```solidity // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {Plugin, IDAO} from '@aragon/osx/core/plugin/Plugin.sol'; @@ -122,7 +122,7 @@ In the `prepareInstallation()` function here then, we will grant the `GREET_PERM ```solidity // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {PluginSetup} from '@aragon/osx/framework/plugin/setup/PluginSetup.sol'; import {PermissionLib} from '@aragon/osx/core/permission/PermissionLib.sol'; diff --git a/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/01-initialization.md b/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/01-initialization.md index 618eed1c3..70a23dd5d 100644 --- a/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/01-initialization.md +++ b/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/01-initialization.md @@ -14,7 +14,7 @@ This has to be called - otherwise, anyone else could call the plugin's initializ ```solidity // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {PluginUUPSUpgradeable, IDAO} '@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol'; diff --git a/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/03-setup.md b/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/03-setup.md index 5bb4c8e84..66eb5677e 100644 --- a/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/03-setup.md +++ b/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/03-setup.md @@ -12,7 +12,7 @@ Before building the Plugin Setup contract, make sure you have the logic for your ```solidity // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {IDAO, PluginUUPSUpgradeable} from '@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol'; @@ -53,7 +53,7 @@ Similarly, the `prepareUninstallation()` function takes in a `payload`. ```solidity // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {PermissionLib} from '@aragon/osx/core/permission/PermissionLib.sol'; import {PluginSetup, IPluginSetup} from '@aragon/osx/framework/plugin/setup/PluginSetup.sol'; diff --git a/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/05-updating-versions.md b/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/05-updating-versions.md index b0e39652c..e10e3b44b 100644 --- a/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/05-updating-versions.md +++ b/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/04-upgradeable-plugin/05-updating-versions.md @@ -14,7 +14,7 @@ Firstly, you want to create the new build implementation contract the plugin sho ```solidity // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {IDAO, PluginUUPSUpgradeable} from '@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol'; @@ -61,7 +61,7 @@ In contrast to the original build 1, build 2 requires two input arguments: `uint ```solidity // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {PermissionLib} from '@aragon/osx/core/permission/PermissionLib.sol'; import {PluginSetup, IPluginSetup} from '@aragon/osx/framework/plugin/setup/PluginSetup.sol'; @@ -159,7 +159,7 @@ In this third build, for example, we are modifying the bytecode of the plugin. ```solidity // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {IDAO, PluginUUPSUpgradeable} from '@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol'; @@ -234,7 +234,7 @@ With each new build implementation, we will need to udate the Plugin Setup contr ```solidity // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {PermissionLib} from '@aragon/osx/core/permission/PermissionLib.sol'; import {PluginSetup, IPluginSetup} from '@aragon/osx/framework/plugin/setup/PluginSetup.sol'; diff --git a/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/index.md b/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/index.md index 7ae588782..a0a30f222 100644 --- a/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/index.md +++ b/packages/contracts/docs/developer-portal/02-how-to-guides/02-plugin-development/index.md @@ -76,7 +76,7 @@ Inside the `GreeterPlugin.sol`, we want to: ```solidity // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {Plugin, IDAO} from '@aragon/osx/core/plugin/Plugin.sol'; @@ -105,7 +105,7 @@ Inside the file, we'll add the `prepareInstallation` and `prepareUninstallation` ```solidity // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {PermissionLib} from '@aragon/osx/core/permission/PermissionLib.sol'; import {PluginSetup} from '@aragon/osx/framework/plugin/setup/PluginSetup.sol'; diff --git a/packages/contracts/docs/developer-portal/index.md b/packages/contracts/docs/developer-portal/index.md index 0ed8ed9ff..e3e43afbf 100644 --- a/packages/contracts/docs/developer-portal/index.md +++ b/packages/contracts/docs/developer-portal/index.md @@ -37,7 +37,7 @@ Then, to use the contracts within your project, **import the contracts** through ```solidity title="MyCoolPlugin.sol" // SPDX-License-Identifier: AGPL-3.0-or-later -pragma solidity 0.8.17; +pragma solidity 0.8.21; import {Plugin, IDAO} from '@aragon/osx/core/plugin/Plugin.sol';