Replies: 1 comment
-
Hello @itgav
Does any of this help? Please let us know. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using Solidity 0.8.17, the video was using 0.6.x. So, when copying the code for the "MockV3Aggregator" I needed to change some things from version 0.6 to version 0.8. Changes:
pragma solidity >=0.6.6 <0.9.0;
--> it was "^0.6.0"import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol";
--> it was importing from "v0.6"I was still having some issues running
brownie compile
. When I would try to runbrownie compile
, it would initially download Solidity version 0.6.12. Then, it would say:"CompilerError: solc returned the following errors:
contracts/test/MockV3Aggregator.sol:6:1: ParserError: Source file requires different compiler version (current compiler is 0.6.12+commit.27d51765.Windows.msvc) - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.8.0;"
I couldn't figure out exactly why it kept trying to compile using Solidity 0.6.12. I tried changing the compiler version in Visual Studio Code but that didn't work. Ultimately, to fix the issue and allow the code to be compiled without error, I added a version specification of 0.8.17 in the
brownie-config.yaml
file. To specify version, you should already have a hierarchy built out from earlier in the video that looks something like this "compiler >> "solc" >> "remappings". Subordinated to (underneath) the "solc" section, where "remappings" is, add a new section "version" and specify the version.Beta Was this translation helpful? Give feedback.
All reactions