This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
/* taking ideas from Zeppelin solidity module */ | |
contract SafeMath { | |
// it is recommended to define functions which can neither read the state of blockchain nor write in it as pure instead of constant | |
function safeAdd(uint256 x, uint256 y) internal pure returns(uint256) { | |
uint256 z = x + y; | |
assert((z >= x)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
/* taking ideas from Zeppelin solidity module */ | |
contract SafeMath { | |
// it is recommended to define functions which can neither read the state of blockchain nor write in it as pure instead of constant | |
function safeAdd(uint256 x, uint256 y) internal pure returns(uint256) { | |
uint256 z = x + y; | |
assert((z >= x)); |