Files
uniswap-v2/contracts/libraries/SafeMath.sol
Noah Zinsmeister 4e4546d0a9 bump solc to 0.5.14
chainId implementation (commented out for now)

improve events

move safeTransfer in UniswapV2

tweak error messages
2019-12-12 14:52:15 -05:00

16 lines
456 B
Solidity

pragma solidity 0.5.14;
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");
}
}