From 121b237df7c705e725b42c6944db1d778368dfd3 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Thu, 5 Oct 2023 15:50:50 +0200 Subject: [PATCH] fix(remappings): use relative imports --- remappings.txt | 1 - test/forge/BaseTest.sol | 18 +++++++++--------- test/forge/MarketParamsLibTest.sol | 2 +- test/forge/helpers/SigUtils.sol | 4 ++-- test/forge/libraries/MathLibTest.sol | 6 +++--- test/forge/libraries/SafeTransferLibTest.sol | 6 +++--- test/forge/libraries/UtilsLibTest.sol | 6 +++--- .../libraries/periphery/MorphoLibTest.sol | 2 +- .../periphery/MorphoStorageLibTest.sol | 2 +- 9 files changed, 23 insertions(+), 24 deletions(-) delete mode 100644 remappings.txt diff --git a/remappings.txt b/remappings.txt deleted file mode 100644 index feaba2dd1..000000000 --- a/remappings.txt +++ /dev/null @@ -1 +0,0 @@ -forge-std/=lib/forge-std/src/ diff --git a/test/forge/BaseTest.sol b/test/forge/BaseTest.sol index d2684d985..af22faea4 100644 --- a/test/forge/BaseTest.sol +++ b/test/forge/BaseTest.sol @@ -1,20 +1,20 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import "forge-std/Test.sol"; -import "forge-std/console.sol"; +import "../../lib/forge-std/src/Test.sol"; +import "../../lib/forge-std/src/console.sol"; -import "src/interfaces/IMorphoCallbacks.sol"; -import {IrmMock} from "src/mocks/IrmMock.sol"; -import {ERC20Mock} from "src/mocks/ERC20Mock.sol"; -import {OracleMock} from "src/mocks/OracleMock.sol"; +import "../../src/interfaces/IMorphoCallbacks.sol"; +import {IrmMock} from "../../src/mocks/IrmMock.sol"; +import {ERC20Mock} from "../../src/mocks/ERC20Mock.sol"; +import {OracleMock} from "../../src/mocks/OracleMock.sol"; -import "src/Morpho.sol"; +import "../../src/Morpho.sol"; import {Math} from "./helpers/Math.sol"; import {SigUtils} from "./helpers/SigUtils.sol"; import {ArrayLib} from "./helpers/ArrayLib.sol"; -import {MorphoLib} from "src/libraries/periphery/MorphoLib.sol"; -import {MorphoBalancesLib} from "src/libraries/periphery/MorphoBalancesLib.sol"; +import {MorphoLib} from "../../src/libraries/periphery/MorphoLib.sol"; +import {MorphoBalancesLib} from "../../src/libraries/periphery/MorphoBalancesLib.sol"; contract BaseTest is Test { using Math for uint256; diff --git a/test/forge/MarketParamsLibTest.sol b/test/forge/MarketParamsLibTest.sol index 16fa65126..9ce372840 100644 --- a/test/forge/MarketParamsLibTest.sol +++ b/test/forge/MarketParamsLibTest.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import "forge-std/Test.sol"; +import "../../lib/forge-std/src/Test.sol"; import {MarketParamsLib, MarketParams, Id} from "src/libraries/MarketParamsLib.sol"; diff --git a/test/forge/helpers/SigUtils.sol b/test/forge/helpers/SigUtils.sol index b4ae5b3da..9a60b52f0 100644 --- a/test/forge/helpers/SigUtils.sol +++ b/test/forge/helpers/SigUtils.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {AUTHORIZATION_TYPEHASH} from "src/libraries/ConstantsLib.sol"; +import {AUTHORIZATION_TYPEHASH} from "../../../src/libraries/ConstantsLib.sol"; -import {Authorization} from "src/interfaces/IMorpho.sol"; +import {Authorization} from "../../../src/interfaces/IMorpho.sol"; library SigUtils { /// @dev Computes the hash of the EIP-712 encoded data. diff --git a/test/forge/libraries/MathLibTest.sol b/test/forge/libraries/MathLibTest.sol index b431aab1f..b6f38471e 100644 --- a/test/forge/libraries/MathLibTest.sol +++ b/test/forge/libraries/MathLibTest.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import "forge-std/Test.sol"; +import "../../../lib/forge-std/src/Test.sol"; -import "src/libraries/MathLib.sol"; -import "test/forge/helpers/WadMath.sol"; +import "../../../src/libraries/MathLib.sol"; +import "../helpers/WadMath.sol"; contract MathLibTest is Test { using MathLib for uint256; diff --git a/test/forge/libraries/SafeTransferLibTest.sol b/test/forge/libraries/SafeTransferLibTest.sol index a049d8283..de019de1b 100644 --- a/test/forge/libraries/SafeTransferLibTest.sol +++ b/test/forge/libraries/SafeTransferLibTest.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import "forge-std/Test.sol"; +import "../../../lib/forge-std/src/Test.sol"; -import "src/libraries/ErrorsLib.sol"; -import {IERC20, SafeTransferLib} from "src/libraries/SafeTransferLib.sol"; +import "../../../src/libraries/ErrorsLib.sol"; +import {IERC20, SafeTransferLib} from "../../../src/libraries/SafeTransferLib.sol"; /// @dev Token not returning any boolean on transfer and transferFrom. contract ERC20WithoutBoolean { diff --git a/test/forge/libraries/UtilsLibTest.sol b/test/forge/libraries/UtilsLibTest.sol index b68184007..5d3441bf4 100644 --- a/test/forge/libraries/UtilsLibTest.sol +++ b/test/forge/libraries/UtilsLibTest.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import "forge-std/Test.sol"; +import "../../../lib/forge-std/src/Test.sol"; -import "src/libraries/ErrorsLib.sol"; -import "src/libraries/UtilsLib.sol"; +import "../../../src/libraries/ErrorsLib.sol"; +import "../../../src/libraries/UtilsLib.sol"; contract UtilsLibTest is Test { using UtilsLib for uint256; diff --git a/test/forge/libraries/periphery/MorphoLibTest.sol b/test/forge/libraries/periphery/MorphoLibTest.sol index b7ad0f3bb..864bee16b 100644 --- a/test/forge/libraries/periphery/MorphoLibTest.sol +++ b/test/forge/libraries/periphery/MorphoLibTest.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {MorphoBalancesLib} from "src/libraries/periphery/MorphoBalancesLib.sol"; +import {MorphoBalancesLib} from "../../../../src/libraries/periphery/MorphoBalancesLib.sol"; import "../../BaseTest.sol"; diff --git a/test/forge/libraries/periphery/MorphoStorageLibTest.sol b/test/forge/libraries/periphery/MorphoStorageLibTest.sol index 550bbb396..69e8f3b72 100644 --- a/test/forge/libraries/periphery/MorphoStorageLibTest.sol +++ b/test/forge/libraries/periphery/MorphoStorageLibTest.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; -import {MorphoStorageLib} from "src/libraries/periphery/MorphoStorageLib.sol"; +import {MorphoStorageLib} from "../../../../src/libraries/periphery/MorphoStorageLib.sol"; import {SigUtils} from "../../helpers/SigUtils.sol"; import "../../BaseTest.sol";