Hi, my dApp uses openzeppelin version "^4.0.0"
.
We are trying to integrate @opengsn v2, which requires openzeppelin version "3.1.0-solc-0.7"
.
When I try to compile the code, this error throws:
Error HH404: File @openzeppelin/contracts/utils/cryptography/draft-EIP712.sol, imported from contracts/ERC721Permit.sol, not found.
The issue is in the node modules, where one version of openzeppelin overrides the other, rendering some contracts imports broken.
Code to reproduce
-
create a smart contract with compiler version
^0.8.0
that imports @openzeppelin/contracts/utils/cryptography/draft-EIP712.sol -
also use the opengsn v2 (which imports the openzeppelin SafeMath library that is no longer needed with Solidity compiler version
^0.8.0
).
Try to compile your code and see errors pertaining to conflicting node module package imports.
Environment
I'm using HardHat version 2.9.2 and Solidity compiler version ^0.8.0
Thank you!