chainId implementation (commented out for now) improve events move safeTransfer in UniswapV2 tweak error messages
16 lines
456 B
Solidity
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");
|
|
}
|
|
}
|