You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IMetaMorpho.sol contains the following imports from OZ and Morpho Blue:
import {IMorpho, Id, MarketParams} from "../../lib/morpho-blue/src/interfaces/IMorpho.sol";
import {IERC4626} from "../../lib/openzeppelin-contracts/contracts/interfaces/IERC4626.sol";
import {IERC20Permit} from "../../lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol";
If the integrator does not have the dependencies at these exact locations, it's not possible to compile a contract integrating with the IMetaMorpho interface.
Scenarios where this would break:
Integrator has the dependencies with a version string (e.g. lib/morpho-blue-1.0.0/)
Integrator is using soldeer to manage dependencies (e.g. dependencies/morpho-blue-1.0.0/)
It does also not appear to be possible to add a relative path into the remappings.txt file to force forge/solc to remap the relative path. i.e. this does not work ../../lib/morpho-blue/src/=dependencies/morpho-blue-1.0.0/src/
The text was updated successfully, but these errors were encountered:
If the integrator does not have the dependencies at these exact locations
In which case is this possible? Aren't you installing this repository as a forge dependency (git submodule under-the-hood)?
Relative dependencies are safer than remappings because the versions of contracts are exact (whereas remappings can map OUR dependency import to YOURS - possibly breaking)
The reason why we don't use remapping it precisely to make sure that our dependancies are used (instead of other ones, whatever they are). Remappings can create dangerous bugs.
As @Rubilmax said, it's best to use our repos as git submodule (to recursively have the dependancies).
I'm not familiar with soldeer, but can't it fetch all the dependancies recursively?
IMetaMorpho.sol
contains the following imports from OZ and Morpho Blue:If the integrator does not have the dependencies at these exact locations, it's not possible to compile a contract integrating with the
IMetaMorpho
interface.Scenarios where this would break:
lib/morpho-blue-1.0.0/
)dependencies/morpho-blue-1.0.0/
)It does also not appear to be possible to add a relative path into the remappings.txt file to force forge/solc to remap the relative path. i.e. this does not work
../../lib/morpho-blue/src/=dependencies/morpho-blue-1.0.0/src/
The text was updated successfully, but these errors were encountered: