I'm using hardhat and have 2 compiler versions: 0.6.12 and 0.8.10. In the contract that has 0.6.0 solidity pragma I want to import the IERC20 from openzeppelin, but this would give me an error:

These files import other files that use a different and incompatible version of Solidity:

* contracts/TryAaveV2.sol (^0.6.0) imports @openzeppelin/contracts/token/ERC20/IERC20.sol (^0.8.0)

How can I use the IERC20 from openzeppelin without having to copy-paste the interface?

Mar 28, 2022, 11:42 AM
Maybe there is a plugin that overrides the solidity pragma of the specific import
I understand that in the case above I don't need the IERC20 because the FlashLoanReceiverBase already has it
Just curious how this could be done in general
Mar 28, 2022, 11:49 AM

© 2024 Draquery.com All rights reserved.