You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
The text was updated successfully, but these errors were encountered:
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.
True I heard that too, but it's like even the first interface which is not
safe math don't work as well by importing unless one pastes the whole code
in there.
In other words importing any external interface don't work
But if you copy the code and make an external file that's not a link
It also works
That's the angel of possibility I am trying to understand
On Sun, Nov 27, 2022, 18:12 itgav ***@***.***> wrote:
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.
—
Reply to this email directly, view it on GitHub
<#1781 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3IDXOIPBROJ6N4Z2G5FX6DWKN265ANCNFSM6AAAAAASBE4PXU>
.
You are receiving this because you authored the thread.Message ID:
<smartcontractkit/full-blockchain-solidity-course-py/issues/1781/1328267057
@github.com>
@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+
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
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
The text was updated successfully, but these errors were encountered: