feat: expand non-evm relay and route planning support
This commit is contained in:
19
contracts/vendor/sushiswap-v2/libraries/SafeMath.sol
vendored
Normal file
19
contracts/vendor/sushiswap-v2/libraries/SafeMath.sol
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
|
||||
pragma solidity =0.6.12;
|
||||
|
||||
// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)
|
||||
|
||||
library SafeMathUniswap {
|
||||
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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user