Skip to content

Commit

Permalink
chore: Move test and script out of src
Browse files Browse the repository at this point in the history
  • Loading branch information
bingen committed Dec 12, 2024
1 parent 65926b1 commit 1fc309f
Show file tree
Hide file tree
Showing 104 changed files with 136 additions and 136 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ pragma solidity 0.8.24;
import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import {Strings} from "openzeppelin-contracts/contracts/utils/Strings.sol";
import {Math} from "openzeppelin-contracts/contracts/utils/math/Math.sol";
import {BatchId} from "../Types/BatchId.sol";
import {LatestBatchData} from "../Types/LatestBatchData.sol";
import {LatestTroveData} from "../Types/LatestTroveData.sol";
import {ISortedTroves} from "../Interfaces/ISortedTroves.sol";
import {IStabilityPool} from "../Interfaces/IStabilityPool.sol";
import {ITroveManager} from "../Interfaces/ITroveManager.sol";
import {BatchId} from "src/Types/BatchId.sol";
import {LatestBatchData} from "src/Types/LatestBatchData.sol";
import {LatestTroveData} from "src/Types/LatestTroveData.sol";
import {ISortedTroves} from "src/Interfaces/ISortedTroves.sol";
import {IStabilityPool} from "src/Interfaces/IStabilityPool.sol";
import {ITroveManager} from "src/Interfaces/ITroveManager.sol";
import {BatchIdSet} from "./Utils/BatchIdSet.sol";
import {Logging} from "./Utils/Logging.sol";
import {StringFormatting} from "./Utils/StringFormatting.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

pragma solidity 0.8.24;

import "../PriceFeeds/WSTETHPriceFeed.sol";
import "../PriceFeeds/MainnetPriceFeedBase.sol";
import "../PriceFeeds/RETHPriceFeed.sol";
import "../PriceFeeds/WETHPriceFeed.sol";
import "src/PriceFeeds/WSTETHPriceFeed.sol";
import "src/PriceFeeds/MainnetPriceFeedBase.sol";
import "src/PriceFeeds/RETHPriceFeed.sol";
import "src/PriceFeeds/WETHPriceFeed.sol";

import "./TestContracts/Accounts.sol";
import "./TestContracts/ChainlinkOracleMock.sol";
import "./TestContracts/RETHTokenMock.sol";
import "./TestContracts/WSTETHTokenMock.sol";
import "./TestContracts/Deployment.t.sol";

import "../Dependencies/AggregatorV3Interface.sol";
import "../Interfaces/IRETHPriceFeed.sol";
import "../Interfaces/IWSTETHPriceFeed.sol";
import "src/Dependencies/AggregatorV3Interface.sol";
import "src/Interfaces/IRETHPriceFeed.sol";
import "src/Interfaces/IWSTETHPriceFeed.sol";

import "../Interfaces/IRETHToken.sol";
import "../Interfaces/IWSTETH.sol";
import "src/Interfaces/IRETHToken.sol";
import "src/Interfaces/IWSTETH.sol";

import "forge-std/Test.sol";
import "lib/forge-std/src/console2.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

import {IBoldToken} from "../Interfaces/IBoldToken.sol";
import {IStabilityPool} from "../Interfaces/IStabilityPool.sol";
import {HintHelpers} from "../HintHelpers.sol";
import {IBoldToken} from "src/Interfaces/IBoldToken.sol";
import {IStabilityPool} from "src/Interfaces/IStabilityPool.sol";
import {HintHelpers} from "src/HintHelpers.sol";
import {Assertions} from "./TestContracts/Assertions.sol";
import {BaseInvariantTest} from "./TestContracts/BaseInvariantTest.sol";
import {TestDeployer} from "./TestContracts/Deployment.t.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
pragma solidity 0.8.24;

import "forge-std/Test.sol";
import "../SortedTroves.sol";
import "../AddressesRegistry.sol";
import "../Types/TroveId.sol";
import "src/SortedTroves.sol";
import "src/AddressesRegistry.sol";
import "src/Types/TroveId.sol";

uint256 constant FUZZ_INPUT_LENGTH = 9;

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

import "../../Dependencies/AddRemoveManagers.sol";
import "src/Dependencies/AddRemoveManagers.sol";

