Hi, I am trying to add SafeMath to a contract by importing it using
The catch is, I am trying to deploy it using
pragma solidity ^0.6.0; on remix with compiler version set at 0.6.0.
As soon as I hit compile
@openzeppelin/contracts/utils/math/SafeMath.sol:4:1: ParserError: Source file requires different compiler version (current compiler is 0.6.0+commit.26b70077.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version pragma solidity ^0.8.0; ^---------------------^
I tried the same by changing the compiler version to 0.8.0 for remix but now I get the same
error as above for 0.8.0 this time.
Q1) How do I go about using SafeMath for files that are working on versions < 0.8.x
Q2) What's the point of using SafeMath at ^0.8.x when the language now implements SafeMath without having the need to import it explicitly(from 0.8.x onwards).