Guys, hi
I have a question.
I have imports of some contracts, like this:
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol
And the compiler swears that this IUniswapV2Router02 is using only =0.6.2, and I have in main contract ^0.8.17.
I understand that I need to put the compiler lower then, but then I have other imports which need ^0.8.0 at least. How can I solve it, what do you think?
May 7, 2023, 7:00 PM
You can add multiple compilers in your hardhat config file
May 7, 2023, 7:25 PM
How to do that?
May 7, 2023, 7:25 PM
https://hardhat.org/hardhat-runner/docs/advanced/multiple-solidity-versions
May 7, 2023, 7:26 PM
Thank you so much
May 7, 2023, 7:29 PM
Just copy interface content in a file and change the version.
May 7, 2023, 10:21 PM
it's because versions prior to 0.8.0 don't work with versions after 0.8.0 , I may be wrong, but yeah just remake the interfaces with same Solidity version
May 7, 2023, 10:23 PM