diff options
Diffstat (limited to 'packages/contracts/src/2.0.0/utils/SafeMath')
-rw-r--r-- | packages/contracts/src/2.0.0/utils/SafeMath/SafeMath.sol | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/packages/contracts/src/2.0.0/utils/SafeMath/SafeMath.sol b/packages/contracts/src/2.0.0/utils/SafeMath/SafeMath.sol index 8cbb8e526..4413244db 100644 --- a/packages/contracts/src/2.0.0/utils/SafeMath/SafeMath.sol +++ b/packages/contracts/src/2.0.0/utils/SafeMath/SafeMath.sol @@ -1,28 +1,27 @@ pragma solidity 0.4.24; -pragma experimental ABIEncoderV2; contract SafeMath { - function safeMul(uint a, uint b) + function safeMul(uint256 a, uint256 b) internal pure returns (uint256) { - uint c = a * b; + uint256 c = a * b; assert(a == 0 || c / a == b); return c; } - function safeDiv(uint a, uint b) + function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) { - uint c = a / b; + uint256 c = a / b; return c; } - function safeSub(uint a, uint b) + function safeSub(uint256 a, uint256 b) internal pure returns (uint256) @@ -31,12 +30,12 @@ contract SafeMath { return a - b; } - function safeAdd(uint a, uint b) + function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) { - uint c = a + b; + uint256 c = a + b; assert(c >= a); return c; } |