contract AddRemoveManagersTester is AddRemoveManagers {
constructor(IAddressesRegistry _addressesRegistry) AddRemoveManagers(_addressesRegistry) {}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
pragma solidity 0.8.24;

import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import {IBoldToken} from "../../Interfaces/IBoldToken.sol";
import {ICollateralRegistry} from "../../Interfaces/ICollateralRegistry.sol";
import {IWETH} from "../../Interfaces/IWETH.sol";
import {HintHelpers} from "../../HintHelpers.sol";
import {IBoldToken} from "src/Interfaces/IBoldToken.sol";
import {ICollateralRegistry} from "src/Interfaces/ICollateralRegistry.sol";
import {IWETH} from "src/Interfaces/IWETH.sol";
import {HintHelpers} from "src/HintHelpers.sol";
import {TestDeployer} from "./Deployment.t.sol";

contract BaseMultiCollateralTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
pragma solidity 0.8.24;

import "./Accounts.sol";
import "../../Interfaces/IActivePool.sol";
import "../../Interfaces/IBoldToken.sol";
import "../../Interfaces/ICollSurplusPool.sol";
import "../../Interfaces/IDefaultPool.sol";
import "../../Interfaces/IPriceFeed.sol";
import "../../Interfaces/ISortedTroves.sol";
import "../../Interfaces/IStabilityPool.sol";
import "src/Interfaces/IActivePool.sol";
import "src/Interfaces/IBoldToken.sol";
import "src/Interfaces/ICollSurplusPool.sol";
import "src/Interfaces/IDefaultPool.sol";
import "src/Interfaces/IPriceFeed.sol";
import "src/Interfaces/ISortedTroves.sol";
import "src/Interfaces/IStabilityPool.sol";
import "./BorrowerOperationsTester.t.sol";
import "./TroveManagerTester.t.sol";
import "../../Interfaces/ICollateralRegistry.sol";
import "src/Interfaces/ICollateralRegistry.sol";
import "./PriceFeedTestnet.sol";
import "../../Interfaces/IInterestRouter.sol";
import "../../GasPool.sol";
import "../../HintHelpers.sol";
import "../../Zappers/WETHZapper.sol";
import "../../Zappers/GasCompZapper.sol";
import "../../Zappers/LeverageLSTZapper.sol";
import "src/Interfaces/IInterestRouter.sol";
import "src/GasPool.sol";
import "src/HintHelpers.sol";
import "src/Zappers/WETHZapper.sol";
import "src/Zappers/GasCompZapper.sol";
import "src/Zappers/LeverageLSTZapper.sol";
import {mulDivCeil} from "../Utils/Math.sol";
import {Logging} from "../Utils/Logging.sol";
import {StringFormatting} from "../Utils/StringFormatting.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity 0.8.24;

import "../../BoldToken.sol";
import "src/BoldToken.sol";

contract BoldTokenTester is BoldToken {
constructor(address _owner) BoldToken(_owner) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

pragma solidity 0.8.24;

import "../../Interfaces/IAddressesRegistry.sol";
import "../../BorrowerOperations.sol";
import "src/Interfaces/IAddressesRegistry.sol";
import "src/BorrowerOperations.sol";
import "./Interfaces/IBorrowerOperationsTester.sol";

/* Tester contract inherits from BorrowerOperations, and provides external functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity 0.8.24;

import "../../Dependencies/AggregatorV3Interface.sol";
import "src/Dependencies/AggregatorV3Interface.sol";

// Mock Chainlink oracle that returns a stale price answer.
// this contract code is etched over mainnet oracle addresses in mainnet fork tests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity 0.8.24;

import "../../CollateralRegistry.sol";
import "src/CollateralRegistry.sol";

/* Tester contract inherits from CollateralRegistry, and provides external functions
for testing the parent's internal functions. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,47 @@

pragma solidity 0.8.24;

import "../../AddressesRegistry.sol";
import "../../ActivePool.sol";
import "../../BoldToken.sol";
import "../../BorrowerOperations.sol";
import "../../CollSurplusPool.sol";
import "../../DefaultPool.sol";
import "../../GasPool.sol";
import "../../HintHelpers.sol";
import "../../MultiTroveGetter.sol";
import "../../SortedTroves.sol";
import "../../StabilityPool.sol";
import "src/AddressesRegistry.sol";
import "src/ActivePool.sol";
import "src/BoldToken.sol";
import "src/BorrowerOperations.sol";
import "src/CollSurplusPool.sol";
import "src/DefaultPool.sol";
import "src/GasPool.sol";
import "src/HintHelpers.sol";
import "src/MultiTroveGetter.sol";
import "src/SortedTroves.sol";
import "src/StabilityPool.sol";
import "./BorrowerOperationsTester.t.sol";
import "./TroveManagerTester.t.sol";
import "../../TroveNFT.sol";
import "../../NFTMetadata/MetadataNFT.sol";
import "../../CollateralRegistry.sol";
import "src/TroveNFT.sol";
import "src/NFTMetadata/MetadataNFT.sol";
import "src/CollateralRegistry.sol";
import "./MockInterestRouter.sol";
import "./PriceFeedTestnet.sol";
import "./MetadataDeployment.sol";
import "../../Zappers/WETHZapper.sol";
import "../../Zappers/GasCompZapper.sol";
import "../../Zappers/LeverageLSTZapper.sol";
import "../../Zappers/LeverageWETHZapper.sol";
import "../../Zappers/Modules/FlashLoans/BalancerFlashLoan.sol";
import "../../Zappers/Interfaces/IFlashLoanProvider.sol";
import "../../Zappers/Interfaces/IExchange.sol";
import "../../Zappers/Modules/Exchanges/Curve/ICurveFactory.sol";
import "../../Zappers/Modules/Exchanges/Curve/ICurveStableswapNGFactory.sol";
import "../../Zappers/Modules/Exchanges/Curve/ICurvePool.sol";
import "../../Zappers/Modules/Exchanges/Curve/ICurveStableswapNGPool.sol";
import "../../Zappers/Modules/Exchanges/CurveExchange.sol";
import "../../Zappers/Modules/Exchanges/UniswapV3/ISwapRouter.sol";
import "../../Zappers/Modules/Exchanges/UniV3Exchange.sol";
import "../../Zappers/Modules/Exchanges/UniswapV3/INonfungiblePositionManager.sol";
import "../../Zappers/Modules/Exchanges/HybridCurveUniV3Exchange.sol";
import "src/Zappers/WETHZapper.sol";
import "src/Zappers/GasCompZapper.sol";
import "src/Zappers/LeverageLSTZapper.sol";
import "src/Zappers/LeverageWETHZapper.sol";
import "src/Zappers/Modules/FlashLoans/BalancerFlashLoan.sol";
import "src/Zappers/Interfaces/IFlashLoanProvider.sol";
import "src/Zappers/Interfaces/IExchange.sol";
import "src/Zappers/Modules/Exchanges/Curve/ICurveFactory.sol";
import "src/Zappers/Modules/Exchanges/Curve/ICurveStableswapNGFactory.sol";
import "src/Zappers/Modules/Exchanges/Curve/ICurvePool.sol";
import "src/Zappers/Modules/Exchanges/Curve/ICurveStableswapNGPool.sol";
import "src/Zappers/Modules/Exchanges/CurveExchange.sol";
import "src/Zappers/Modules/Exchanges/UniswapV3/ISwapRouter.sol";
import "src/Zappers/Modules/Exchanges/UniV3Exchange.sol";
import "src/Zappers/Modules/Exchanges/UniswapV3/INonfungiblePositionManager.sol";
import "src/Zappers/Modules/Exchanges/HybridCurveUniV3Exchange.sol";
import {WETHTester} from "./WETHTester.sol";
import {ERC20Faucet} from "./ERC20Faucet.sol";

import "../../PriceFeeds/WETHPriceFeed.sol";
import "../../PriceFeeds/WSTETHPriceFeed.sol";
import "../../PriceFeeds/RETHPriceFeed.sol";
import "src/PriceFeeds/WETHPriceFeed.sol";
import "src/PriceFeeds/WSTETHPriceFeed.sol";
import "src/PriceFeeds/RETHPriceFeed.sol";

import "forge-std/console2.sol";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity 0.8.24;

import "../../../Interfaces/IBorrowerOperations.sol";
import "src/Interfaces/IBorrowerOperations.sol";

interface IBorrowerOperationsTester is IBorrowerOperations {
function getCollToken() external view returns (IERC20);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.18;

import "../../../Interfaces/IPriceFeed.sol";
import "src/Interfaces/IPriceFeed.sol";

interface IPriceFeedMock is IPriceFeed {
function setPrice(uint256 _price) external;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity 0.8.24;

import "../../../Interfaces/IPriceFeed.sol";
import "src/Interfaces/IPriceFeed.sol";

interface IPriceFeedTestnet is IPriceFeed {
function setPrice(uint256 _price) external returns (bool);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity 0.8.24;

import "../../../Interfaces/ITroveManager.sol";
import "src/Interfaces/ITroveManager.sol";

interface ITroveManagerTester is ITroveManager {
function liquidate(uint256 _troveId) external;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import {Math} from "openzeppelin-contracts/contracts/utils/math/Math.sol";
import {Address} from "openzeppelin-contracts/contracts/utils/Address.sol";
import {Strings} from "openzeppelin-contracts/contracts/utils/Strings.sol";
import {LatestBatchData} from "../../Types/LatestBatchData.sol";
import {LatestTroveData} from "../../Types/LatestTroveData.sol";
import {IBorrowerOperations} from "../../Interfaces/IBorrowerOperations.sol";
import {ISortedTroves} from "../../Interfaces/ISortedTroves.sol";
import {ITroveManager} from "../../Interfaces/ITroveManager.sol";
import {AddressesRegistry} from "../../AddressesRegistry.sol";
import {AddRemoveManagers} from "../../Dependencies/AddRemoveManagers.sol";
import {BorrowerOperations} from "../../BorrowerOperations.sol";
import {TroveManager} from "../../TroveManager.sol";
import {LatestBatchData} from "src/Types/LatestBatchData.sol";
import {LatestTroveData} from "src/Types/LatestTroveData.sol";
import {IBorrowerOperations} from "src/Interfaces/IBorrowerOperations.sol";
import {ISortedTroves} from "src/Interfaces/ISortedTroves.sol";
import {ITroveManager} from "src/Interfaces/ITroveManager.sol";
import {AddressesRegistry} from "src/AddressesRegistry.sol";
import {AddRemoveManagers} from "src/Dependencies/AddRemoveManagers.sol";
import {BorrowerOperations} from "src/BorrowerOperations.sol";
import {TroveManager} from "src/TroveManager.sol";
import {EnumerableAddressSet, EnumerableSet} from "../Utils/EnumerableSet.sol";
import {pow} from "../Utils/Math.sol";
import {StringFormatting} from "../Utils/StringFormatting.sol";
Expand Down Expand Up @@ -48,7 +48,7 @@ import {
SP_YIELD_SPLIT,
UPFRONT_INTEREST_PERIOD,
URGENT_REDEMPTION_BONUS
} from "../../Dependencies/Constants.sol";
} from "src/Dependencies/Constants.sol";

uint256 constant TIME_DELTA_MIN = 0;
uint256 constant TIME_DELTA_MAX = ONE_YEAR;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

pragma solidity 0.8.24;

//import "../../Dependencies/IERC20.sol";
//import "../../Dependencies/IERC2612.sol";
//import "src/Dependencies/IERC20.sol";
//import "src/Dependencies/IERC2612.sol";

contract LQTYTokenMock { /*is IERC20, IERC2612*/
function sendToLQTYStaking(address _sender, uint256 _amount) external {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity 0.8.24;

import "../../Dependencies/LiquityMath.sol";
import "src/Dependencies/LiquityMath.sol";

/* Tester contract for math functions in Math.sol library. */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

pragma solidity 0.8.24;

import "../../Interfaces/IInterestRouter.sol";
import "src/Interfaces/IInterestRouter.sol";

contract MockInterestRouter is IInterestRouter {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity 0.8.24;

import "../../Interfaces/IRETHToken.sol";
import "src/Interfaces/IRETHToken.sol";

contract RETHTokenMock is IRETHToken {
function getExchangeRate() external pure returns (uint256) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
pragma solidity 0.8.24;

import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import {IBorrowerOperations} from "../../Interfaces/IBorrowerOperations.sol";
import {IBoldToken} from "../../Interfaces/IBoldToken.sol";
import {IStabilityPool} from "../../Interfaces/IStabilityPool.sol";
import {ITroveManager} from "../../Interfaces/ITroveManager.sol";
import {ICollSurplusPool} from "../../Interfaces/ICollSurplusPool.sol";
import {HintHelpers} from "../../HintHelpers.sol";
import {IBorrowerOperations} from "src/Interfaces/IBorrowerOperations.sol";
import {IBoldToken} from "src/Interfaces/IBoldToken.sol";
import {IStabilityPool} from "src/Interfaces/IStabilityPool.sol";
import {ITroveManager} from "src/Interfaces/ITroveManager.sol";
import {ICollSurplusPool} from "src/Interfaces/ICollSurplusPool.sol";
import {HintHelpers} from "src/HintHelpers.sol";
import {IPriceFeedTestnet} from "./Interfaces/IPriceFeedTestnet.sol";
import {ITroveManagerTester} from "./Interfaces/ITroveManagerTester.sol";
import {mulDivCeil} from "../Utils/Math.sol";
Expand All @@ -21,7 +21,7 @@ import {
ETH_GAS_COMPENSATION,
COLL_GAS_COMPENSATION_DIVISOR,
MIN_ANNUAL_INTEREST_RATE
} from "../../Dependencies/Constants.sol";
} from "src/Dependencies/Constants.sol";

using {mulDivCeil} for uint256;

Expand Down
Loading

0 comments on commit 1fc309f

Please sign in to comment.