From 870a38d84501ba1d06172e3cd7f55b391e70b20a Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Tue, 17 Oct 2023 09:08:21 +0200 Subject: [PATCH] refactor(remappings): use relative imports --- config/ConfigLib.sol | 2 +- config/Configured.sol | 2 +- remappings.txt | 21 +---------- src/ERC4626Bundler.sol | 18 +++++----- src/MorphoBundler.sol | 6 ++-- src/Permit2Bundler.sol | 12 +++---- src/PermitBundler.sol | 4 +-- src/StEthBundler.sol | 4 +-- src/TransferBundler.sol | 10 +++--- src/UrdBundler.sol | 3 +- src/WNativeBundler.sol | 4 +-- src/interfaces/IMorphoBundler.sol | 2 +- src/migration/AaveV2MigrationBundler.sol | 4 +-- src/migration/AaveV3MigrationBundler.sol | 4 +-- .../AaveV3OptimizerMigrationBundler.sol | 6 ++-- src/migration/CompoundV2MigrationBundler.sol | 2 +- src/migration/CompoundV3MigrationBundler.sol | 2 +- src/migration/MigrationBundler.sol | 2 +- src/mocks/ERC20Mock.sol | 2 +- src/mocks/ERC20PermitMock.sol | 4 +-- src/mocks/ERC4626Mock.sol | 6 ++-- src/mocks/IrmMock.sol | 6 ++-- src/mocks/OracleMock.sol | 2 +- test/forge/ERC4626BundlerLocalTest.sol | 6 ++-- test/forge/MorphoBundlerLocalTest.sol | 6 ++-- test/forge/PermitBundlerLocalTest.sol | 4 +-- test/forge/TransferBundlerLocalTest.sol | 4 +-- test/forge/UrdBundlerLocalTest.sol | 13 +++---- .../ethereum/EthereumBundlerEthereumTest.sol | 4 +-- .../EthereumPermitBundlerEthereumTest.sol | 2 +- .../EthereumStEthBundlerEthereumTest.sol | 6 ++-- .../ethereum/Permit2BundlerEthereumTest.sol | 4 +-- .../ethereum/WNativeBundlerEthereumTest.sol | 4 +-- ...V2EthereumMigrationBundlerEthereumTest.sol | 10 +++--- .../AaveV3MigrationBundlerEthereumTest.sol | 6 ++-- ...3OptimizerMigrationBundlerEthereumTest.sol | 6 ++-- ...BorrowableMigrationBundlerEthereumTest.sol | 4 +-- ...CollateralMigrationBundlerEthereumTest.sol | 4 +-- ...undV2NoEthMigrationBundlerEthereumTest.sol | 4 +-- ...CompoundV3MigrationBundlerEthereumTest.sol | 2 +- .../helpers/EthereumMigrationTest.sol | 22 ++++++------ test/forge/helpers/BaseTest.sol | 36 +++++++++---------- test/forge/helpers/ForkTest.sol | 14 ++++---- test/forge/helpers/LocalTest.sol | 2 +- test/forge/helpers/SigUtils.sol | 16 ++++----- 45 files changed, 145 insertions(+), 162 deletions(-) diff --git a/config/ConfigLib.sol b/config/ConfigLib.sol index 767c6bd0..572dafbc 100644 --- a/config/ConfigLib.sol +++ b/config/ConfigLib.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {stdJson} from "@forge-std/StdJson.sol"; +import {stdJson} from "../lib/forge-std/src/StdJson.sol"; struct Config { string json; diff --git a/config/Configured.sol b/config/Configured.sol index 60f793b2..deaa03fc 100644 --- a/config/Configured.sol +++ b/config/Configured.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.0; import {Config, ConfigMarket, ConfigLib} from "./ConfigLib.sol"; -import {StdChains, VmSafe} from "@forge-std/StdChains.sol"; +import {StdChains, VmSafe} from "../lib/forge-std/src/StdChains.sol"; abstract contract Configured is StdChains { using ConfigLib for Config; diff --git a/remappings.txt b/remappings.txt index 4d43a219..ed7fc103 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,22 +1,3 @@ -config/=config/ src/=src/ -test/=test/ -solmate/=lib/solmate/ - -@forge-std/=lib/morpho-blue/lib/forge-std/src/ -@solmate/=lib/solmate/src/ -@morpho-v1/=lib/morpho-v1/src/ -@morpho-blue/=lib/morpho-blue/src/ -@morpho-utils/=lib/morpho-utils/src/ -@universal-rewards-distributor/=lib/universal-rewards-distributor/src/ -@morpho-aave-v3/=lib/morpho-aave-v3/src -@openzeppelin/=lib/openzeppelin-contracts/contracts/ -@permit2/=lib/permit2/src/ - -@uniswap/v3-core=lib/v3-core/contracts/ -@uniswap/v3-periphery=lib/v3-periphery/contracts/ - -@aave/v3-core=lib/aave-v3-core/contracts/ - -@murky/=lib/murky/ +solmate/=lib/morpho-aave-v3/lib/permit2/lib/solmate/ diff --git a/src/ERC4626Bundler.sol b/src/ERC4626Bundler.sol index 9cc12efb..efa9a5a0 100644 --- a/src/ERC4626Bundler.sol +++ b/src/ERC4626Bundler.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity 0.8.21; -import {IERC4626} from "@openzeppelin/interfaces/IERC4626.sol"; +import {IERC4626} from "../lib/openzeppelin-contracts/contracts/interfaces/IERC4626.sol"; -import {Math} from "@morpho-utils/math/Math.sol"; +import {Math} from "../lib/morpho-utils/src/math/Math.sol"; import {ErrorsLib} from "./libraries/ErrorsLib.sol"; -import {SafeTransferLib, ERC20} from "solmate/src/utils/SafeTransferLib.sol"; +import {SafeTransferLib, ERC20} from "../lib/solmate/src/utils/SafeTransferLib.sol"; import {BaseBundler} from "./BaseBundler.sol"; @@ -67,13 +67,13 @@ abstract contract ERC4626Bundler is BaseBundler { require(receiver != address(0), ErrorsLib.ZERO_ADDRESS); /// Do not check `receiver != address(this)` to allow the bundler to receive the underlying asset. - address initiator = initiator(); + address _initiator = initiator(); - assets = Math.min(assets, IERC4626(vault).maxWithdraw(initiator)); + assets = Math.min(assets, IERC4626(vault).maxWithdraw(_initiator)); require(assets != 0, ErrorsLib.ZERO_AMOUNT); - IERC4626(vault).withdraw(assets, receiver, initiator); + IERC4626(vault).withdraw(assets, receiver, _initiator); } /// @notice Redeems the given amount of `shares` from the given ERC4626 `vault`, transferring assets to `receiver`. @@ -84,12 +84,12 @@ abstract contract ERC4626Bundler is BaseBundler { require(receiver != address(0), ErrorsLib.ZERO_ADDRESS); /// Do not check `receiver != address(this)` to allow the bundler to receive the underlying asset. - address initiator = initiator(); + address _initiator = initiator(); - shares = Math.min(shares, IERC4626(vault).maxRedeem(initiator)); + shares = Math.min(shares, IERC4626(vault).maxRedeem(_initiator)); require(shares != 0, ErrorsLib.ZERO_SHARES); - IERC4626(vault).redeem(shares, receiver, initiator); + IERC4626(vault).redeem(shares, receiver, _initiator); } } diff --git a/src/MorphoBundler.sol b/src/MorphoBundler.sol index 34526ad0..00aa7bb4 100644 --- a/src/MorphoBundler.sol +++ b/src/MorphoBundler.sol @@ -2,12 +2,12 @@ pragma solidity 0.8.21; import {IMorphoBundler} from "./interfaces/IMorphoBundler.sol"; -import {MarketParams, Signature, Authorization, IMorpho} from "@morpho-blue/interfaces/IMorpho.sol"; +import {MarketParams, Signature, Authorization, IMorpho} from "../lib/morpho-blue/src/interfaces/IMorpho.sol"; import {ErrorsLib} from "./libraries/ErrorsLib.sol"; -import {Math} from "@morpho-utils/math/Math.sol"; -import {SafeTransferLib, ERC20} from "solmate/src/utils/SafeTransferLib.sol"; +import {Math} from "../lib/morpho-utils/src/math/Math.sol"; +import {SafeTransferLib, ERC20} from "../lib/solmate/src/utils/SafeTransferLib.sol"; import {BaseBundler} from "./BaseBundler.sol"; diff --git a/src/Permit2Bundler.sol b/src/Permit2Bundler.sol index 6a78659e..5d642427 100644 --- a/src/Permit2Bundler.sol +++ b/src/Permit2Bundler.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity 0.8.21; -import {ISignatureTransfer} from "@permit2/interfaces/ISignatureTransfer.sol"; +import {ISignatureTransfer} from "../lib/permit2/src/interfaces/ISignatureTransfer.sol"; import "./libraries/ConstantsLib.sol"; import {ErrorsLib} from "./libraries/ErrorsLib.sol"; -import {Math} from "@morpho-utils/math/Math.sol"; -import {ERC20} from "solmate/src/tokens/ERC20.sol"; +import {Math} from "../lib/morpho-utils/src/math/Math.sol"; +import {ERC20} from "../lib/solmate/src/tokens/ERC20.sol"; import {BaseBundler} from "./BaseBundler.sol"; @@ -24,14 +24,14 @@ abstract contract Permit2Bundler is BaseBundler { external payable { - address initiator = initiator(); - uint256 amount = Math.min(permit.permitted.amount, ERC20(permit.permitted.token).balanceOf(initiator)); + address _initiator = initiator(); + uint256 amount = Math.min(permit.permitted.amount, ERC20(permit.permitted.token).balanceOf(_initiator)); require(amount != 0, ErrorsLib.ZERO_AMOUNT); ISignatureTransfer.SignatureTransferDetails memory transferDetails = ISignatureTransfer.SignatureTransferDetails({to: address(this), requestedAmount: amount}); - ISignatureTransfer(PERMIT2).permitTransferFrom(permit, transferDetails, initiator, signature); + ISignatureTransfer(PERMIT2).permitTransferFrom(permit, transferDetails, _initiator, signature); } } diff --git a/src/PermitBundler.sol b/src/PermitBundler.sol index c690b16b..ee916336 100644 --- a/src/PermitBundler.sol +++ b/src/PermitBundler.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity 0.8.21; -import {IERC20Permit} from "@openzeppelin/token/ERC20/extensions/IERC20Permit.sol"; +import {IERC20Permit} from "../lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol"; import {BaseBundler} from "./BaseBundler.sol"; @@ -13,7 +13,7 @@ abstract contract PermitBundler is BaseBundler { /// @notice Permits the given `amount` of `asset` from sender to be spent by the bundler via EIP-2612 Permit with /// the given `deadline` & EIP-712 signature's `v`, `r` & `s`. /// @notice Warning: should only be called via the bundler's `multicall` function. - /// @dev Pass `skipRevert = true` to avoid reverting the whole bundle in case the signature expired. + /// @dev Pass `skipRevert == true` to avoid reverting the whole bundle in case the signature expired. function permit(address asset, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s, bool skipRevert) external payable diff --git a/src/StEthBundler.sol b/src/StEthBundler.sol index 83c47aaa..1459fb83 100644 --- a/src/StEthBundler.sol +++ b/src/StEthBundler.sol @@ -4,9 +4,9 @@ pragma solidity 0.8.21; import {IWstEth} from "./interfaces/IWstEth.sol"; import {IStEth} from "./interfaces/IStEth.sol"; -import {Math} from "@morpho-utils/math/Math.sol"; +import {Math} from "../lib/morpho-utils/src/math/Math.sol"; import {ErrorsLib} from "./libraries/ErrorsLib.sol"; -import {SafeTransferLib, ERC20} from "solmate/src/utils/SafeTransferLib.sol"; +import {SafeTransferLib, ERC20} from "../lib/solmate/src/utils/SafeTransferLib.sol"; import {BaseBundler} from "./BaseBundler.sol"; diff --git a/src/TransferBundler.sol b/src/TransferBundler.sol index fab73ae4..74d76816 100644 --- a/src/TransferBundler.sol +++ b/src/TransferBundler.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity 0.8.21; -import {Math} from "@morpho-utils/math/Math.sol"; +import {Math} from "../lib/morpho-utils/src/math/Math.sol"; import {ErrorsLib} from "./libraries/ErrorsLib.sol"; -import {SafeTransferLib, ERC20} from "solmate/src/utils/SafeTransferLib.sol"; +import {SafeTransferLib, ERC20} from "../lib/solmate/src/utils/SafeTransferLib.sol"; import {BaseBundler} from "./BaseBundler.sol"; @@ -49,11 +49,11 @@ abstract contract TransferBundler is BaseBundler { /// @notice Warning: should only be called via the bundler's `multicall` function. /// @dev Pass `amount = type(uint256).max` to transfer all. function erc20TransferFrom(address asset, uint256 amount) external payable { - address initiator = initiator(); - amount = Math.min(amount, ERC20(asset).balanceOf(initiator)); + address _initiator = initiator(); + amount = Math.min(amount, ERC20(asset).balanceOf(_initiator)); require(amount != 0, ErrorsLib.ZERO_AMOUNT); - ERC20(asset).safeTransferFrom(initiator, address(this), amount); + ERC20(asset).safeTransferFrom(_initiator, address(this), amount); } } diff --git a/src/UrdBundler.sol b/src/UrdBundler.sol index c1be286d..dc8cd165 100644 --- a/src/UrdBundler.sol +++ b/src/UrdBundler.sol @@ -1,7 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity 0.8.21; -import {IUniversalRewardsDistributor} from "@universal-rewards-distributor/interfaces/IUniversalRewardsDistributor.sol"; +import {IUniversalRewardsDistributor} from + "../lib/universal-rewards-distributor/src/interfaces/IUniversalRewardsDistributor.sol"; import {ErrorsLib} from "./libraries/ErrorsLib.sol"; diff --git a/src/WNativeBundler.sol b/src/WNativeBundler.sol index 447fa1a8..88d64525 100644 --- a/src/WNativeBundler.sol +++ b/src/WNativeBundler.sol @@ -3,9 +3,9 @@ pragma solidity 0.8.21; import {IWNative} from "./interfaces/IWNative.sol"; -import {Math} from "@morpho-utils/math/Math.sol"; +import {Math} from "../lib/morpho-utils/src/math/Math.sol"; import {ErrorsLib} from "./libraries/ErrorsLib.sol"; -import {SafeTransferLib, ERC20} from "solmate/src/utils/SafeTransferLib.sol"; +import {SafeTransferLib, ERC20} from "../lib/solmate/src/utils/SafeTransferLib.sol"; import {BaseBundler} from "./BaseBundler.sol"; diff --git a/src/interfaces/IMorphoBundler.sol b/src/interfaces/IMorphoBundler.sol index a421ee5d..e181f53f 100644 --- a/src/interfaces/IMorphoBundler.sol +++ b/src/interfaces/IMorphoBundler.sol @@ -6,7 +6,7 @@ import { IMorphoSupplyCallback, IMorphoSupplyCollateralCallback, IMorphoFlashLoanCallback -} from "@morpho-blue/interfaces/IMorphoCallbacks.sol"; +} from "../../lib/morpho-blue/src/interfaces/IMorphoCallbacks.sol"; interface IMorphoBundler is IMorphoSupplyCallback, diff --git a/src/migration/AaveV2MigrationBundler.sol b/src/migration/AaveV2MigrationBundler.sol index b7523e62..a52ba9ae 100644 --- a/src/migration/AaveV2MigrationBundler.sol +++ b/src/migration/AaveV2MigrationBundler.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity 0.8.21; -import {ILendingPool} from "@morpho-v1/aave-v2/interfaces/aave/ILendingPool.sol"; +import {ILendingPool} from "../../lib/morpho-v1/src/aave-v2/interfaces/aave/ILendingPool.sol"; -import {Math} from "@morpho-utils/math/Math.sol"; +import {Math} from "../../lib/morpho-utils/src/math/Math.sol"; import {ErrorsLib} from "../libraries/ErrorsLib.sol"; import {MigrationBundler, ERC20} from "./MigrationBundler.sol"; diff --git a/src/migration/AaveV3MigrationBundler.sol b/src/migration/AaveV3MigrationBundler.sol index 9cc24168..270f49bf 100644 --- a/src/migration/AaveV3MigrationBundler.sol +++ b/src/migration/AaveV3MigrationBundler.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity 0.8.21; -import {IPool} from "@aave/v3-core/interfaces/IPool.sol"; +import {IPool} from "../../lib/aave-v3-core/contracts/interfaces/IPool.sol"; -import {Math} from "@morpho-utils/math/Math.sol"; +import {Math} from "../../lib/morpho-utils/src/math/Math.sol"; import {ErrorsLib} from "../libraries/ErrorsLib.sol"; import {MigrationBundler, ERC20} from "./MigrationBundler.sol"; diff --git a/src/migration/AaveV3OptimizerMigrationBundler.sol b/src/migration/AaveV3OptimizerMigrationBundler.sol index c8d9897f..6bd25279 100644 --- a/src/migration/AaveV3OptimizerMigrationBundler.sol +++ b/src/migration/AaveV3OptimizerMigrationBundler.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity 0.8.21; -import {IMorpho as IAaveV3Optimizer} from "@morpho-aave-v3/interfaces/IMorpho.sol"; +import {IMorpho as IAaveV3Optimizer} from "../../lib/morpho-aave-v3/src/interfaces/IMorpho.sol"; -import {Math} from "@morpho-utils/math/Math.sol"; +import {Math} from "../../lib/morpho-utils/src/math/Math.sol"; import {ErrorsLib} from "../libraries/ErrorsLib.sol"; -import {Types} from "@morpho-aave-v3/libraries/Types.sol"; +import {Types} from "../../lib/morpho-aave-v3/src/libraries/Types.sol"; import {MigrationBundler, ERC20} from "./MigrationBundler.sol"; diff --git a/src/migration/CompoundV2MigrationBundler.sol b/src/migration/CompoundV2MigrationBundler.sol index 076c0a00..b5a46cbf 100644 --- a/src/migration/CompoundV2MigrationBundler.sol +++ b/src/migration/CompoundV2MigrationBundler.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.21; import {ICEth} from "./interfaces/ICEth.sol"; import {ICToken} from "./interfaces/ICToken.sol"; -import {Math} from "@morpho-utils/math/Math.sol"; +import {Math} from "../../lib/morpho-utils/src/math/Math.sol"; import {ErrorsLib} from "../libraries/ErrorsLib.sol"; import {WNativeBundler} from "../WNativeBundler.sol"; diff --git a/src/migration/CompoundV3MigrationBundler.sol b/src/migration/CompoundV3MigrationBundler.sol index a5db968c..9bd7fd97 100644 --- a/src/migration/CompoundV3MigrationBundler.sol +++ b/src/migration/CompoundV3MigrationBundler.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.21; import {ICompoundV3} from "./interfaces/ICompoundV3.sol"; -import {Math} from "@morpho-utils/math/Math.sol"; +import {Math} from "../../lib/morpho-utils/src/math/Math.sol"; import {ErrorsLib} from "../libraries/ErrorsLib.sol"; import {MigrationBundler, ERC20} from "./MigrationBundler.sol"; diff --git a/src/migration/MigrationBundler.sol b/src/migration/MigrationBundler.sol index fac61d25..fa0f0e79 100644 --- a/src/migration/MigrationBundler.sol +++ b/src/migration/MigrationBundler.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity 0.8.21; -import {SafeTransferLib, ERC20} from "solmate/src/utils/SafeTransferLib.sol"; +import {SafeTransferLib, ERC20} from "../../lib/solmate/src/utils/SafeTransferLib.sol"; import {TransferBundler} from "../TransferBundler.sol"; import {PermitBundler} from "../PermitBundler.sol"; diff --git a/src/mocks/ERC20Mock.sol b/src/mocks/ERC20Mock.sol index a580886c..595bdd21 100644 --- a/src/mocks/ERC20Mock.sol +++ b/src/mocks/ERC20Mock.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {ERC20} from "@openzeppelin/token/ERC20/ERC20.sol"; +import {ERC20} from "../../lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; contract ERC20Mock is ERC20 { constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {} diff --git a/src/mocks/ERC20PermitMock.sol b/src/mocks/ERC20PermitMock.sol index 6d94a9f1..34c24488 100644 --- a/src/mocks/ERC20PermitMock.sol +++ b/src/mocks/ERC20PermitMock.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {ERC20Permit} from "@openzeppelin/token/ERC20/extensions/ERC20Permit.sol"; -import {ERC20} from "@openzeppelin/token/ERC20/ERC20.sol"; +import {ERC20Permit} from "../../lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Permit.sol"; +import {ERC20} from "../../lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; contract ERC20PermitMock is ERC20Permit { constructor(string memory _name, string memory _symbol) ERC20Permit(_name) ERC20(_name, _symbol) {} diff --git a/src/mocks/ERC4626Mock.sol b/src/mocks/ERC4626Mock.sol index 6ca1bf9e..51f4db77 100644 --- a/src/mocks/ERC4626Mock.sol +++ b/src/mocks/ERC4626Mock.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {IERC20} from "@openzeppelin/token/ERC20/IERC20.sol"; -import {ERC20} from "@openzeppelin/token/ERC20/ERC20.sol"; -import {ERC4626} from "@openzeppelin/token/ERC20/extensions/ERC4626.sol"; +import {IERC20} from "../../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; +import {ERC20} from "../../lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; +import {ERC4626} from "../../lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC4626.sol"; contract ERC4626Mock is ERC4626 { constructor(address asset, string memory name, string memory symbol) ERC4626(IERC20(asset)) ERC20(name, symbol) {} diff --git a/src/mocks/IrmMock.sol b/src/mocks/IrmMock.sol index 53d07a0c..16042f3f 100644 --- a/src/mocks/IrmMock.sol +++ b/src/mocks/IrmMock.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {IIrm} from "@morpho-blue/interfaces/IIrm.sol"; -import {MarketParams, Market} from "@morpho-blue/interfaces/IMorpho.sol"; +import {IIrm} from "../../lib/morpho-blue/src/interfaces/IIrm.sol"; +import {MarketParams, Market} from "../../lib/morpho-blue/src/interfaces/IMorpho.sol"; -import {MathLib} from "@morpho-blue/libraries/MathLib.sol"; +import {MathLib} from "../../lib/morpho-blue/src/libraries/MathLib.sol"; contract IrmMock is IIrm { using MathLib for uint128; diff --git a/src/mocks/OracleMock.sol b/src/mocks/OracleMock.sol index f3db86b9..ffccee1f 100644 --- a/src/mocks/OracleMock.sol +++ b/src/mocks/OracleMock.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {IOracle} from "@morpho-blue/interfaces/IOracle.sol"; +import {IOracle} from "../../lib/morpho-blue/src/interfaces/IOracle.sol"; contract OracleMock is IOracle { uint256 public price; diff --git a/test/forge/ERC4626BundlerLocalTest.sol b/test/forge/ERC4626BundlerLocalTest.sol index 06b53015..2b05fc5e 100644 --- a/test/forge/ERC4626BundlerLocalTest.sol +++ b/test/forge/ERC4626BundlerLocalTest.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {ErrorsLib} from "src/libraries/ErrorsLib.sol"; +import {ErrorsLib} from "../../src/libraries/ErrorsLib.sol"; -import {ERC4626Mock} from "src/mocks/ERC4626Mock.sol"; -import "src/mocks/bundlers/ERC4626BundlerMock.sol"; +import {ERC4626Mock} from "../../src/mocks/ERC4626Mock.sol"; +import "../../src/mocks/bundlers/ERC4626BundlerMock.sol"; import "./helpers/LocalTest.sol"; diff --git a/test/forge/MorphoBundlerLocalTest.sol b/test/forge/MorphoBundlerLocalTest.sol index 2cb898f4..4a652e9e 100644 --- a/test/forge/MorphoBundlerLocalTest.sol +++ b/test/forge/MorphoBundlerLocalTest.sol @@ -2,10 +2,10 @@ pragma solidity ^0.8.0; import {SigUtils} from "./helpers/SigUtils.sol"; -import {ErrorsLib} from "src/libraries/ErrorsLib.sol"; -import {ErrorsLib as MorphoErrorsLib} from "@morpho-blue/libraries/ErrorsLib.sol"; +import {ErrorsLib} from "../../src/libraries/ErrorsLib.sol"; +import {ErrorsLib as MorphoErrorsLib} from "../../lib/morpho-blue/src/libraries/ErrorsLib.sol"; -import "src/mocks/bundlers/MorphoBundlerMock.sol"; +import "../../src/mocks/bundlers/MorphoBundlerMock.sol"; import "./helpers/LocalTest.sol"; diff --git a/test/forge/PermitBundlerLocalTest.sol b/test/forge/PermitBundlerLocalTest.sol index e4c79ec8..6dc2f55e 100644 --- a/test/forge/PermitBundlerLocalTest.sol +++ b/test/forge/PermitBundlerLocalTest.sol @@ -3,8 +3,8 @@ pragma solidity ^0.8.0; import {SigUtils, Permit} from "test/forge/helpers/SigUtils.sol"; -import "src/mocks/bundlers/PermitBundlerMock.sol"; -import {ERC20PermitMock} from "src/mocks/ERC20PermitMock.sol"; +import "../../src/mocks/bundlers/PermitBundlerMock.sol"; +import {ERC20PermitMock} from "../../src/mocks/ERC20PermitMock.sol"; import "./helpers/LocalTest.sol"; diff --git a/test/forge/TransferBundlerLocalTest.sol b/test/forge/TransferBundlerLocalTest.sol index c2cd1d3e..3b3d0dbf 100644 --- a/test/forge/TransferBundlerLocalTest.sol +++ b/test/forge/TransferBundlerLocalTest.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {ErrorsLib} from "src/libraries/ErrorsLib.sol"; +import {ErrorsLib} from "../../src/libraries/ErrorsLib.sol"; -import "src/mocks/bundlers/TransferBundlerMock.sol"; +import "../../src/mocks/bundlers/TransferBundlerMock.sol"; import "./helpers/LocalTest.sol"; diff --git a/test/forge/UrdBundlerLocalTest.sol b/test/forge/UrdBundlerLocalTest.sol index b74357e4..915369a1 100644 --- a/test/forge/UrdBundlerLocalTest.sol +++ b/test/forge/UrdBundlerLocalTest.sol @@ -1,15 +1,16 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {IUniversalRewardsDistributor} from "@universal-rewards-distributor/interfaces/IUniversalRewardsDistributor.sol"; +import {IUniversalRewardsDistributor} from + "../../lib/universal-rewards-distributor/src/interfaces/IUniversalRewardsDistributor.sol"; -import {ErrorsLib} from "src/libraries/ErrorsLib.sol"; -import {ErrorsLib as UrdErrorsLib} from "@universal-rewards-distributor/libraries/ErrorsLib.sol"; +import {ErrorsLib} from "../../src/libraries/ErrorsLib.sol"; +import {ErrorsLib as UrdErrorsLib} from "../../lib/universal-rewards-distributor/src/libraries/ErrorsLib.sol"; -import {Merkle} from "@murky/src/Merkle.sol"; -import {UrdFactory} from "@universal-rewards-distributor/UrdFactory.sol"; +import {Merkle} from "../../lib/murky/src/Merkle.sol"; +import {UrdFactory} from "../../lib/universal-rewards-distributor/src/UrdFactory.sol"; -import "src/mocks/bundlers/UrdBundlerMock.sol"; +import "../../src/mocks/bundlers/UrdBundlerMock.sol"; import "./helpers/LocalTest.sol"; diff --git a/test/forge/ethereum/EthereumBundlerEthereumTest.sol b/test/forge/ethereum/EthereumBundlerEthereumTest.sol index b0417d60..32755909 100644 --- a/test/forge/ethereum/EthereumBundlerEthereumTest.sol +++ b/test/forge/ethereum/EthereumBundlerEthereumTest.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {IAllowanceTransfer} from "@permit2/interfaces/IAllowanceTransfer.sol"; +import {IAllowanceTransfer} from "../../../lib/permit2/src/interfaces/IAllowanceTransfer.sol"; -import "src/ethereum/EthereumBundler.sol"; +import "../../../src/ethereum/EthereumBundler.sol"; import "./helpers/EthereumTest.sol"; diff --git a/test/forge/ethereum/EthereumPermitBundlerEthereumTest.sol b/test/forge/ethereum/EthereumPermitBundlerEthereumTest.sol index c6e3a492..30fde51e 100644 --- a/test/forge/ethereum/EthereumPermitBundlerEthereumTest.sol +++ b/test/forge/ethereum/EthereumPermitBundlerEthereumTest.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.0; import {DaiPermit} from "../helpers/SigUtils.sol"; -import "src/mocks/bundlers/ethereum/EthereumPermitBundlerMock.sol"; +import "../../../src/mocks/bundlers/ethereum/EthereumPermitBundlerMock.sol"; import "./helpers/EthereumTest.sol"; diff --git a/test/forge/ethereum/EthereumStEthBundlerEthereumTest.sol b/test/forge/ethereum/EthereumStEthBundlerEthereumTest.sol index 8a0de69d..cb9ae4c9 100644 --- a/test/forge/ethereum/EthereumStEthBundlerEthereumTest.sol +++ b/test/forge/ethereum/EthereumStEthBundlerEthereumTest.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {IAllowanceTransfer} from "@permit2/interfaces/IAllowanceTransfer.sol"; +import {IAllowanceTransfer} from "../../../lib/permit2/src/interfaces/IAllowanceTransfer.sol"; -import {ErrorsLib} from "src/libraries/ErrorsLib.sol"; +import {ErrorsLib} from "../../../src/libraries/ErrorsLib.sol"; -import "src/mocks/bundlers/ethereum/EthereumStEthBundlerMock.sol"; +import "../../../src/mocks/bundlers/ethereum/EthereumStEthBundlerMock.sol"; import "./helpers/EthereumTest.sol"; diff --git a/test/forge/ethereum/Permit2BundlerEthereumTest.sol b/test/forge/ethereum/Permit2BundlerEthereumTest.sol index b98fe25a..659951d4 100644 --- a/test/forge/ethereum/Permit2BundlerEthereumTest.sol +++ b/test/forge/ethereum/Permit2BundlerEthereumTest.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {ErrorsLib} from "src/libraries/ErrorsLib.sol"; +import {ErrorsLib} from "../../../src/libraries/ErrorsLib.sol"; -import "src/mocks/bundlers/Permit2BundlerMock.sol"; +import "../../../src/mocks/bundlers/Permit2BundlerMock.sol"; import "./helpers/EthereumTest.sol"; diff --git a/test/forge/ethereum/WNativeBundlerEthereumTest.sol b/test/forge/ethereum/WNativeBundlerEthereumTest.sol index cd583e38..2b3bc7c0 100644 --- a/test/forge/ethereum/WNativeBundlerEthereumTest.sol +++ b/test/forge/ethereum/WNativeBundlerEthereumTest.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {ErrorsLib} from "src/libraries/ErrorsLib.sol"; +import {ErrorsLib} from "../../../src/libraries/ErrorsLib.sol"; -import "src/mocks/bundlers/WNativeBundlerMock.sol"; +import "../../../src/mocks/bundlers/WNativeBundlerMock.sol"; import "./helpers/EthereumTest.sol"; diff --git a/test/forge/ethereum/migration/AaveV2EthereumMigrationBundlerEthereumTest.sol b/test/forge/ethereum/migration/AaveV2EthereumMigrationBundlerEthereumTest.sol index 30cab518..7b11204d 100644 --- a/test/forge/ethereum/migration/AaveV2EthereumMigrationBundlerEthereumTest.sol +++ b/test/forge/ethereum/migration/AaveV2EthereumMigrationBundlerEthereumTest.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {ILendingPool} from "@morpho-v1/aave-v2/interfaces/aave/ILendingPool.sol"; -import {IAToken} from "@morpho-v1/aave-v2/interfaces/aave/IAToken.sol"; -import {IERC4626} from "@openzeppelin/interfaces/IERC4626.sol"; -import {IStEth} from "src/interfaces/IStEth.sol"; +import {ILendingPool} from "../../../../lib/morpho-v1/src/aave-v2/interfaces/aave/ILendingPool.sol"; +import {IAToken} from "../../../../lib/morpho-v1/src/aave-v2/interfaces/aave/IAToken.sol"; +import {IERC4626} from "../../../../lib/openzeppelin-contracts/contracts/interfaces/IERC4626.sol"; +import {IStEth} from "../../../../src/interfaces/IStEth.sol"; -import "src/ethereum/migration/AaveV2EthereumMigrationBundler.sol"; +import "../../../../src/ethereum/migration/AaveV2EthereumMigrationBundler.sol"; import "./helpers/EthereumMigrationTest.sol"; diff --git a/test/forge/ethereum/migration/AaveV3MigrationBundlerEthereumTest.sol b/test/forge/ethereum/migration/AaveV3MigrationBundlerEthereumTest.sol index a645d4e0..dabbf826 100644 --- a/test/forge/ethereum/migration/AaveV3MigrationBundlerEthereumTest.sol +++ b/test/forge/ethereum/migration/AaveV3MigrationBundlerEthereumTest.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {IPool} from "@aave/v3-core/interfaces/IPool.sol"; -import {IAToken} from "@aave/v3-core/interfaces/IAToken.sol"; +import {IPool} from "../../../../lib/aave-v3-core/contracts/interfaces/IPool.sol"; +import {IAToken} from "../../../../lib/aave-v3-core/contracts/interfaces/IAToken.sol"; import {SigUtils, Permit} from "test/forge/helpers/SigUtils.sol"; -import "src/migration/AaveV3MigrationBundler.sol"; +import "../../../../src/migration/AaveV3MigrationBundler.sol"; import "./helpers/EthereumMigrationTest.sol"; diff --git a/test/forge/ethereum/migration/AaveV3OptimizerMigrationBundlerEthereumTest.sol b/test/forge/ethereum/migration/AaveV3OptimizerMigrationBundlerEthereumTest.sol index 4807140f..2d6eb90d 100644 --- a/test/forge/ethereum/migration/AaveV3OptimizerMigrationBundlerEthereumTest.sol +++ b/test/forge/ethereum/migration/AaveV3OptimizerMigrationBundlerEthereumTest.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {IMorpho as IAaveV3Optimizer} from "@morpho-aave-v3/interfaces/IMorpho.sol"; +import {IMorpho as IAaveV3Optimizer} from "../../../../lib/morpho-aave-v3/src/interfaces/IMorpho.sol"; -import {Types} from "@morpho-aave-v3/libraries/Types.sol"; +import {Types} from "../../../../lib/morpho-aave-v3/src/libraries/Types.sol"; import {AaveV3OptimizerAuthorization} from "../../helpers/SigUtils.sol"; -import "src/migration/AaveV3OptimizerMigrationBundler.sol"; +import "../../../../src/migration/AaveV3OptimizerMigrationBundler.sol"; import "./helpers/EthereumMigrationTest.sol"; diff --git a/test/forge/ethereum/migration/CompoundV2EthBorrowableMigrationBundlerEthereumTest.sol b/test/forge/ethereum/migration/CompoundV2EthBorrowableMigrationBundlerEthereumTest.sol index 01fd1f91..cc697ca9 100644 --- a/test/forge/ethereum/migration/CompoundV2EthBorrowableMigrationBundlerEthereumTest.sol +++ b/test/forge/ethereum/migration/CompoundV2EthBorrowableMigrationBundlerEthereumTest.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {IComptroller} from "src/migration/interfaces/IComptroller.sol"; +import {IComptroller} from "../../../../src/migration/interfaces/IComptroller.sol"; -import "src/migration/CompoundV2MigrationBundler.sol"; +import "../../../../src/migration/CompoundV2MigrationBundler.sol"; import "./helpers/EthereumMigrationTest.sol"; diff --git a/test/forge/ethereum/migration/CompoundV2EthCollateralMigrationBundlerEthereumTest.sol b/test/forge/ethereum/migration/CompoundV2EthCollateralMigrationBundlerEthereumTest.sol index fd0035b7..c3f7ea69 100644 --- a/test/forge/ethereum/migration/CompoundV2EthCollateralMigrationBundlerEthereumTest.sol +++ b/test/forge/ethereum/migration/CompoundV2EthCollateralMigrationBundlerEthereumTest.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {IComptroller} from "src/migration/interfaces/IComptroller.sol"; +import {IComptroller} from "../../../../src/migration/interfaces/IComptroller.sol"; -import "src/migration/CompoundV2MigrationBundler.sol"; +import "../../../../src/migration/CompoundV2MigrationBundler.sol"; import "./helpers/EthereumMigrationTest.sol"; diff --git a/test/forge/ethereum/migration/CompoundV2NoEthMigrationBundlerEthereumTest.sol b/test/forge/ethereum/migration/CompoundV2NoEthMigrationBundlerEthereumTest.sol index 2792629b..0adc1a1b 100644 --- a/test/forge/ethereum/migration/CompoundV2NoEthMigrationBundlerEthereumTest.sol +++ b/test/forge/ethereum/migration/CompoundV2NoEthMigrationBundlerEthereumTest.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {IComptroller} from "src/migration/interfaces/IComptroller.sol"; +import {IComptroller} from "../../../../src/migration/interfaces/IComptroller.sol"; -import "src/migration/CompoundV2MigrationBundler.sol"; +import "../../../../src/migration/CompoundV2MigrationBundler.sol"; import "./helpers/EthereumMigrationTest.sol"; diff --git a/test/forge/ethereum/migration/CompoundV3MigrationBundlerEthereumTest.sol b/test/forge/ethereum/migration/CompoundV3MigrationBundlerEthereumTest.sol index 0d19f592..ecb7930e 100644 --- a/test/forge/ethereum/migration/CompoundV3MigrationBundlerEthereumTest.sol +++ b/test/forge/ethereum/migration/CompoundV3MigrationBundlerEthereumTest.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.0; import {CompoundV3Authorization} from "../../helpers/SigUtils.sol"; -import "src/migration/CompoundV3MigrationBundler.sol"; +import "../../../../src/migration/CompoundV3MigrationBundler.sol"; import "./helpers/EthereumMigrationTest.sol"; diff --git a/test/forge/ethereum/migration/helpers/EthereumMigrationTest.sol b/test/forge/ethereum/migration/helpers/EthereumMigrationTest.sol index 72519fdf..f0929f21 100644 --- a/test/forge/ethereum/migration/helpers/EthereumMigrationTest.sol +++ b/test/forge/ethereum/migration/helpers/EthereumMigrationTest.sol @@ -1,19 +1,19 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {SafeTransferLib, ERC20} from "solmate/src/utils/SafeTransferLib.sol"; -import {ErrorsLib} from "src/libraries/ErrorsLib.sol"; -import {MarketParamsLib} from "@morpho-blue/libraries/MarketParamsLib.sol"; -import {MorphoLib} from "@morpho-blue/libraries/periphery/MorphoLib.sol"; -import {MorphoBalancesLib} from "@morpho-blue/libraries/periphery/MorphoBalancesLib.sol"; +import {SafeTransferLib, ERC20} from "../../../../../lib/solmate/src/utils/SafeTransferLib.sol"; +import {ErrorsLib} from "../../../../../src/libraries/ErrorsLib.sol"; +import {MarketParamsLib} from "../../../../../lib/morpho-blue/src/libraries/MarketParamsLib.sol"; +import {MorphoLib} from "../../../../../lib/morpho-blue/src/libraries/periphery/MorphoLib.sol"; +import {MorphoBalancesLib} from "../../../../../lib/morpho-blue/src/libraries/periphery/MorphoBalancesLib.sol"; import "../../helpers/EthereumTest.sol"; -import {BaseBundler} from "src/BaseBundler.sol"; -import {PermitBundler} from "src/PermitBundler.sol"; -import {Permit2Bundler} from "src/Permit2Bundler.sol"; -import {ERC4626Bundler} from "src/ERC4626Bundler.sol"; -import {MorphoBundler} from "src/MorphoBundler.sol"; -import {ERC4626Mock} from "src/mocks/ERC4626Mock.sol"; +import {BaseBundler} from "../../../../../src/BaseBundler.sol"; +import {PermitBundler} from "../../../../../src/PermitBundler.sol"; +import {Permit2Bundler} from "../../../../../src/Permit2Bundler.sol"; +import {ERC4626Bundler} from "../../../../../src/ERC4626Bundler.sol"; +import {MorphoBundler} from "../../../../../src/MorphoBundler.sol"; +import {ERC4626Mock} from "../../../../../src/mocks/ERC4626Mock.sol"; contract EthereumMigrationTest is EthereumTest { using SafeTransferLib for ERC20; diff --git a/test/forge/helpers/BaseTest.sol b/test/forge/helpers/BaseTest.sol index 691d78cf..7ba80a65 100644 --- a/test/forge/helpers/BaseTest.sol +++ b/test/forge/helpers/BaseTest.sol @@ -1,33 +1,33 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import "@morpho-blue/interfaces/IMorpho.sol"; +import "../../../lib/morpho-blue/src/interfaces/IMorpho.sol"; import {SigUtils} from "./SigUtils.sol"; -import {MarketParamsLib} from "@morpho-blue/libraries/MarketParamsLib.sol"; -import {SharesMathLib} from "@morpho-blue/libraries/SharesMathLib.sol"; -import {MathLib, WAD} from "@morpho-blue/libraries/MathLib.sol"; -import {UtilsLib} from "@morpho-blue/libraries/UtilsLib.sol"; -import {SafeTransferLib, ERC20} from "solmate/src/utils/SafeTransferLib.sol"; -import {MorphoLib} from "@morpho-blue/libraries/periphery/MorphoLib.sol"; -import {MorphoBalancesLib} from "@morpho-blue/libraries/periphery/MorphoBalancesLib.sol"; +import {MarketParamsLib} from "../../../lib/morpho-blue/src/libraries/MarketParamsLib.sol"; +import {SharesMathLib} from "../../../lib/morpho-blue/src/libraries/SharesMathLib.sol"; +import {MathLib, WAD} from "../../../lib/morpho-blue/src/libraries/MathLib.sol"; +import {UtilsLib} from "../../../lib/morpho-blue/src/libraries/UtilsLib.sol"; +import {SafeTransferLib, ERC20} from "../../../lib/solmate/src/utils/SafeTransferLib.sol"; +import {MorphoLib} from "../../../lib/morpho-blue/src/libraries/periphery/MorphoLib.sol"; +import {MorphoBalancesLib} from "../../../lib/morpho-blue/src/libraries/periphery/MorphoBalancesLib.sol"; import { LIQUIDATION_CURSOR, MAX_LIQUIDATION_INCENTIVE_FACTOR, ORACLE_PRICE_SCALE -} from "@morpho-blue/libraries/ConstantsLib.sol"; +} from "../../../lib/morpho-blue/src/libraries/ConstantsLib.sol"; -import {IrmMock} from "@morpho-blue/mocks/IrmMock.sol"; -import {OracleMock} from "@morpho-blue/mocks/OracleMock.sol"; +import {IrmMock} from "../../../lib/morpho-blue/src/mocks/IrmMock.sol"; +import {OracleMock} from "../../../lib/morpho-blue/src/mocks/OracleMock.sol"; -import {BaseBundler} from "src/BaseBundler.sol"; -import {TransferBundler} from "src/TransferBundler.sol"; -import {ERC4626Bundler} from "src/ERC4626Bundler.sol"; -import {UrdBundler} from "src/UrdBundler.sol"; -import {MorphoBundler} from "src/MorphoBundler.sol"; +import {BaseBundler} from "../../../src/BaseBundler.sol"; +import {TransferBundler} from "../../../src/TransferBundler.sol"; +import {ERC4626Bundler} from "../../../src/ERC4626Bundler.sol"; +import {UrdBundler} from "../../../src/UrdBundler.sol"; +import {MorphoBundler} from "../../../src/MorphoBundler.sol"; -import "@forge-std/Test.sol"; -import "@forge-std/console2.sol"; +import "../../../lib/forge-std/src/Test.sol"; +import "../../../lib/forge-std/src/console2.sol"; uint256 constant MIN_AMOUNT = 1000; uint256 constant MAX_AMOUNT = 2 ** 64; // Must be less than or equal to type(uint160).max. diff --git a/test/forge/helpers/ForkTest.sol b/test/forge/helpers/ForkTest.sol index fe9e147e..6eb8352a 100644 --- a/test/forge/helpers/ForkTest.sol +++ b/test/forge/helpers/ForkTest.sol @@ -1,15 +1,15 @@ // SPDX-License-Identifier: AGPL-3.0-only pragma solidity ^0.8.0; -import {IStEth} from "src/interfaces/IStEth.sol"; -import {IWstEth} from "src/interfaces/IWstEth.sol"; -import {ISignatureTransfer} from "@permit2/interfaces/ISignatureTransfer.sol"; +import {IStEth} from "../../../src/interfaces/IStEth.sol"; +import {IWstEth} from "../../../src/interfaces/IWstEth.sol"; +import {ISignatureTransfer} from "../../../lib/permit2/src/interfaces/ISignatureTransfer.sol"; -import {Permit2Lib} from "@permit2/libraries/Permit2Lib.sol"; +import {Permit2Lib} from "../../../lib/permit2/src/libraries/Permit2Lib.sol"; -import {Permit2Bundler} from "src/Permit2Bundler.sol"; -import {WNativeBundler} from "src/WNativeBundler.sol"; -import {StEthBundler} from "src/StEthBundler.sol"; +import {Permit2Bundler} from "../../../src/Permit2Bundler.sol"; +import {WNativeBundler} from "../../../src/WNativeBundler.sol"; +import {StEthBundler} from "../../../src/StEthBundler.sol"; import "config/Configured.sol"; import "./BaseTest.sol"; diff --git a/test/forge/helpers/LocalTest.sol b/test/forge/helpers/LocalTest.sol index c138ca0e..10bdf4ff 100644 --- a/test/forge/helpers/LocalTest.sol +++ b/test/forge/helpers/LocalTest.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {ERC20Mock} from "src/mocks/ERC20Mock.sol"; +import {ERC20Mock} from "../../../src/mocks/ERC20Mock.sol"; import "./BaseTest.sol"; diff --git a/test/forge/helpers/SigUtils.sol b/test/forge/helpers/SigUtils.sol index 00e57c2d..c8ae76b9 100644 --- a/test/forge/helpers/SigUtils.sol +++ b/test/forge/helpers/SigUtils.sol @@ -1,14 +1,14 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {ICompoundV3} from "src/migration/interfaces/ICompoundV3.sol"; -import {Authorization} from "@morpho-blue/interfaces/IMorpho.sol"; -import {ISignatureTransfer} from "@permit2/interfaces/ISignatureTransfer.sol"; - -import {PermitHash} from "@permit2/libraries/PermitHash.sol"; -import {ECDSA} from "@openzeppelin/utils/cryptography/ECDSA.sol"; -import {AUTHORIZATION_TYPEHASH} from "@morpho-blue/libraries/ConstantsLib.sol"; -import {Constants as AaveV3OptimizerConstants} from "@morpho-aave-v3/libraries/Constants.sol"; +import {ICompoundV3} from "../../../src/migration/interfaces/ICompoundV3.sol"; +import {Authorization} from "../../../lib/morpho-blue/src/interfaces/IMorpho.sol"; +import {ISignatureTransfer} from "../../../lib/permit2/src/interfaces/ISignatureTransfer.sol"; + +import {PermitHash} from "../../../lib/permit2/src/libraries/PermitHash.sol"; +import {ECDSA} from "../../../lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol"; +import {AUTHORIZATION_TYPEHASH} from "../../../lib/morpho-blue/src/libraries/ConstantsLib.sol"; +import {Constants as AaveV3OptimizerConstants} from "../../../lib/morpho-aave-v3/src/libraries/Constants.sol"; bytes32 constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");