I get the "Source file requires different compiler version (current compiler is 0.8.6+commit.11564f7e.Emscripten.clang)" at the first line:
pragma solidity ^0.7.0;
In truffle-config.js, I set a specific compiler version:
compilers: {
solc: {
version: "0.7.6", // Fetch exact version from solc-bin (default: truffle's version)
// docker: true, // Use "0.5.1" you've installed locally with docker (default: false)
// settings: { // See the solidity docs for advice about optimization and evmVersion
// optimizer: {
// enabled: false,
// runs: 200
// },
// evmVersion: "byzantium"
// }
}
},
But I still get the same error (at 0.8.6+). How do I fix this?
Thanks
truffle version
what does it show?