Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParserError: Source file requires different compiler version (current compiler is 0.8.7+commit.e28d00a7.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version --> @chainlink/contracts/src/v0.6/vendor/SafeMathChainlink.sol:2:1: | 2 | pragma solidity ^0.6.0; | ^^^^^^^^^^^^^^^^^^^^^^^ #1781

Open
Stmbisa opened this issue Nov 15, 2022 · 5 comments

Comments

@Stmbisa
Copy link

Stmbisa commented Nov 15, 2022

On the fundMe lesson, when I try to import the safemath, that's the error I am getting
I have tried to copy the same
even with the interface it can only work if I past in the source code otherwise it bounces the error

@fiatbruno
Copy link

Try using the 0.8.7 version.

pragma solidity ^0.8.7; // change 0.6.0 to 0.8.7

@itgav
Copy link

itgav commented Nov 27, 2022

To my understanding, and stated in the video, starting with Solidity 0.8.0 safemath is unneeded because it's built into Solidity. In that case, you will not need to import that module.

@Stmbisa
Copy link
Author

Stmbisa commented Nov 27, 2022 via email

@itgav
Copy link

itgav commented Nov 29, 2022

@Stmbisa paste in (or add pictures of) your .sol code and your brownie-config.yaml code. My initial thoughts are maybe your non-SafeMath import is the wrong version or your dependencies/remappings in the config file have a typo. Also, it would be helpful to see what the error is once you've removed the SafeMath import since that's not needed for Soldity v0.8.0+

@Stmbisa
Copy link
Author

Stmbisa commented Dec 9, 2022

See the problem only comes when i use IMPORT with remix, but if I copy and paste no error happens, I mean even when I copy Patrick's code and past it in remix with those imports it brings same errors, but if I switch by pasting the source code instead of importing, the error is gone. I think its a problem with remix, its good I won't be using remix all along, moved on the good thing I understood the concept.
I appreciate your help @itgav and @fiatbruno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@fiatbruno @itgav @Stmbisa and others