I am trying to import uniswap v3 contracts, which uses version 0.7.6 in my contract that uses 0.8.1. for fetching the TWAP price. am importing these two :
I am getting thes errors
Error HH606: The project cannot be compiled, see reasons below.
These files import other files that use a different and incompatible version of Solidity:
I have tried -
- Added compiler verion in hardhat config.
I have found this Hardhat FAQ
which states that
you might have a contract with pragma version ^0.7.0 that imports a contract with ^0.6.0. This can never be compiled. Pragma versions indicate which subset of the compiler versions can be used, and if two pragma versions don’t intersect (like in this example), then the files cannot be compiled. Period.
Is there anyway how i can make this work, without downgrading my custom contracts, because that is not an option right now.