Hi, I'm having a problem in hardhat not letting me compile a contract I made by importing VRFConsumerBase from ChainLink ^0.8.0 and the OpenZeppelin ownable contract >=0.6.0 <0.8.0.
I have added these two compilers to the hardhat configuration file:
solidity: {
compilers: [
{
version: "0.7.9"
},
{
version: "0.8.7",
settings: {},
}
],
},
and I get this error:
These files import other files that use a different and incompatible version of Solidity:
any suggestions?
Nov 30, 2021, 1:32 PM
Using the compatible version of solidity
Nov 30, 2021, 1:37 PM
did you read what I wrote? the compiler versions are not the problem, the problem is that hardhat imports another version inside another one...
in remix i have no problem, but i want to do tests in hardhat.
in remix i have no problem, but i want to do tests in hardhat.
Nov 30, 2021, 1:43 PM
Tried apt get update?
Nov 30, 2021, 1:44 PM
why you on't use the updated version of OZ?
Nov 30, 2021, 1:45 PM
apt get? are you drunk this early?
I'll try that, I'm using the version that NPM installed for me. I don't know what the latest version is, but I'll check it out.
Nov 30, 2021, 1:46 PM
^0.8.0
solidity: {
version: "0.8.6",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
version: "0.8.6",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
try like this
Nov 30, 2021, 1:47 PM
it works!, thanks bro
Nov 30, 2021, 1:55 PM
yw
Nov 30, 2021, 1:55 PM