From 81c48872415998e53ad653aabf183e18257ec327 Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Mon, 1 Oct 2018 16:44:13 -0700 Subject: Move generated contract wrappers and artifacts into contracts package --- .../src/2.0.0/utils/SafeMath/SafeMath.sol | 87 ---------------------- 1 file changed, 87 deletions(-) delete mode 100644 packages/contracts/src/2.0.0/utils/SafeMath/SafeMath.sol (limited to 'packages/contracts/src/2.0.0/utils/SafeMath/SafeMath.sol') diff --git a/packages/contracts/src/2.0.0/utils/SafeMath/SafeMath.sol b/packages/contracts/src/2.0.0/utils/SafeMath/SafeMath.sol deleted file mode 100644 index 2855edb9d..000000000 --- a/packages/contracts/src/2.0.0/utils/SafeMath/SafeMath.sol +++ /dev/null @@ -1,87 +0,0 @@ -pragma solidity 0.4.24; - - -contract SafeMath { - - function safeMul(uint256 a, uint256 b) - internal - pure - returns (uint256) - { - if (a == 0) { - return 0; - } - uint256 c = a * b; - require( - c / a == b, - "UINT256_OVERFLOW" - ); - return c; - } - - function safeDiv(uint256 a, uint256 b) - internal - pure - returns (uint256) - { - uint256 c = a / b; - return c; - } - - function safeSub(uint256 a, uint256 b) - internal - pure - returns (uint256) - { - require( - b <= a, - "UINT256_UNDERFLOW" - ); - return a - b; - } - - function safeAdd(uint256 a, uint256 b) - internal - pure - returns (uint256) - { - uint256 c = a + b; - require( - c >= a, - "UINT256_OVERFLOW" - ); - return c; - } - - function max64(uint64 a, uint64 b) - internal - pure - returns (uint256) - { - return a >= b ? a : b; - } - - function min64(uint64 a, uint64 b) - internal - pure - returns (uint256) - { - return a < b ? a : b; - } - - function max256(uint256 a, uint256 b) - internal - pure - returns (uint256) - { - return a >= b ? a : b; - } - - function min256(uint256 a, uint256 b) - internal - pure - returns (uint256) - { - return a < b ? a : b; - } -} -- cgit v1.2.3