OpenZeppelin – Finding SafeMath Pragma Solidity ^0.6.6 in OpenZeppelin Contracts

importopenzeppelinopenzeppelin-contractssafemath

While trying to use SafeMath to compute the modulo of a uint256 like shown in this video:https://www.youtube.com/watch?v=JqZWariqh5s (without SafeMath) I'm having some trouble finding a pragma solidity 0.6.6 version of the SafeMath contract.

If I simply use the @openzeppelin command it defaults to pragma solidity 0.8.0 which is incompatible with the remainder of my code. Hence, I was wondering: where I can find a working SafeMath.sol file using pragma solidity 0.6.6?

Best Answer

You can get that on openzepplins github. Just navigate to Github then Openzeeplin-contracts. Go to the branches and check a lower branch.

import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.3/contracts/math/SafeMath.sol';
Related Topic