Skip to content
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ test = "test/forge"
evm_version = "paris"
fs_permissions = [
{ access = "read", path = "./config/"},
{ access = "read", path = "./lib/morpho-blue/out/"}
{ access = "read", path = "./out/"}
]

[profile.default.rpc_endpoints]
Expand Down
7 changes: 7 additions & 0 deletions src/mocks/MorphoImport.sol
Comment thread
adhusson marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.0.0;
Comment thread
adhusson marked this conversation as resolved.
Outdated
// Force foundry to compile Morpho Blue even though it's not imported by Metamorpho or by the tests.
// Morpho Blue will be compiled with its own solidity version.
// The resulting bytecode is then loaded by BaseTest.sol.

import "../../lib/morpho-blue/src/Morpho.sol";
3 changes: 1 addition & 2 deletions test/forge/helpers/BaseTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ contract BaseTest is Test {
address internal MORPHO_OWNER = makeAddr("MorphoOwner");
address internal MORPHO_FEE_RECIPIENT = makeAddr("MorphoFeeRecipient");

IMorpho internal morpho =
IMorpho(deployCode("lib/morpho-blue/out/Morpho.sol/Morpho.json", abi.encode(MORPHO_OWNER)));
IMorpho internal morpho = IMorpho(deployCode("Morpho.sol", abi.encode(MORPHO_OWNER)));
ERC20Mock internal loanToken = new ERC20Mock("loan", "B");
ERC20Mock internal collateralToken = new ERC20Mock("collateral", "C");
OracleMock internal oracle = new OracleMock();
Expand Down