Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(remappings): use relative imports (option 4) #521

Merged
merged 3 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion remappings.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
forge-std/=lib/forge-std/src/
@morpho-blue/=./
18 changes: 9 additions & 9 deletions test/forge/BaseTest.sol
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion test/forge/MarketParamsLibTest.sol
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
4 changes: 2 additions & 2 deletions test/forge/helpers/SigUtils.sol
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions test/forge/libraries/MathLibTest.sol
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
6 changes: 3 additions & 3 deletions test/forge/libraries/SafeTransferLibTest.sol
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions test/forge/libraries/UtilsLibTest.sol
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion test/forge/libraries/periphery/MorphoLibTest.sol
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion test/forge/libraries/periphery/MorphoStorageLibTest.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down