diff --git a/contracts/libraries/KindMath.sol b/contracts/libraries/KindMath.sol deleted file mode 100644 index e9de30c65..000000000 --- a/contracts/libraries/KindMath.sol +++ /dev/null @@ -1,48 +0,0 @@ -pragma solidity ^0.5.0; - -/** - * @title KindMath - * @notice ref. https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol - * @dev Math operations with safety checks that returns boolean - */ -library KindMath { - - /** - * @dev Multiplies two numbers, return false on overflow. - */ - function checkMul(uint256 a, uint256 b) internal pure returns (bool) { - // Gas optimization: this is cheaper than requireing 'a' not being zero, but the - // benefit is lost if 'b' is also tested. - // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 - if (a == 0) { - return true; - } - - uint256 c = a * b; - if (c / a == b) - return true; - else - return false; - } - - /** - * @dev Subtracts two numbers, return false on overflow (i.e. if subtrahend is greater than minuend). - */ - function checkSub(uint256 a, uint256 b) internal pure returns (bool) { - if (b <= a) - return true; - else - return false; - } - - /** - * @dev Adds two numbers, return false on overflow. - */ - function checkAdd(uint256 a, uint256 b) internal pure returns (bool) { - uint256 c = a + b; - if (c < a) - return false; - else - return true; - } -} diff --git a/contracts/libraries/TokenLib.sol b/contracts/libraries/TokenLib.sol index 0c443fb73..ebfd71bf2 100644 --- a/contracts/libraries/TokenLib.sol +++ b/contracts/libraries/TokenLib.sol @@ -8,7 +8,6 @@ import "../tokens/SecurityTokenStorage.sol"; import "../interfaces/ITransferManager.sol"; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "../modules/PermissionManager/IPermissionManager.sol"; -import "./KindMath.sol"; library TokenLib {