From 0f78896d0e9d2c57ce09591010e08416400b975c Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Tue, 12 Nov 2024 17:28:00 +0400 Subject: [PATCH 1/6] Cross-port remappings fixes from commit https://github.com/OlympusDAO/olympus-v3/pull/19/commits/7599f27adf8637687b8f8b1542f0a44bafcb808b # Conflicts: # src/test/policies/EmissionManager.t.sol # src/test/policies/Heart.t.sol # src/test/policies/ReserveMigrator.t.sol # src/test/proposals/EmissionManagerProposal.t.sol # src/test/proposals/OIP_168.t.sol # src/test/sim/RangeSim.sol --- foundry.toml | 2 +- remappings.txt | 22 +++++++++++++---- src/scripts/deploy/DeployV2.sol | 8 +++---- src/scripts/deploy/LegacyBurnerDeps.s.sol | 2 +- src/test/Kernel.t.sol | 2 +- src/test/external/ClaimTransfer.t.sol | 2 +- src/test/external/cooler/Cooler.t.sol | 6 ++--- src/test/external/cooler/CoolerFactory.t.sol | 4 ++-- .../governance/GovernorBravoDelegate.t.sol | 4 ++-- src/test/modules/BLREG.t.sol | 2 +- src/test/modules/CHREG.t.sol | 2 +- src/test/modules/INSTR.t.sol | 12 +++++----- src/test/modules/MINTR.t.sol | 10 ++++---- src/test/modules/PRICE.t.sol | 6 ++--- src/test/modules/RANGE.t.sol | 4 ++-- src/test/modules/ROLES.t.sol | 4 ++-- src/test/modules/TRSRY.t.sol | 6 ++--- src/test/modules/VOTES.t.sol | 4 ++-- src/test/policies/BondCallback.t.sol | 12 +++++----- src/test/policies/BondManager.t.sol | 12 +++++----- .../BoostedLiquidity/BLVaultLidoFork.t.sol | 6 ++--- .../BoostedLiquidity/BLVaultLidoMocks.t.sol | 12 +++++----- .../BoostedLiquidity/BLVaultLusdFork.t.sol | 6 ++--- .../BoostedLiquidity/BLVaultLusdMocks.t.sol | 12 +++++----- .../BLVaultManagerLidoFork.t.sol | 6 ++--- .../BLVaultManagerLidoMocks.t.sol | 12 +++++----- .../BLVaultManagerLusdFork.t.sol | 6 ++--- .../BLVaultManagerLusdMocks.t.sol | 12 +++++----- src/test/policies/Burner.t.sol | 4 ++-- src/test/policies/Clearinghouse.t.sol | 6 ++--- src/test/policies/CrossChainBridge.t.sol | 4 ++-- src/test/policies/CrossChainBridgeFork.t.sol | 6 ++--- src/test/policies/Distributor.t.sol | 2 +- src/test/policies/Emergency.t.sol | 8 +++---- src/test/policies/Heart.t.sol | 8 +++---- src/test/policies/LegacyBurner.t.sol | 6 ++--- src/test/policies/Minter.t.sol | 4 ++-- src/test/policies/Operator.t.sol | 12 +++++----- src/test/policies/Parthenon.t.sol | 4 ++-- src/test/policies/PriceConfig.t.sol | 4 ++-- src/test/policies/RolesAdmin.t.sol | 2 +- src/test/policies/TreasuryCustodian.t.sol | 2 +- src/test/policies/VohmVault.t.sol | 4 ++-- .../policies/YieldRepurchaseFacility.t.sol | 14 +++++------ src/test/policies/pOLY.t.sol | 4 ++-- src/test/proposals/OIP_166.t.sol | 2 +- src/test/proposals/OIP_XXX.t.sol | 2 +- src/test/sim/RangeSim.sol | 24 +++++++++---------- src/test/sim/SimTemplate.sol.x | 2 +- 49 files changed, 168 insertions(+), 154 deletions(-) diff --git a/foundry.toml b/foundry.toml index 1d473954..5ad38205 100644 --- a/foundry.toml +++ b/foundry.toml @@ -13,8 +13,8 @@ remappings = [ 'layer-zero/=lib/solidity-examples/contracts/', '@openzeppelin/=lib/openzeppelin-contracts/', 'bonds/=lib/bonds/src/', - 'test/=src/test/', 'clones/=lib/clones-with-immutable-args/src/', + 'proposal-sim/=lib/forge-proposal-simulator/', ] fs_permissions = [ {access = "write", path = "./src/test/sim/out/"}, diff --git a/remappings.txt b/remappings.txt index 38d7db8b..7e14fdab 100644 --- a/remappings.txt +++ b/remappings.txt @@ -5,11 +5,25 @@ modules/=src/modules/ policies/=src/policies/ libraries/=src/libraries/ solmate/=lib/solmate/src/ +balancer-v2/=lib/balancer-v2/ layer-zero/=lib/solidity-examples/contracts/ +@openzeppelin/=lib/openzeppelin-contracts/ bonds/=lib/bonds/src/ test/=src/test/ clones/=lib/clones-with-immutable-args/src/ -proposal-sim=lib/forge-proposal-simulator/ -proposal-sim/proposals/=lib/forge-proposal-simulator/proposals/ -proposals/=src/proposals/ -openzeppelin/=lib/openzeppelin-contracts/contracts +proposal-sim/=lib/forge-proposal-simulator/ +@addresses/=lib/forge-proposal-simulator/addresses/ +@examples/=lib/forge-proposal-simulator/examples/ +@proposals/=lib/forge-proposal-simulator/proposals/ +@script/=lib/forge-proposal-simulator/script/ +@test/=lib/forge-proposal-simulator/test/ +@utils/=lib/forge-proposal-simulator/utils/ +clones-with-immutable-args/=lib/clones-with-immutable-args/src/ +comp-governance/=lib/forge-proposal-simulator/lib/compound-governance/contracts/ +compound-governance/=lib/forge-proposal-simulator/lib/compound-governance/contracts/ +erc4626-tests/=lib/forge-proposal-simulator/lib/openzeppelin-contracts/lib/erc4626-tests/ +forge-proposal-simulator/=lib/forge-proposal-simulator/ +openzeppelin-contracts/=lib/openzeppelin-contracts/ +openzeppelin/=lib/forge-proposal-simulator/lib/openzeppelin-contracts/contracts/ +solidity-code-metrics/=node_modules/solidity-code-metrics/ +solidity-examples/=lib/solidity-examples/contracts/ diff --git a/src/scripts/deploy/DeployV2.sol b/src/scripts/deploy/DeployV2.sol index c7dd96d4..913bdbe0 100644 --- a/src/scripts/deploy/DeployV2.sol +++ b/src/scripts/deploy/DeployV2.sol @@ -62,11 +62,11 @@ import {ClaimTransfer} from "src/external/ClaimTransfer.sol"; import {Clearinghouse} from "policies/Clearinghouse.sol"; import {YieldRepurchaseFacility} from "policies/YieldRepurchaseFacility.sol"; -import {MockPriceFeed} from "test/mocks/MockPriceFeed.sol"; -import {MockAuraBooster, MockAuraRewardPool, MockAuraMiningLib, MockAuraVirtualRewardPool, MockAuraStashToken} from "test/mocks/AuraMocks.sol"; -import {MockBalancerPool, MockVault} from "test/mocks/BalancerMocks.sol"; +import {MockPriceFeed} from "src/test/mocks/MockPriceFeed.sol"; +import {MockAuraBooster, MockAuraRewardPool, MockAuraMiningLib, MockAuraVirtualRewardPool, MockAuraStashToken} from "src/test/mocks/AuraMocks.sol"; +import {MockBalancerPool, MockVault} from "src/test/mocks/BalancerMocks.sol"; import {MockERC20} from "solmate/test/utils/mocks/MockERC20.sol"; -import {Faucet} from "test/mocks/Faucet.sol"; +import {Faucet} from "src/test/mocks/Faucet.sol"; import {CoolerUtils} from "src/external/cooler/CoolerUtils.sol"; import {TransferHelper} from "libraries/TransferHelper.sol"; diff --git a/src/scripts/deploy/LegacyBurnerDeps.s.sol b/src/scripts/deploy/LegacyBurnerDeps.s.sol index 4803c581..b17be544 100644 --- a/src/scripts/deploy/LegacyBurnerDeps.s.sol +++ b/src/scripts/deploy/LegacyBurnerDeps.s.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.15; import {Script, console2} from "forge-std/Script.sol"; -import {MockLegacyInverseBondDepo} from "test/mocks/MockLegacyInverseBondDepo.sol"; +import {MockLegacyInverseBondDepo} from "src/test/mocks/MockLegacyInverseBondDepo.sol"; contract LegacyBurnerDepsDeploy is Script { address public authority = 0x4A8c9502A34962a2C6d73c5D181dAaeF3dcDc88D; diff --git a/src/test/Kernel.t.sol b/src/test/Kernel.t.sol index b5bf8454..a05397e3 100644 --- a/src/test/Kernel.t.sol +++ b/src/test/Kernel.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.15; import {Test} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import "./mocks/KernelTestMocks.sol"; diff --git a/src/test/external/ClaimTransfer.t.sol b/src/test/external/ClaimTransfer.t.sol index add4e605..4cc5183f 100644 --- a/src/test/external/ClaimTransfer.t.sol +++ b/src/test/external/ClaimTransfer.t.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.15; import {Test} from "forge-std/Test.sol"; import {stdError} from "forge-std/StdError.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import {MockERC20} from "solmate/test/utils/mocks/MockERC20.sol"; diff --git a/src/test/external/cooler/Cooler.t.sol b/src/test/external/cooler/Cooler.t.sol index 726b1417..2dba7d84 100644 --- a/src/test/external/cooler/Cooler.t.sol +++ b/src/test/external/cooler/Cooler.t.sol @@ -3,11 +3,11 @@ pragma solidity ^0.8.15; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; -import {MockGohm} from "test/mocks/MockGohm.sol"; +import {MockGohm} from "src/test/mocks/MockGohm.sol"; import {MockERC20} from "solmate/test/utils/mocks/MockERC20.sol"; -import {MockLender} from "test/mocks/MockCallbackLender.sol"; +import {MockLender} from "src/test/mocks/MockCallbackLender.sol"; import {Cooler} from "src/external/cooler/Cooler.sol"; import {CoolerFactory} from "src/external/cooler/CoolerFactory.sol"; diff --git a/src/test/external/cooler/CoolerFactory.t.sol b/src/test/external/cooler/CoolerFactory.t.sol index 2e01dcb5..195cfd2b 100644 --- a/src/test/external/cooler/CoolerFactory.t.sol +++ b/src/test/external/cooler/CoolerFactory.t.sol @@ -2,9 +2,9 @@ pragma solidity ^0.8.15; import {Test} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; -import {MockERC20} from "test/mocks/OlympusMocks.sol"; +import {MockERC20} from "src/test/mocks/OlympusMocks.sol"; import {CoolerFactory} from "src/external/cooler/CoolerFactory.sol"; diff --git a/src/test/external/governance/GovernorBravoDelegate.t.sol b/src/test/external/governance/GovernorBravoDelegate.t.sol index 9890a6db..a2b0718e 100644 --- a/src/test/external/governance/GovernorBravoDelegate.t.sol +++ b/src/test/external/governance/GovernorBravoDelegate.t.sol @@ -2,11 +2,11 @@ pragma solidity 0.8.15; import {Test} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {console2} from "forge-std/console2.sol"; -import {MockGohm} from "test/mocks/OlympusMocks.sol"; +import {MockGohm} from "src/test/mocks/OlympusMocks.sol"; import {OlympusTreasury} from "modules/TRSRY/OlympusTreasury.sol"; import {OlympusRoles} from "modules/ROLES/OlympusRoles.sol"; diff --git a/src/test/modules/BLREG.t.sol b/src/test/modules/BLREG.t.sol index 96051586..53e1b318 100644 --- a/src/test/modules/BLREG.t.sol +++ b/src/test/modules/BLREG.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.15; import {Test} from "forge-std/Test.sol"; -import {ModuleTestFixtureGenerator} from "test/lib/ModuleTestFixtureGenerator.sol"; +import {ModuleTestFixtureGenerator} from "src/test/lib/ModuleTestFixtureGenerator.sol"; import "modules/BLREG/OlympusBoostedLiquidityRegistry.sol"; import "src/Kernel.sol"; diff --git a/src/test/modules/CHREG.t.sol b/src/test/modules/CHREG.t.sol index accdd5cd..8466311f 100644 --- a/src/test/modules/CHREG.t.sol +++ b/src/test/modules/CHREG.t.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.15; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {ModuleTestFixtureGenerator} from "test/lib/ModuleTestFixtureGenerator.sol"; +import {ModuleTestFixtureGenerator} from "src/test/lib/ModuleTestFixtureGenerator.sol"; import "modules/CHREG/OlympusClearinghouseRegistry.sol"; import "src/Kernel.sol"; diff --git a/src/test/modules/INSTR.t.sol b/src/test/modules/INSTR.t.sol index d65d6934..e241d1fb 100644 --- a/src/test/modules/INSTR.t.sol +++ b/src/test/modules/INSTR.t.sol @@ -3,14 +3,14 @@ pragma solidity >=0.8.0; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {ModuleTestFixtureGenerator} from "test/lib/ModuleTestFixtureGenerator.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {ModuleTestFixtureGenerator} from "src/test/lib/ModuleTestFixtureGenerator.sol"; import {Parthenon} from "policies/Parthenon.sol"; -import {MockModuleWriter} from "test/mocks/MockModuleWriter.sol"; -import {MockInvalidModule} from "test/mocks/MockInvalidModule.sol"; -import {MockValidModule} from "test/mocks/MockValidModule.sol"; -import {MockValidUpgradedModule} from "test/mocks/MockValidUpgradedModule.sol"; +import {MockModuleWriter} from "src/test/mocks/MockModuleWriter.sol"; +import {MockInvalidModule} from "src/test/mocks/MockInvalidModule.sol"; +import {MockValidModule} from "src/test/mocks/MockValidModule.sol"; +import {MockValidUpgradedModule} from "src/test/mocks/MockValidUpgradedModule.sol"; import "modules/INSTR/OlympusInstructions.sol"; import "src/Kernel.sol"; diff --git a/src/test/modules/MINTR.t.sol b/src/test/modules/MINTR.t.sol index 198188e6..146e850c 100644 --- a/src/test/modules/MINTR.t.sol +++ b/src/test/modules/MINTR.t.sol @@ -3,12 +3,12 @@ pragma solidity 0.8.15; import {Test} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {larping} from "test/lib/larping.sol"; -import {Quabi} from "test/lib/quabi/Quabi.sol"; -import {MockLegacyAuthority} from "test/mocks/MockLegacyAuthority.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {larping} from "src/test/lib/larping.sol"; +import {Quabi} from "src/test/lib/quabi/Quabi.sol"; +import {MockLegacyAuthority} from "src/test/mocks/MockLegacyAuthority.sol"; -import {ModuleTestFixtureGenerator} from "test/lib/ModuleTestFixtureGenerator.sol"; +import {ModuleTestFixtureGenerator} from "src/test/lib/ModuleTestFixtureGenerator.sol"; import {OlympusERC20Token, IOlympusAuthority} from "src/external/OlympusERC20.sol"; import "modules/MINTR/OlympusMinter.sol"; diff --git a/src/test/modules/PRICE.t.sol b/src/test/modules/PRICE.t.sol index c21e309c..4f416926 100644 --- a/src/test/modules/PRICE.t.sol +++ b/src/test/modules/PRICE.t.sol @@ -3,13 +3,13 @@ pragma solidity >=0.8.0; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {ModuleTestFixtureGenerator} from "test/lib/ModuleTestFixtureGenerator.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {ModuleTestFixtureGenerator} from "src/test/lib/ModuleTestFixtureGenerator.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {FullMath} from "libraries/FullMath.sol"; -import {MockPriceFeed} from "test/mocks/MockPriceFeed.sol"; +import {MockPriceFeed} from "src/test/mocks/MockPriceFeed.sol"; import {OlympusPrice} from "modules/PRICE/OlympusPrice.sol"; import "src/Kernel.sol"; diff --git a/src/test/modules/RANGE.t.sol b/src/test/modules/RANGE.t.sol index b9f60f55..5be38253 100644 --- a/src/test/modules/RANGE.t.sol +++ b/src/test/modules/RANGE.t.sol @@ -3,8 +3,8 @@ pragma solidity >=0.8.0; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {ModuleTestFixtureGenerator} from "test/lib/ModuleTestFixtureGenerator.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {ModuleTestFixtureGenerator} from "src/test/lib/ModuleTestFixtureGenerator.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; diff --git a/src/test/modules/ROLES.t.sol b/src/test/modules/ROLES.t.sol index e6c088dc..dcab7054 100644 --- a/src/test/modules/ROLES.t.sol +++ b/src/test/modules/ROLES.t.sol @@ -2,9 +2,9 @@ pragma solidity 0.8.15; import {Test} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import {console2 as console} from "forge-std/console2.sol"; -import {ModuleTestFixtureGenerator} from "test/lib/ModuleTestFixtureGenerator.sol"; +import {ModuleTestFixtureGenerator} from "src/test/lib/ModuleTestFixtureGenerator.sol"; import {ROLESv1} from "src/modules/ROLES/ROLES.v1.sol"; import {OlympusRoles} from "src/modules/ROLES/OlympusRoles.sol"; diff --git a/src/test/modules/TRSRY.t.sol b/src/test/modules/TRSRY.t.sol index ed101d8d..1f904d6a 100644 --- a/src/test/modules/TRSRY.t.sol +++ b/src/test/modules/TRSRY.t.sol @@ -2,13 +2,13 @@ pragma solidity 0.8.15; import {Test} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import {console2 as console} from "forge-std/console2.sol"; -import {ModuleTestFixtureGenerator} from "test/lib/ModuleTestFixtureGenerator.sol"; +import {ModuleTestFixtureGenerator} from "src/test/lib/ModuleTestFixtureGenerator.sol"; import {MockERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {OlympusERC20Token} from "src/external/OlympusERC20.sol"; -//import {MockPolicy} from "test/mocks/KernelTestMocks.sol"; +//import {MockPolicy} from "src/test/mocks/KernelTestMocks.sol"; import {OlympusTreasury} from "src/modules/TRSRY/OlympusTreasury.sol"; import {TRSRYv1} from "src/modules/TRSRY/TRSRY.v1.sol"; diff --git a/src/test/modules/VOTES.t.sol b/src/test/modules/VOTES.t.sol index 23f29a8a..be993720 100644 --- a/src/test/modules/VOTES.t.sol +++ b/src/test/modules/VOTES.t.sol @@ -6,12 +6,12 @@ import {ERC20} from "solmate/tokens/ERC20.sol"; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import {Kernel, Actions} from "src/Kernel.sol"; import {OlympusVotes} from "src/modules/VOTES/OlympusVotes.sol"; -import "test/lib/ModuleTestFixtureGenerator.sol"; +import {ModuleTestFixtureGenerator} from "src/test/lib/ModuleTestFixtureGenerator.sol"; contract VOTESTest is Test { using ModuleTestFixtureGenerator for OlympusVotes; diff --git a/src/test/policies/BondCallback.t.sol b/src/test/policies/BondCallback.t.sol index 23712485..8a7891cb 100644 --- a/src/test/policies/BondCallback.t.sol +++ b/src/test/policies/BondCallback.t.sol @@ -3,17 +3,17 @@ pragma solidity >=0.8.0; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; -import {BondFixedTermSDA} from "test/lib/bonds/BondFixedTermSDA.sol"; -import {BondAggregator} from "test/lib/bonds/BondAggregator.sol"; -import {BondFixedTermTeller} from "test/lib/bonds/BondFixedTermTeller.sol"; -import {IBondSDA as LibIBondSDA} from "test/lib/bonds/interfaces/IBondSDA.sol"; +import {BondFixedTermSDA} from "src/test/lib/bonds/BondFixedTermSDA.sol"; +import {BondAggregator} from "src/test/lib/bonds/BondAggregator.sol"; +import {BondFixedTermTeller} from "src/test/lib/bonds/BondFixedTermTeller.sol"; +import {IBondSDA as LibIBondSDA} from "src/test/lib/bonds/interfaces/IBondSDA.sol"; import {RolesAuthority, Authority as SolmateAuthority} from "solmate/auth/authorities/RolesAuthority.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {MockERC4626, ERC4626} from "solmate/test/utils/mocks/MockERC4626.sol"; -import {MockPrice} from "test/mocks/MockPrice.sol"; +import {MockPrice} from "src/test/mocks/MockPrice.sol"; import {IBondSDA} from "interfaces/IBondSDA.sol"; import {IBondAggregator} from "interfaces/IBondAggregator.sol"; diff --git a/src/test/policies/BondManager.t.sol b/src/test/policies/BondManager.t.sol index 12cf7c87..ee71ecd5 100644 --- a/src/test/policies/BondManager.t.sol +++ b/src/test/policies/BondManager.t.sol @@ -2,8 +2,8 @@ pragma solidity 0.8.15; import {Test} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {larping} from "test/lib/larping.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {larping} from "src/test/lib/larping.sol"; import {console2} from "forge-std/console2.sol"; import {OlympusERC20Token, IOlympusAuthority} from "src/external/OlympusERC20.sol"; @@ -23,10 +23,10 @@ import {BondManager} from "policies/BondManager.sol"; import {RolesAdmin} from "policies/RolesAdmin.sol"; import {RolesAuthority, Authority as SolmateAuthority} from "solmate/auth/authorities/RolesAuthority.sol"; -import {MockAggregator} from "test/mocks/MockAggregator.sol"; -import {MockFixedExpirySDA} from "test/mocks/MockFixedExpirySDA.sol"; -import {MockFixedExpiryTeller} from "test/mocks/MockFixedExpiryTeller.sol"; -import {MockEasyAuction} from "test/mocks/MockEasyAuction.sol"; +import {MockAggregator} from "src/test/mocks/MockAggregator.sol"; +import {MockFixedExpirySDA} from "src/test/mocks/MockFixedExpirySDA.sol"; +import {MockFixedExpiryTeller} from "src/test/mocks/MockFixedExpiryTeller.sol"; +import {MockEasyAuction} from "src/test/mocks/MockEasyAuction.sol"; import {IBondAggregator} from "interfaces/IBondAggregator.sol"; diff --git a/src/test/policies/BoostedLiquidity/BLVaultLidoFork.t.sol b/src/test/policies/BoostedLiquidity/BLVaultLidoFork.t.sol index ec19f767..9df127fa 100644 --- a/src/test/policies/BoostedLiquidity/BLVaultLidoFork.t.sol +++ b/src/test/policies/BoostedLiquidity/BLVaultLidoFork.t.sol @@ -2,12 +2,12 @@ pragma solidity 0.8.15; import {Test, stdError} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {larping} from "test/lib/larping.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {larping} from "src/test/lib/larping.sol"; import {FullMath} from "libraries/FullMath.sol"; -import {MockLegacyAuthority} from "test/mocks/MockLegacyAuthority.sol"; +import {MockLegacyAuthority} from "src/test/mocks/MockLegacyAuthority.sol"; import {ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {OlympusERC20Token, IOlympusAuthority} from "src/external/OlympusERC20.sol"; diff --git a/src/test/policies/BoostedLiquidity/BLVaultLidoMocks.t.sol b/src/test/policies/BoostedLiquidity/BLVaultLidoMocks.t.sol index 72eff662..41c2829e 100644 --- a/src/test/policies/BoostedLiquidity/BLVaultLidoMocks.t.sol +++ b/src/test/policies/BoostedLiquidity/BLVaultLidoMocks.t.sol @@ -2,16 +2,16 @@ pragma solidity 0.8.15; import {Test, stdError} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {larping} from "test/lib/larping.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {larping} from "src/test/lib/larping.sol"; import {FullMath} from "libraries/FullMath.sol"; -import {MockLegacyAuthority} from "test/mocks/MockLegacyAuthority.sol"; +import {MockLegacyAuthority} from "src/test/mocks/MockLegacyAuthority.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; -import {MockPriceFeed} from "test/mocks/MockPriceFeed.sol"; -import {MockVault, MockBalancerPool} from "test/mocks/BalancerMocks.sol"; -import {MockAuraBooster, MockAuraRewardPool} from "test/mocks/AuraMocks.sol"; +import {MockPriceFeed} from "src/test/mocks/MockPriceFeed.sol"; +import {MockVault, MockBalancerPool} from "src/test/mocks/BalancerMocks.sol"; +import {MockAuraBooster, MockAuraRewardPool} from "src/test/mocks/AuraMocks.sol"; import {OlympusERC20Token, IOlympusAuthority} from "src/external/OlympusERC20.sol"; import {IAuraBooster, IAuraRewardPool} from "policies/BoostedLiquidity/interfaces/IAura.sol"; diff --git a/src/test/policies/BoostedLiquidity/BLVaultLusdFork.t.sol b/src/test/policies/BoostedLiquidity/BLVaultLusdFork.t.sol index 9e8b96e2..106625bf 100644 --- a/src/test/policies/BoostedLiquidity/BLVaultLusdFork.t.sol +++ b/src/test/policies/BoostedLiquidity/BLVaultLusdFork.t.sol @@ -2,12 +2,12 @@ pragma solidity 0.8.15; import {Test, stdError} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {larping} from "test/lib/larping.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {larping} from "src/test/lib/larping.sol"; import {FullMath} from "libraries/FullMath.sol"; -import {MockLegacyAuthority} from "test/mocks/MockLegacyAuthority.sol"; +import {MockLegacyAuthority} from "src/test/mocks/MockLegacyAuthority.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {OlympusERC20Token, IOlympusAuthority} from "src/external/OlympusERC20.sol"; diff --git a/src/test/policies/BoostedLiquidity/BLVaultLusdMocks.t.sol b/src/test/policies/BoostedLiquidity/BLVaultLusdMocks.t.sol index 7b8ba5f3..b38c423b 100644 --- a/src/test/policies/BoostedLiquidity/BLVaultLusdMocks.t.sol +++ b/src/test/policies/BoostedLiquidity/BLVaultLusdMocks.t.sol @@ -2,16 +2,16 @@ pragma solidity 0.8.15; import {Test, stdError} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {larping} from "test/lib/larping.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {larping} from "src/test/lib/larping.sol"; import {FullMath} from "libraries/FullMath.sol"; -import {MockLegacyAuthority} from "test/mocks/MockLegacyAuthority.sol"; +import {MockLegacyAuthority} from "src/test/mocks/MockLegacyAuthority.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; -import {MockPriceFeed} from "test/mocks/MockPriceFeed.sol"; -import {MockBalancerVault, MockBalancerPool} from "test/mocks/BalancerMocks.sol"; -import {MockAuraBooster, MockAuraRewardPool, MockAuraStashToken, MockAuraVirtualRewardPool} from "test/mocks/AuraMocks.sol"; +import {MockPriceFeed} from "src/test/mocks/MockPriceFeed.sol"; +import {MockBalancerVault, MockBalancerPool} from "src/test/mocks/BalancerMocks.sol"; +import {MockAuraBooster, MockAuraRewardPool, MockAuraStashToken, MockAuraVirtualRewardPool} from "src/test/mocks/AuraMocks.sol"; import {OlympusERC20Token, IOlympusAuthority} from "src/external/OlympusERC20.sol"; import {IAuraBooster, IAuraRewardPool} from "policies/BoostedLiquidity/interfaces/IAura.sol"; diff --git a/src/test/policies/BoostedLiquidity/BLVaultManagerLidoFork.t.sol b/src/test/policies/BoostedLiquidity/BLVaultManagerLidoFork.t.sol index 993f4dee..bc7e5773 100644 --- a/src/test/policies/BoostedLiquidity/BLVaultManagerLidoFork.t.sol +++ b/src/test/policies/BoostedLiquidity/BLVaultManagerLidoFork.t.sol @@ -2,12 +2,12 @@ pragma solidity 0.8.15; import {Test, stdError} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {larping} from "test/lib/larping.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {larping} from "src/test/lib/larping.sol"; import {FullMath} from "libraries/FullMath.sol"; -import {MockLegacyAuthority} from "test/mocks/MockLegacyAuthority.sol"; +import {MockLegacyAuthority} from "src/test/mocks/MockLegacyAuthority.sol"; import {ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {OlympusERC20Token, IOlympusAuthority} from "src/external/OlympusERC20.sol"; diff --git a/src/test/policies/BoostedLiquidity/BLVaultManagerLidoMocks.t.sol b/src/test/policies/BoostedLiquidity/BLVaultManagerLidoMocks.t.sol index 356cde58..5f950ba0 100644 --- a/src/test/policies/BoostedLiquidity/BLVaultManagerLidoMocks.t.sol +++ b/src/test/policies/BoostedLiquidity/BLVaultManagerLidoMocks.t.sol @@ -2,16 +2,16 @@ pragma solidity 0.8.15; import {Test, stdError} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {larping} from "test/lib/larping.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {larping} from "src/test/lib/larping.sol"; import {FullMath} from "libraries/FullMath.sol"; -import {MockLegacyAuthority} from "test/mocks/MockLegacyAuthority.sol"; +import {MockLegacyAuthority} from "src/test/mocks/MockLegacyAuthority.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; -import {MockPriceFeed} from "test/mocks/MockPriceFeed.sol"; -import {MockVault, MockBalancerPool} from "test/mocks/BalancerMocks.sol"; -import {MockAuraBooster, MockAuraRewardPool, MockAuraMiningLib} from "test/mocks/AuraMocks.sol"; +import {MockPriceFeed} from "src/test/mocks/MockPriceFeed.sol"; +import {MockVault, MockBalancerPool} from "src/test/mocks/BalancerMocks.sol"; +import {MockAuraBooster, MockAuraRewardPool, MockAuraMiningLib} from "src/test/mocks/AuraMocks.sol"; import {OlympusERC20Token, IOlympusAuthority} from "src/external/OlympusERC20.sol"; import {IAuraBooster, IAuraRewardPool} from "policies/BoostedLiquidity/interfaces/IAura.sol"; diff --git a/src/test/policies/BoostedLiquidity/BLVaultManagerLusdFork.t.sol b/src/test/policies/BoostedLiquidity/BLVaultManagerLusdFork.t.sol index 9e7170f8..fb6084aa 100644 --- a/src/test/policies/BoostedLiquidity/BLVaultManagerLusdFork.t.sol +++ b/src/test/policies/BoostedLiquidity/BLVaultManagerLusdFork.t.sol @@ -2,12 +2,12 @@ pragma solidity 0.8.15; import {Test, stdError} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {larping} from "test/lib/larping.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {larping} from "src/test/lib/larping.sol"; import {FullMath} from "libraries/FullMath.sol"; -import {MockLegacyAuthority} from "test/mocks/MockLegacyAuthority.sol"; +import {MockLegacyAuthority} from "src/test/mocks/MockLegacyAuthority.sol"; import {ERC20, MockERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {OlympusERC20Token, IOlympusAuthority} from "src/external/OlympusERC20.sol"; diff --git a/src/test/policies/BoostedLiquidity/BLVaultManagerLusdMocks.t.sol b/src/test/policies/BoostedLiquidity/BLVaultManagerLusdMocks.t.sol index d447d005..d1180bb0 100644 --- a/src/test/policies/BoostedLiquidity/BLVaultManagerLusdMocks.t.sol +++ b/src/test/policies/BoostedLiquidity/BLVaultManagerLusdMocks.t.sol @@ -2,16 +2,16 @@ pragma solidity 0.8.15; import {Test, stdError} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {larping} from "test/lib/larping.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {larping} from "src/test/lib/larping.sol"; import {FullMath} from "libraries/FullMath.sol"; -import {MockLegacyAuthority} from "test/mocks/MockLegacyAuthority.sol"; +import {MockLegacyAuthority} from "src/test/mocks/MockLegacyAuthority.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; -import {MockPriceFeed} from "test/mocks/MockPriceFeed.sol"; -import {MockVault, MockBalancerPool} from "test/mocks/BalancerMocks.sol"; -import {MockAuraBooster, MockAuraRewardPool, MockAuraMiningLib, MockAuraStashToken} from "test/mocks/AuraMocks.sol"; +import {MockPriceFeed} from "src/test/mocks/MockPriceFeed.sol"; +import {MockVault, MockBalancerPool} from "src/test/mocks/BalancerMocks.sol"; +import {MockAuraBooster, MockAuraRewardPool, MockAuraMiningLib, MockAuraStashToken} from "src/test/mocks/AuraMocks.sol"; import {OlympusERC20Token, IOlympusAuthority} from "src/external/OlympusERC20.sol"; import {IAuraBooster, IAuraRewardPool} from "policies/BoostedLiquidity/interfaces/IAura.sol"; diff --git a/src/test/policies/Burner.t.sol b/src/test/policies/Burner.t.sol index 76d1ba42..c30b919f 100644 --- a/src/test/policies/Burner.t.sol +++ b/src/test/policies/Burner.t.sol @@ -3,10 +3,10 @@ pragma solidity >=0.8.0; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; -import {MockOhm} from "test/mocks/MockOhm.sol"; +import {MockOhm} from "src/test/mocks/MockOhm.sol"; import "src/Kernel.sol"; import {OlympusTreasury} from "modules/TRSRY/OlympusTreasury.sol"; diff --git a/src/test/policies/Clearinghouse.t.sol b/src/test/policies/Clearinghouse.t.sol index 317e8011..a65ffd2d 100644 --- a/src/test/policies/Clearinghouse.t.sol +++ b/src/test/policies/Clearinghouse.t.sol @@ -3,10 +3,10 @@ pragma solidity ^0.8.15; import {Test} from "forge-std/Test.sol"; import {console2 as console} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; -import {MockOhm} from "test/mocks/MockOhm.sol"; -import {MockStaking} from "test/mocks/MockStaking.sol"; +import {MockOhm} from "src/test/mocks/MockOhm.sol"; +import {MockStaking} from "src/test/mocks/MockStaking.sol"; import {MockERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {MockERC4626} from "solmate/test/utils/mocks/MockERC4626.sol"; diff --git a/src/test/policies/CrossChainBridge.t.sol b/src/test/policies/CrossChainBridge.t.sol index c7d34168..ccf409e4 100644 --- a/src/test/policies/CrossChainBridge.t.sol +++ b/src/test/policies/CrossChainBridge.t.sol @@ -2,12 +2,12 @@ pragma solidity >=0.8.0; import {Test} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import {console2} from "forge-std/console2.sol"; import {Bytes32AddressLib} from "solmate/utils/Bytes32AddressLib.sol"; //import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; -import {MockOhm} from "test/mocks/MockOhm.sol"; +import {MockOhm} from "src/test/mocks/MockOhm.sol"; import {OlympusRoles} from "modules/ROLES/OlympusRoles.sol"; import {ROLESv1} from "modules/ROLES/ROLES.v1.sol"; import {OlympusMinter} from "modules/MINTR/OlympusMinter.sol"; diff --git a/src/test/policies/CrossChainBridgeFork.t.sol b/src/test/policies/CrossChainBridgeFork.t.sol index 82bf1b69..93bba9a9 100644 --- a/src/test/policies/CrossChainBridgeFork.t.sol +++ b/src/test/policies/CrossChainBridgeFork.t.sol @@ -5,11 +5,11 @@ import {Test, Vm} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; import {Bytes32AddressLib} from "solmate/utils/Bytes32AddressLib.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import {FullMath} from "libraries/FullMath.sol"; //import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; -import {MockOhm} from "test/mocks/MockOhm.sol"; +import {MockOhm} from "src/test/mocks/MockOhm.sol"; import {OlympusRoles} from "modules/ROLES/OlympusRoles.sol"; import {ROLESv1} from "modules/ROLES/ROLES.v1.sol"; import {OlympusMinter} from "modules/MINTR/OlympusMinter.sol"; @@ -18,7 +18,7 @@ import {MINTRv1} from "modules/MINTR/MINTR.v1.sol"; import {CrossChainBridge, ILayerZeroEndpoint} from "policies/CrossChainBridge.sol"; import {RolesAdmin} from "policies/RolesAdmin.sol"; -import {LayerZeroHelper} from "test/lib/pigeon/layerzero/LayerZeroHelper.sol"; +import {LayerZeroHelper} from "src/test/lib/pigeon/layerzero/LayerZeroHelper.sol"; import "src/Kernel.sol"; diff --git a/src/test/policies/Distributor.t.sol b/src/test/policies/Distributor.t.sol index 87bf9c7c..e9296065 100644 --- a/src/test/policies/Distributor.t.sol +++ b/src/test/policies/Distributor.t.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.15; /// External Dependencies import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; /// Import Distributor import {Distributor} from "policies/Distributor/Distributor.sol"; diff --git a/src/test/policies/Emergency.t.sol b/src/test/policies/Emergency.t.sol index 03abab8b..36ab563e 100644 --- a/src/test/policies/Emergency.t.sol +++ b/src/test/policies/Emergency.t.sol @@ -3,12 +3,12 @@ pragma solidity >=0.8.0; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {larping} from "test/lib/larping.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {larping} from "src/test/lib/larping.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; -import {ModuleTestFixtureGenerator} from "test/lib/ModuleTestFixtureGenerator.sol"; -import {MockLegacyAuthority} from "test/mocks/MockLegacyAuthority.sol"; +import {ModuleTestFixtureGenerator} from "src/test/lib/ModuleTestFixtureGenerator.sol"; +import {MockLegacyAuthority} from "src/test/mocks/MockLegacyAuthority.sol"; import {FullMath} from "libraries/FullMath.sol"; diff --git a/src/test/policies/Heart.t.sol b/src/test/policies/Heart.t.sol index f3ea5708..d4b1e0d1 100644 --- a/src/test/policies/Heart.t.sol +++ b/src/test/policies/Heart.t.sol @@ -2,18 +2,18 @@ pragma solidity >=0.8.0; import {Test} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import {console2} from "forge-std/console2.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; -import {MockPrice} from "test/mocks/MockPrice.sol"; +import {MockPrice} from "src/test/mocks/MockPrice.sol"; import {OlympusMinter} from "modules/MINTR/OlympusMinter.sol"; import {OlympusRoles} from "modules/ROLES/OlympusRoles.sol"; import {ROLESv1} from "modules/ROLES/ROLES.v1.sol"; import {RolesAdmin} from "policies/RolesAdmin.sol"; import {ZeroDistributor} from "policies/Distributor/ZeroDistributor.sol"; -import {MockStakingZD} from "test/mocks/MockStakingForZD.sol"; -import {MockYieldRepo} from "test/mocks/MockYieldRepo.sol"; +import {MockStakingZD} from "src/test/mocks/MockStakingForZD.sol"; +import {MockYieldRepo} from "src/test/mocks/MockYieldRepo.sol"; import {FullMath} from "libraries/FullMath.sol"; diff --git a/src/test/policies/LegacyBurner.t.sol b/src/test/policies/LegacyBurner.t.sol index 858980c2..7ea27e58 100644 --- a/src/test/policies/LegacyBurner.t.sol +++ b/src/test/policies/LegacyBurner.t.sol @@ -2,13 +2,13 @@ pragma solidity 0.8.15; import {Test} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import {console2} from "forge-std/console2.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {OlympusERC20Token} from "src/external/OlympusERC20.sol"; -import {MockLegacyAuthorityV2} from "test/mocks/MockLegacyAuthority.sol"; +import {MockLegacyAuthorityV2} from "src/test/mocks/MockLegacyAuthority.sol"; import "src/Kernel.sol"; @@ -20,7 +20,7 @@ import {RolesAdmin} from "policies/RolesAdmin.sol"; import {BondManager} from "policies/BondManager.sol"; import {LegacyBurner} from "policies/LegacyBurner.sol"; -import {MockLegacyInverseBondDepo} from "test/mocks/MockLegacyInverseBondDepo.sol"; +import {MockLegacyInverseBondDepo} from "src/test/mocks/MockLegacyInverseBondDepo.sol"; // solhint-disable-next-line max-states-count contract LegacyBurnerTest is Test { diff --git a/src/test/policies/Minter.t.sol b/src/test/policies/Minter.t.sol index e75111d4..f1506e97 100644 --- a/src/test/policies/Minter.t.sol +++ b/src/test/policies/Minter.t.sol @@ -3,10 +3,10 @@ pragma solidity >=0.8.0; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; -import {MockOhm} from "test/mocks/MockOhm.sol"; +import {MockOhm} from "src/test/mocks/MockOhm.sol"; import "src/Kernel.sol"; import {OlympusMinter} from "modules/MINTR/OlympusMinter.sol"; diff --git a/src/test/policies/Operator.t.sol b/src/test/policies/Operator.t.sol index 2de32855..609db7de 100644 --- a/src/test/policies/Operator.t.sol +++ b/src/test/policies/Operator.t.sol @@ -3,17 +3,17 @@ pragma solidity >=0.8.0; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; -import {BondFixedTermSDA} from "test/lib/bonds/BondFixedTermSDA.sol"; -import {BondAggregator} from "test/lib/bonds/BondAggregator.sol"; -import {BondFixedTermTeller} from "test/lib/bonds/BondFixedTermTeller.sol"; +import {BondFixedTermSDA} from "src/test/lib/bonds/BondFixedTermSDA.sol"; +import {BondAggregator} from "src/test/lib/bonds/BondAggregator.sol"; +import {BondFixedTermTeller} from "src/test/lib/bonds/BondFixedTermTeller.sol"; import {RolesAuthority, Authority as SolmateAuthority} from "solmate/auth/authorities/RolesAuthority.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {MockERC4626, ERC4626} from "solmate/test/utils/mocks/MockERC4626.sol"; -import {MockPrice} from "test/mocks/MockPrice.sol"; -import {MockOhm} from "test/mocks/MockOhm.sol"; +import {MockPrice} from "src/test/mocks/MockPrice.sol"; +import {MockOhm} from "src/test/mocks/MockOhm.sol"; import {IBondSDA} from "interfaces/IBondSDA.sol"; import {IBondAggregator} from "interfaces/IBondAggregator.sol"; diff --git a/src/test/policies/Parthenon.t.sol b/src/test/policies/Parthenon.t.sol index 6460aa34..d90ba0f3 100644 --- a/src/test/policies/Parthenon.t.sol +++ b/src/test/policies/Parthenon.t.sol @@ -5,8 +5,8 @@ import {MockERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {ModuleTestFixtureGenerator} from "test/lib/ModuleTestFixtureGenerator.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {ModuleTestFixtureGenerator} from "src/test/lib/ModuleTestFixtureGenerator.sol"; import {OlympusInstructions} from "src/modules/INSTR/OlympusInstructions.sol"; import {OlympusVotes} from "src/modules/VOTES/OlympusVotes.sol"; diff --git a/src/test/policies/PriceConfig.t.sol b/src/test/policies/PriceConfig.t.sol index 5766d62c..4d75e2b1 100644 --- a/src/test/policies/PriceConfig.t.sol +++ b/src/test/policies/PriceConfig.t.sol @@ -2,13 +2,13 @@ pragma solidity >=0.8.0; import {Test} from "forge-std/Test.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import {console2 as console} from "forge-std/console2.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {FullMath} from "libraries/FullMath.sol"; -import {MockPriceFeed} from "test/mocks/MockPriceFeed.sol"; +import {MockPriceFeed} from "src/test/mocks/MockPriceFeed.sol"; import {OlympusPriceConfig} from "policies/PriceConfig.sol"; import {OlympusPrice} from "modules/PRICE/OlympusPrice.sol"; diff --git a/src/test/policies/RolesAdmin.t.sol b/src/test/policies/RolesAdmin.t.sol index 077c1e21..15a9cb20 100644 --- a/src/test/policies/RolesAdmin.t.sol +++ b/src/test/policies/RolesAdmin.t.sol @@ -3,7 +3,7 @@ pragma solidity >=0.8.0; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import {MockERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {ERC20} from "solmate/tokens/ERC20.sol"; diff --git a/src/test/policies/TreasuryCustodian.t.sol b/src/test/policies/TreasuryCustodian.t.sol index 8ac07d06..37a39bf9 100644 --- a/src/test/policies/TreasuryCustodian.t.sol +++ b/src/test/policies/TreasuryCustodian.t.sol @@ -3,7 +3,7 @@ pragma solidity >=0.8.0; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import {MockERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {ERC20} from "solmate/tokens/ERC20.sol"; diff --git a/src/test/policies/VohmVault.t.sol b/src/test/policies/VohmVault.t.sol index d8dddcaa..ddb37f21 100644 --- a/src/test/policies/VohmVault.t.sol +++ b/src/test/policies/VohmVault.t.sol @@ -6,8 +6,8 @@ import {ERC20} from "solmate/tokens/ERC20.sol"; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; -import {ModuleTestFixtureGenerator} from "test/lib/ModuleTestFixtureGenerator.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; +import {ModuleTestFixtureGenerator} from "src/test/lib/ModuleTestFixtureGenerator.sol"; import "src/Kernel.sol"; diff --git a/src/test/policies/YieldRepurchaseFacility.t.sol b/src/test/policies/YieldRepurchaseFacility.t.sol index feb4d748..1a107238 100644 --- a/src/test/policies/YieldRepurchaseFacility.t.sol +++ b/src/test/policies/YieldRepurchaseFacility.t.sol @@ -3,18 +3,18 @@ pragma solidity >=0.8.0; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; -import {BondFixedTermSDA} from "test/lib/bonds/BondFixedTermSDA.sol"; -import {BondAggregator} from "test/lib/bonds/BondAggregator.sol"; -import {BondFixedTermTeller} from "test/lib/bonds/BondFixedTermTeller.sol"; +import {BondFixedTermSDA} from "src/test/lib/bonds/BondFixedTermSDA.sol"; +import {BondAggregator} from "src/test/lib/bonds/BondAggregator.sol"; +import {BondFixedTermTeller} from "src/test/lib/bonds/BondFixedTermTeller.sol"; import {RolesAuthority, Authority as SolmateAuthority} from "solmate/auth/authorities/RolesAuthority.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {MockERC4626, ERC4626} from "solmate/test/utils/mocks/MockERC4626.sol"; -import {MockPrice} from "test/mocks/MockPrice.sol"; -import {MockOhm} from "test/mocks/MockOhm.sol"; -import {MockClearinghouse} from "test/mocks/MockClearinghouse.sol"; +import {MockPrice} from "src/test/mocks/MockPrice.sol"; +import {MockOhm} from "src/test/mocks/MockOhm.sol"; +import {MockClearinghouse} from "src/test/mocks/MockClearinghouse.sol"; import {IBondSDA} from "interfaces/IBondSDA.sol"; import {IBondAggregator} from "interfaces/IBondAggregator.sol"; diff --git a/src/test/policies/pOLY.t.sol b/src/test/policies/pOLY.t.sol index 3e38b5c9..3f78fa9f 100644 --- a/src/test/policies/pOLY.t.sol +++ b/src/test/policies/pOLY.t.sol @@ -3,10 +3,10 @@ pragma solidity 0.8.15; import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; import {MockERC20} from "solmate/test/utils/mocks/MockERC20.sol"; -import {MockGenesisClaim} from "test/mocks/MockGenesisClaim.sol"; +import {MockGenesisClaim} from "src/test/mocks/MockGenesisClaim.sol"; import {OlympusMinter} from "modules/MINTR/OlympusMinter.sol"; import {OlympusTreasury} from "modules/TRSRY/OlympusTreasury.sol"; diff --git a/src/test/proposals/OIP_166.t.sol b/src/test/proposals/OIP_166.t.sol index 32e91deb..182d06c1 100644 --- a/src/test/proposals/OIP_166.t.sol +++ b/src/test/proposals/OIP_166.t.sol @@ -11,7 +11,7 @@ import {GovernorBravoDelegate} from "src/external/governance/GovernorBravoDelega import {Timelock} from "src/external/governance/Timelock.sol"; // OIP_166 imports -import {OIP_166} from "proposals/OIP_166.sol"; +import {OIP_166} from "src/proposals/OIP_166.sol"; /// @notice Creates a sandboxed environment from a mainnet fork, to simulate the proposal. /// @dev Update the `setUp` function to deploy your proposal and set the submission diff --git a/src/test/proposals/OIP_XXX.t.sol b/src/test/proposals/OIP_XXX.t.sol index a1be6d7e..d22ec6ee 100644 --- a/src/test/proposals/OIP_XXX.t.sol +++ b/src/test/proposals/OIP_XXX.t.sol @@ -11,7 +11,7 @@ import {GovernorBravoDelegate} from "src/external/governance/GovernorBravoDelega import {Timelock} from "src/external/governance/Timelock.sol"; // OIP_XXX imports -import {OIP_XXX, Clearinghouse, CHREGv1, IERC20, IERC4626} from "proposals/OIP_XXX.sol"; +import {OIP_XXX, Clearinghouse, CHREGv1, IERC20, IERC4626} from "src/proposals/OIP_XXX.sol"; /// @notice Creates a sandboxed environment from a mainnet fork, to simulate the proposal. /// @dev Update the `setUp` function to deploy your proposal and set the submission diff --git a/src/test/sim/RangeSim.sol b/src/test/sim/RangeSim.sol index 875e0ce3..3ec5371f 100644 --- a/src/test/sim/RangeSim.sol +++ b/src/test/sim/RangeSim.sol @@ -6,23 +6,23 @@ import {Test} from "forge-std/Test.sol"; import {console2} from "forge-std/console2.sol"; import {MockERC20, ERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {MockERC4626} from "solmate/test/utils/mocks/MockERC4626.sol"; -import {MockOhm} from "test/mocks/MockOhm.sol"; -import {MockStakingZD} from "test/mocks/MockStakingForZD.sol"; -import {UserFactory} from "test/lib/UserFactory.sol"; +import {MockOhm} from "src/test/mocks/MockOhm.sol"; +import {MockStakingZD} from "src/test/mocks/MockStakingForZD.sol"; +import {UserFactory} from "src/test/lib/UserFactory.sol"; -import {BondFixedTermSDA} from "test/lib/bonds/BondFixedTermSDA.sol"; -import {BondAggregator} from "test/lib/bonds/BondAggregator.sol"; -import {BondFixedTermTeller} from "test/lib/bonds/BondFixedTermTeller.sol"; +import {BondFixedTermSDA} from "src/test/lib/bonds/BondFixedTermSDA.sol"; +import {BondAggregator} from "src/test/lib/bonds/BondAggregator.sol"; +import {BondFixedTermTeller} from "src/test/lib/bonds/BondFixedTermTeller.sol"; import {RolesAuthority, Authority} from "solmate/auth/authorities/RolesAuthority.sol"; import {IBondSDA} from "interfaces/IBondSDA.sol"; import {IBondAggregator} from "interfaces/IBondAggregator.sol"; -import {ZuniswapV2Factory} from "test/lib/zuniswapv2/ZuniswapV2Factory.sol"; -import {ZuniswapV2Pair} from "test/lib/zuniswapv2/ZuniswapV2Pair.sol"; -import {ZuniswapV2Library} from "test/lib/zuniswapv2/ZuniswapV2Library.sol"; -import {ZuniswapV2Router} from "test/lib/zuniswapv2/ZuniswapV2Router.sol"; -import {MathLibrary} from "test/lib/zuniswapv2/libraries/Math.sol"; +import {ZuniswapV2Factory} from "src/test/lib/zuniswapv2/ZuniswapV2Factory.sol"; +import {ZuniswapV2Pair} from "src/test/lib/zuniswapv2/ZuniswapV2Pair.sol"; +import {ZuniswapV2Library} from "src/test/lib/zuniswapv2/ZuniswapV2Library.sol"; +import {ZuniswapV2Router} from "src/test/lib/zuniswapv2/ZuniswapV2Router.sol"; +import {MathLibrary} from "src/test/lib/zuniswapv2/libraries/Math.sol"; import "src/Kernel.sol"; import {OlympusPrice} from "modules/PRICE/OlympusPrice.sol"; @@ -37,7 +37,7 @@ import {Operator} from "policies/Operator.sol"; import {OlympusHeart} from "policies/Heart.sol"; import {BondCallback} from "policies/BondCallback.sol"; import {OlympusPriceConfig} from "policies/PriceConfig.sol"; -import {MockPriceFeed} from "test/mocks/MockPriceFeed.sol"; +import {MockPriceFeed} from "src/test/mocks/MockPriceFeed.sol"; import {RolesAdmin} from "policies/RolesAdmin.sol"; import {ZeroDistributor} from "policies/Distributor/ZeroDistributor.sol"; import {YieldRepurchaseFacility} from "policies/YieldRepurchaseFacility.sol"; diff --git a/src/test/sim/SimTemplate.sol.x b/src/test/sim/SimTemplate.sol.x index 6d1b0fde..8838773f 100644 --- a/src/test/sim/SimTemplate.sol.x +++ b/src/test/sim/SimTemplate.sol.x @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Unlicense pragma solidity >=0.8.0; -import {RangeSim, SimIO} from "test/sim/RangeSim.sol"; +import {RangeSim, SimIO} from "src/test/sim/RangeSim.sol"; contract Seed{SEED}Test is RangeSim { From 1b0233863d52d181109a8e2422ea046a16e1db71 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Tue, 12 Nov 2024 17:34:16 +0400 Subject: [PATCH 2/6] Cross-port script improvements from #18 --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3ba1b8da..bc17ac4d 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "yarn": "use-pnpm" }, "scripts": { - "build": "chmod +x shell/* && ./shell/full_install.sh", + "build": "chmod +x shell/*.sh && ./shell/full_install.sh", "prettier": "prettier --no-error-on-unmatched-pattern --write 'src/**/*.sol' '**/*.html'", "prettier:list": "prettier --no-error-on-unmatched-pattern --list-different 'src/**/*.sol' '**/*.html'", "prettier:check": "prettier --no-error-on-unmatched-pattern --check 'src/**/*.sol' '**/*.html'", @@ -24,10 +24,10 @@ "lint": "pnpm run prettier && pnpm run solhint && pnpm run markdownlint", "lint:check": "pnpm run prettier:check && pnpm run solhint:check && pnpm run markdownlint:check", "test": "./shell/test_all.sh", - "test:unit": "forge test --no-match-contract '(Fork|OCGProposal|CoolerUtils)' -vvv", - "test:fork": "forge test --match-contract '($1.*Fork$|CoolerUtils)' --fork-url $FORK_TEST_RPC_URL -vvv", - "test:proposal": "forge test --match-contract OCGProposal --fork-url $FORK_TEST_RPC_URL -vvv", - "test:crosschainfork": "forge test --match-contract CrossChainBridgeFork -vvv", + "test:unit": "forge test --no-match-contract '(Fork)' --no-match-path 'src/test/proposals/*.t.sol' -vvv", + "test:fork": "forge test --match-contract 'Fork' --no-match-contract 'CrossChainBridgeFork' --fork-url $FORK_TEST_RPC_URL -vvv", + "test:proposal": "forge test --match-path 'src/test/proposals/*.t.sol' --fork-url $FORK_TEST_RPC_URL -vvv", + "test:crosschainfork": "forge test --match-contract 'CrossChainBridgeFork' -vvv", "test:coverage": "./shell/test_coverage.sh", "size": "forge clean && forge build --sizes --skip test --skip '*/*Mock*.sol' --skip 'UniswapDeployer.sol'", "metrics": "node shell/metrics.js" From 5891efc8bac2aa8022258ab5f1b638a4b35ec55c Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Tue, 12 Nov 2024 17:34:26 +0400 Subject: [PATCH 3/6] Rename fork test to be recognised correctly --- src/test/external/cooler/CoolerUtils.t.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/external/cooler/CoolerUtils.t.sol b/src/test/external/cooler/CoolerUtils.t.sol index 496545af..fb1d537f 100644 --- a/src/test/external/cooler/CoolerUtils.t.sol +++ b/src/test/external/cooler/CoolerUtils.t.sol @@ -14,7 +14,7 @@ import {Cooler} from "src/external/cooler/Cooler.sol"; import {CoolerUtils} from "src/external/cooler/CoolerUtils.sol"; -contract CoolerUtilsTest is Test { +contract CoolerUtilsForkTest is Test { CoolerUtils public utils; ERC20 public gohm; From 7d8971865de649e9ad07777abf25e5a6cf3a68d4 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Tue, 12 Nov 2024 17:34:58 +0400 Subject: [PATCH 4/6] Cross-port BLV fork test improvements from #19 --- src/test/policies/BoostedLiquidity/BLVaultLidoFork.t.sol | 5 +++++ src/test/policies/BoostedLiquidity/BLVaultLusdFork.t.sol | 5 +++++ .../policies/BoostedLiquidity/BLVaultManagerLidoFork.t.sol | 5 +++++ .../policies/BoostedLiquidity/BLVaultManagerLusdFork.t.sol | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/src/test/policies/BoostedLiquidity/BLVaultLidoFork.t.sol b/src/test/policies/BoostedLiquidity/BLVaultLidoFork.t.sol index 9df127fa..38462b28 100644 --- a/src/test/policies/BoostedLiquidity/BLVaultLidoFork.t.sol +++ b/src/test/policies/BoostedLiquidity/BLVaultLidoFork.t.sol @@ -79,7 +79,12 @@ contract BLVaultLidoTestFork is Test { uint256[] internal minAmountsOut = [0, 0]; + string RPC_URL = vm.envString("FORK_TEST_RPC_URL"); + function setUp() public { + // Mainnet Fork at a fixed block that is known to work + vm.createSelectFork(RPC_URL, 18762666); + { // Set up users alice = payable(address(uint160(uint256(keccak256(abi.encodePacked("alice")))))); diff --git a/src/test/policies/BoostedLiquidity/BLVaultLusdFork.t.sol b/src/test/policies/BoostedLiquidity/BLVaultLusdFork.t.sol index 106625bf..d1f31c48 100644 --- a/src/test/policies/BoostedLiquidity/BLVaultLusdFork.t.sol +++ b/src/test/policies/BoostedLiquidity/BLVaultLusdFork.t.sol @@ -71,7 +71,12 @@ contract BLVaultLusdTestFork is Test { uint256[] internal minAmountsOut = [0, 0]; + string RPC_URL = vm.envString("FORK_TEST_RPC_URL"); + function setUp() public { + // Mainnet Fork at a fixed block that is known to work + vm.createSelectFork(RPC_URL, 18762666); + { // Set up users alice = payable(address(uint160(uint256(keccak256(abi.encodePacked("alice")))))); diff --git a/src/test/policies/BoostedLiquidity/BLVaultManagerLidoFork.t.sol b/src/test/policies/BoostedLiquidity/BLVaultManagerLidoFork.t.sol index bc7e5773..33cfdcca 100644 --- a/src/test/policies/BoostedLiquidity/BLVaultManagerLidoFork.t.sol +++ b/src/test/policies/BoostedLiquidity/BLVaultManagerLidoFork.t.sol @@ -75,7 +75,12 @@ contract BLVaultManagerLidoTestFork is Test { BLVaultManagerLido internal vaultManager; BLVaultLido internal vaultImplementation; + string RPC_URL = vm.envString("FORK_TEST_RPC_URL"); + function setUp() public { + // Mainnet Fork at a fixed block that is known to work + vm.createSelectFork(RPC_URL, 18762666); + { // Set up users alice = payable(address(uint160(uint256(keccak256(abi.encodePacked("alice")))))); diff --git a/src/test/policies/BoostedLiquidity/BLVaultManagerLusdFork.t.sol b/src/test/policies/BoostedLiquidity/BLVaultManagerLusdFork.t.sol index fb6084aa..c4d585cb 100644 --- a/src/test/policies/BoostedLiquidity/BLVaultManagerLusdFork.t.sol +++ b/src/test/policies/BoostedLiquidity/BLVaultManagerLusdFork.t.sol @@ -68,7 +68,12 @@ contract BLVaultManagerLusdTestFork is Test { uint256 internal constant OHM_LIMIT = 233_645e9; // $2.5m = 233,645 OHM + string RPC_URL = vm.envString("FORK_TEST_RPC_URL"); + function setUp() public { + // Mainnet Fork at a fixed block that is known to work + vm.createSelectFork(RPC_URL, 18762666); + { // Set up users alice = payable(address(uint160(uint256(keccak256(abi.encodePacked("alice")))))); From 5a1189c8281b1e423c4dc08093353b05b9a82b6a Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Tue, 12 Nov 2024 17:35:13 +0400 Subject: [PATCH 5/6] Cross-port separate OCG job from #19 --- .github/workflows/OCG.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/OCG.yml diff --git a/.github/workflows/OCG.yml b/.github/workflows/OCG.yml new file mode 100644 index 00000000..090021eb --- /dev/null +++ b/.github/workflows/OCG.yml @@ -0,0 +1,37 @@ +name: OCG Proposals +on: + push: + branches: + - master + pull_request: + +jobs: + run-ci: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: actions/setup-node@v4 + with: + node-version: 20 + + - uses: pnpm/action-setup@v2 + with: + version: 9 + + - name: Install Node dependencies + run: pnpm install + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + + - name: Install Foundry dependencies + run: pnpm run build + + - name: Run proposal simulation tests + run: pnpm run test:proposal + env: + FORK_TEST_RPC_URL: ${{ secrets.FORK_TEST_RPC_URL }} From 569643a9e846aea0c4ee34712ecd62b4a4ce450b Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Tue, 12 Nov 2024 17:40:03 +0400 Subject: [PATCH 6/6] Cross-port CI build improvements from #19 --- .github/workflows/CI.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ffee94e0..8c367466 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -20,18 +20,16 @@ jobs: - uses: pnpm/action-setup@v2 with: - version: 8 + version: 9 - name: Install Node dependencies run: pnpm install - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly-ca67d15f4abd46394b324c50e21e66f306a1162d - name: Install Foundry dependencies - run: forge install + run: pnpm run build - name: Run lint check run: pnpm run lint:check @@ -39,11 +37,6 @@ jobs: - name: Run unit tests run: pnpm run test:unit - - name: Run proposal simulation tests - run: pnpm run test:proposal - env: - FORK_TEST_RPC_URL: ${{ secrets.FORK_TEST_RPC_URL }} - - name: Run fork tests run: pnpm run test:fork env: