diff --git a/packages/protocol/test-sol/utils.sol b/packages/protocol/test-sol/TestWithUtils.sol similarity index 98% rename from packages/protocol/test-sol/utils.sol rename to packages/protocol/test-sol/TestWithUtils.sol index 1776f491e7..6fc2f8e24d 100644 --- a/packages/protocol/test-sol/utils.sol +++ b/packages/protocol/test-sol/TestWithUtils.sol @@ -10,7 +10,7 @@ import "@celo-contracts/governance/interfaces/IValidators.sol"; import "@celo-contracts-8/common/IsL2Check.sol"; import "@celo-contracts/common/PrecompilesOverrideV2.sol"; -contract Utils is Test, TestConstants, IsL2Check, PrecompilesOverrideV2 { +contract TestWithUtils is Test, TestConstants, IsL2Check, PrecompilesOverrideV2 { using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet addressSet; diff --git a/packages/protocol/test-sol/devchain/migration/05Links.sol b/packages/protocol/test-sol/devchain/migration/05Links.sol index 4640cc6b9a..03ec70443d 100644 --- a/packages/protocol/test-sol/devchain/migration/05Links.sol +++ b/packages/protocol/test-sol/devchain/migration/05Links.sol @@ -16,11 +16,8 @@ import "@celo-contracts/common/Registry.sol"; import "@celo-contracts/common/UniswapFeeHandlerSeller.sol"; import "@celo-contracts/common/MentoFeeHandlerSeller.sol"; -import "celo-foundry/Test.sol"; +import { TestWithUtils } from "@test-sol/TestWithUtils.sol"; -import { TestConstants } from "@test-sol/constants.sol"; -import { Utils } from "@test-sol/utils.sol"; - -contract BlockchainParametersTest is Test, TestConstants, Utils { +contract BlockchainParametersTest is TestWithUtils { function test_dummy_test() public {} } diff --git a/packages/protocol/test-sol/integration/RevokeCeloAfterL2Transition.sol b/packages/protocol/test-sol/integration/RevokeCeloAfterL2Transition.sol index fe6220f60c..d16c6001b3 100644 --- a/packages/protocol/test-sol/integration/RevokeCeloAfterL2Transition.sol +++ b/packages/protocol/test-sol/integration/RevokeCeloAfterL2Transition.sol @@ -2,8 +2,6 @@ pragma solidity ^0.5.13; pragma experimental ABIEncoderV2; -import "celo-foundry/Test.sol"; - import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "@celo-contracts/common/FixidityLib.sol"; import "@celo-contracts/common/Registry.sol"; @@ -20,15 +18,13 @@ import "@celo-contracts/stability/test/MockStableToken.sol"; import "@celo-contracts/governance/Election.sol"; import "@celo-contracts/governance/Governance.sol"; -import { TestConstants } from "@test-sol/constants.sol"; import "@test-sol/utils/ECDSAHelper.sol"; -import { Utils } from "@test-sol/utils.sol"; -import { Test as ForgeTest } from "forge-std/Test.sol"; +import { TestWithUtils } from "@test-sol/TestWithUtils.sol"; import "@test-sol/unit/governance/validators/mocks/ValidatorsMockTunnel.sol"; import "@test-sol/unit/governance/voting/mocks/ReleaseGoldMockTunnel.sol"; import "@test-sol/unit/common/mocks/MockEpochManager.sol"; -contract RevokeCeloAfterL2Transition is Test, TestConstants, ECDSAHelper, Utils { +contract RevokeCeloAfterL2Transition is TestWithUtils, ECDSAHelper { using FixidityLib for FixidityLib.Fraction; uint256 constant TOTAL_AMOUNT = 1 ether * 1_000_000; diff --git a/packages/protocol/test-sol/unit/common/Accounts.t.sol b/packages/protocol/test-sol/unit/common/Accounts.t.sol index 0723af49f7..d28bc24488 100644 --- a/packages/protocol/test-sol/unit/common/Accounts.t.sol +++ b/packages/protocol/test-sol/unit/common/Accounts.t.sol @@ -2,16 +2,14 @@ pragma solidity ^0.5.13; pragma experimental ABIEncoderV2; -import "celo-foundry/Test.sol"; import "@celo-contracts/common/FixidityLib.sol"; import "@celo-contracts/common/Accounts.sol"; import "@celo-contracts/governance/test/MockValidators.sol"; -import { TestConstants } from "@test-sol/constants.sol"; -import { Utils } from "@test-sol/utils.sol"; +import { TestWithUtils } from "@test-sol/TestWithUtils.sol"; import "@test-sol/utils/WhenL2.sol"; -contract AccountsTest is Utils { +contract AccountsTest is TestWithUtils { using FixidityLib for FixidityLib.Fraction; Accounts accounts; diff --git a/packages/protocol/test-sol/unit/common/GoldToken.t.sol b/packages/protocol/test-sol/unit/common/GoldToken.t.sol index c0f34013d9..8d3cbf9cb6 100644 --- a/packages/protocol/test-sol/unit/common/GoldToken.t.sol +++ b/packages/protocol/test-sol/unit/common/GoldToken.t.sol @@ -3,10 +3,10 @@ pragma solidity ^0.5.13; import "@celo-contracts/common/GoldToken.sol"; -import { Utils } from "@test-sol/utils.sol"; +import { TestWithUtils } from "@test-sol/TestWithUtils.sol"; import "@test-sol/utils/WhenL2.sol"; -contract CeloTokenTest is Utils { +contract CeloTokenTest is TestWithUtils { GoldToken celoToken; uint256 constant ONE_CELOTOKEN = 1000000000000000000; diff --git a/packages/protocol/test-sol/unit/common/Proxy.t.sol b/packages/protocol/test-sol/unit/common/Proxy.t.sol index 72b48de78c..b8e105eaee 100644 --- a/packages/protocol/test-sol/unit/common/Proxy.t.sol +++ b/packages/protocol/test-sol/unit/common/Proxy.t.sol @@ -2,17 +2,14 @@ pragma solidity ^0.5.13; import "@celo-contracts/common/Proxy.sol"; -import "celo-foundry/Test.sol"; - -import { TestConstants } from "@test-sol/constants.sol"; -import { Utils } from "@test-sol/utils.sol"; +import { TestWithUtils } from "@test-sol/TestWithUtils.sol"; import "@celo-contracts/common/test/GetSetV0.sol"; import "@celo-contracts/common/test/GetSetV1.sol"; import "@celo-contracts/common/test/HasInitializer.sol"; import "@celo-contracts/common/test/MsgSenderCheck.sol"; -contract ProxyTest is Test, TestConstants, Utils { +contract ProxyTest is TestWithUtils { Proxy proxy; GetSetV0 getSet; GetSetV0 proxiedGetSet; diff --git a/packages/protocol/test-sol/unit/governance/network/BlockchainParameters.t.sol b/packages/protocol/test-sol/unit/governance/network/BlockchainParameters.t.sol index 946351b494..ebee8644d3 100644 --- a/packages/protocol/test-sol/unit/governance/network/BlockchainParameters.t.sol +++ b/packages/protocol/test-sol/unit/governance/network/BlockchainParameters.t.sol @@ -2,12 +2,9 @@ pragma solidity ^0.5.13; import "@celo-contracts/governance/BlockchainParameters.sol"; -import "celo-foundry/Test.sol"; +import { TestWithUtils } from "@test-sol/TestWithUtils.sol"; -import { TestConstants } from "@test-sol/constants.sol"; -import { Utils } from "@test-sol/utils.sol"; - -contract BlockchainParametersTest is Test, TestConstants, Utils { +contract BlockchainParametersTest is TestWithUtils { uint256 constant gasLimit = 7000000; uint256 constant gasForNonGoldCurrencies = 50000; address nonOwner; diff --git a/packages/protocol/test-sol/unit/governance/network/EpochRewards.t.sol b/packages/protocol/test-sol/unit/governance/network/EpochRewards.t.sol index 62de72bfb6..8aaf717745 100644 --- a/packages/protocol/test-sol/unit/governance/network/EpochRewards.t.sol +++ b/packages/protocol/test-sol/unit/governance/network/EpochRewards.t.sol @@ -12,10 +12,10 @@ import { MockSortedOracles } from "@celo-contracts/stability/test/MockSortedOrac import { MockStableToken } from "@celo-contracts/stability/test/MockStableToken.sol"; import { CeloTokenMock } from "@test-sol/unit/common/CeloTokenMock.sol"; -import { Utils } from "@test-sol/utils.sol"; +import { TestWithUtils } from "@test-sol/TestWithUtils.sol"; import "@test-sol/utils/WhenL2.sol"; -contract EpochRewardsTest is Utils { +contract EpochRewardsTest is TestWithUtils { uint256 constant targetVotingYieldParamsInitial = 0.00016e24; // 0.00016 uint256 constant targetVotingYieldParamsMax = 0.0005e24; // 0.0005 uint256 constant targetVotingYieldParamsAdjustmentFactor = 1127990000000000000; // 0.00000112799 diff --git a/packages/protocol/test-sol/unit/governance/network/Governance.t.sol b/packages/protocol/test-sol/unit/governance/network/Governance.t.sol index efc69e0d0c..ee4a8284cc 100644 --- a/packages/protocol/test-sol/unit/governance/network/Governance.t.sol +++ b/packages/protocol/test-sol/unit/governance/network/Governance.t.sol @@ -1,8 +1,6 @@ pragma solidity ^0.5.13; -import "celo-foundry/Test.sol"; -import { TestConstants } from "@test-sol/constants.sol"; -import { Utils } from "@test-sol/utils.sol"; +import { TestWithUtils } from "@test-sol/TestWithUtils.sol"; import "@test-sol/utils/WhenL2.sol"; import "solidity-bytes-utils/contracts/BytesLib.sol"; @@ -59,7 +57,7 @@ contract GovernanceMock is Governance(true) { } } -contract GovernanceTest is Test, TestConstants, Utils { +contract GovernanceTest is TestWithUtils { using FixidityLib for FixidityLib.Fraction; using BytesLib for bytes; diff --git a/packages/protocol/test-sol/unit/governance/validators/DowntimeSlasher.t.sol b/packages/protocol/test-sol/unit/governance/validators/DowntimeSlasher.t.sol index 26c524368c..35416ebe17 100644 --- a/packages/protocol/test-sol/unit/governance/validators/DowntimeSlasher.t.sol +++ b/packages/protocol/test-sol/unit/governance/validators/DowntimeSlasher.t.sol @@ -3,7 +3,6 @@ pragma solidity ^0.5.13; pragma experimental ABIEncoderV2; import "celo-foundry/Test.sol"; -import { TestConstants } from "@test-sol/constants.sol"; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "@celo-contracts/common/FixidityLib.sol"; @@ -13,7 +12,7 @@ import "@celo-contracts/governance/test/MockValidators.sol"; import "@celo-contracts/governance/test/MockLockedGold.sol"; import "@celo-contracts/governance/DowntimeSlasher.sol"; import "@celo-contracts/governance/test/MockUsingPrecompiles.sol"; -import { Utils } from "@test-sol/utils.sol"; +import { TestWithUtils } from "@test-sol/TestWithUtils.sol"; contract DowntimeSlasherMock is DowntimeSlasher(true), MockUsingPrecompiles, Test { struct SlashParams { @@ -77,7 +76,7 @@ contract DowntimeSlasherMock is DowntimeSlasher(true), MockUsingPrecompiles, Tes } } -contract DowntimeSlasherTest is Test, TestConstants, Utils { +contract DowntimeSlasherTest is TestWithUtils { using FixidityLib for FixidityLib.Fraction; using SafeMath for uint256; diff --git a/packages/protocol/test-sol/unit/governance/validators/Validators.t.sol b/packages/protocol/test-sol/unit/governance/validators/Validators.t.sol index c30627de31..9183fbd669 100644 --- a/packages/protocol/test-sol/unit/governance/validators/Validators.t.sol +++ b/packages/protocol/test-sol/unit/governance/validators/Validators.t.sol @@ -4,7 +4,6 @@ pragma experimental ABIEncoderV2; // This test file is in 0.5 although the contract is in 0.8 -import "celo-foundry/Test.sol"; import "openzeppelin-solidity/contracts/ownership/Ownable.sol"; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; @@ -20,11 +19,11 @@ import "@celo-contracts/governance/test/MockLockedGold.sol"; import "@test-sol/unit/governance/validators/mocks/ValidatorsMockTunnel.sol"; import "@test-sol/utils/ECDSAHelper.sol"; -import { Utils } from "@test-sol/utils.sol"; +import { TestWithUtils } from "@test-sol/TestWithUtils.sol"; import "@test-sol/utils/WhenL2.sol"; -contract ValidatorsTest is Test, Utils, ECDSAHelper { +contract ValidatorsTest is TestWithUtils, ECDSAHelper { using FixidityLib for FixidityLib.Fraction; using SafeMath for uint256; diff --git a/packages/protocol/test-sol/unit/governance/voting/Election.t.sol b/packages/protocol/test-sol/unit/governance/voting/Election.t.sol index 6e4fc539fb..3a58b4a26f 100644 --- a/packages/protocol/test-sol/unit/governance/voting/Election.t.sol +++ b/packages/protocol/test-sol/unit/governance/voting/Election.t.sol @@ -2,8 +2,7 @@ pragma solidity ^0.5.13; pragma experimental ABIEncoderV2; -import "celo-foundry/Test.sol"; -import { Utils } from "@test-sol/utils.sol"; +import { TestWithUtils } from "@test-sol/TestWithUtils.sol"; import "@celo-contracts/common/FixidityLib.sol"; import "@celo-contracts/common/Registry.sol"; @@ -30,7 +29,7 @@ contract ElectionMock is Election(true) { } } -contract ElectionTest is Utils { +contract ElectionTest is TestWithUtils { using FixidityLib for FixidityLib.Fraction; Accounts accounts; diff --git a/packages/protocol/test-sol/unit/governance/voting/LockedGold.t.sol b/packages/protocol/test-sol/unit/governance/voting/LockedGold.t.sol index f8e27c5b4c..dfa4d45e99 100644 --- a/packages/protocol/test-sol/unit/governance/voting/LockedGold.t.sol +++ b/packages/protocol/test-sol/unit/governance/voting/LockedGold.t.sol @@ -2,7 +2,7 @@ pragma solidity ^0.5.13; pragma experimental ABIEncoderV2; -import { Utils } from "@test-sol/utils.sol"; +import { TestWithUtils } from "@test-sol/TestWithUtils.sol"; import "@test-sol/utils/WhenL2.sol"; import "@celo-contracts/common/FixidityLib.sol"; @@ -18,7 +18,7 @@ import "@celo-contracts/governance/test/MockValidators.sol"; import { TestBlocker } from "@test-sol/unit/common/Blockable.t.sol"; -contract LockedGoldTest is Utils { +contract LockedGoldTest is TestWithUtils { using FixidityLib for FixidityLib.Fraction; Accounts accounts; diff --git a/packages/protocol/test-sol/unit/governance/voting/ReleaseGold.t.sol b/packages/protocol/test-sol/unit/governance/voting/ReleaseGold.t.sol index 06121cae4c..f29213431a 100644 --- a/packages/protocol/test-sol/unit/governance/voting/ReleaseGold.t.sol +++ b/packages/protocol/test-sol/unit/governance/voting/ReleaseGold.t.sol @@ -2,7 +2,7 @@ pragma solidity ^0.5.13; pragma experimental ABIEncoderV2; -import { Utils } from "@test-sol/utils.sol"; +import { TestWithUtils } from "@test-sol/TestWithUtils.sol"; import "@test-sol/utils/WhenL2.sol"; import { ECDSAHelper } from "@test-sol/utils/ECDSAHelper.sol"; @@ -23,7 +23,7 @@ import "@celo-contracts/governance/test/MockElection.sol"; import "@celo-contracts/governance/test/MockGovernance.sol"; import "@celo-contracts/governance/test/MockValidators.sol"; -contract ReleaseGoldTest is Utils, ECDSAHelper { +contract ReleaseGoldTest is TestWithUtils, ECDSAHelper { using FixidityLib for FixidityLib.Fraction; Accounts accounts; diff --git a/packages/protocol/test-sol/unit/identity/Random.t.sol b/packages/protocol/test-sol/unit/identity/Random.t.sol index 55ccf31dc2..3a6b33eb0c 100644 --- a/packages/protocol/test-sol/unit/identity/Random.t.sol +++ b/packages/protocol/test-sol/unit/identity/Random.t.sol @@ -1,14 +1,12 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.5.13; -import "celo-foundry/Test.sol"; -import { Utils } from "@test-sol/utils.sol"; -import { TestConstants } from "@test-sol/constants.sol"; +import { TestWithUtils } from "@test-sol/TestWithUtils.sol"; import "@celo-contracts/identity/Random.sol"; import "@celo-contracts/identity/test/RandomTest.sol"; -contract RandomTest_ is Test, TestConstants, IsL2Check, Utils { +contract RandomTest_ is TestWithUtils { RandomTest random; event RandomnessBlockRetentionWindowSet(uint256 value); diff --git a/packages/protocol/test-sol/utils/WhenL2.sol b/packages/protocol/test-sol/utils/WhenL2.sol index f5d32ef898..3891956e13 100644 --- a/packages/protocol/test-sol/utils/WhenL2.sol +++ b/packages/protocol/test-sol/utils/WhenL2.sol @@ -1,9 +1,9 @@ pragma solidity ^0.5.13; pragma experimental ABIEncoderV2; -import "@test-sol/utils.sol"; +import "@test-sol/TestWithUtils.sol"; -contract WhenL2 is Utils { +contract WhenL2 is TestWithUtils { function setUp() public { super.setUp(); whenL2WithEpochManagerInitialization();