Files
uniswap-v2/contracts/libraries/SafeMath.sol
Noah Zinsmeister b972227df8 update to solc@0.5.16
update waffle version and fix deprecations

move CI from circle to github actions
2020-01-22 11:47:24 -05:00

16 lines
457 B
Solidity

pragma solidity =0.5.16;
library SafeMath {
function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x, "ds-math-add-overflow");
}
function sub(uint x, uint y) internal pure returns (uint z) {
require((z = x - y) <= x, "ds-math-sub-underflow");
}
function mul(uint x, uint y) internal pure returns (uint z) {
require(y == 0 || (z = x * y) / y == x, "ds-math-mul-overflow");
}
}