Skip to content
Merged
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ libs = ["lib"]
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
15 changes: 13 additions & 2 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,25 @@ const config: HardhatUserConfig = {
{
version: "0.8.21",
settings: {
optimizer: {
optimizer: {
enabled: true,
runs: 200,
},
viaIR: true,
evmVersion: "paris",
},
}
},
{
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 999999,
},
viaIR: true,
evmVersion: "paris",
}
}
],
},
mocha: {
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.8.19;
// 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