diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-10 02:08:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-10 02:08:28 +0800 |
commit | 4b60a3cbab3a97125499cb89d9c253deebfb7d2d (patch) | |
tree | 3cd745f49d55406e95453bf3efac6383fba5f038 /packages/contracts/src/2.0.0/tokens/UnlimitedAllowanceToken | |
parent | 9f08916cf18ad3e2686811933116122eea0890b9 (diff) | |
parent | 17956efe351e3ec0b1e9cdeee8292ebb0b4e563c (diff) | |
download | dexon-0x-contracts-4b60a3cbab3a97125499cb89d9c253deebfb7d2d.tar dexon-0x-contracts-4b60a3cbab3a97125499cb89d9c253deebfb7d2d.tar.gz dexon-0x-contracts-4b60a3cbab3a97125499cb89d9c253deebfb7d2d.tar.bz2 dexon-0x-contracts-4b60a3cbab3a97125499cb89d9c253deebfb7d2d.tar.lz dexon-0x-contracts-4b60a3cbab3a97125499cb89d9c253deebfb7d2d.tar.xz dexon-0x-contracts-4b60a3cbab3a97125499cb89d9c253deebfb7d2d.tar.zst dexon-0x-contracts-4b60a3cbab3a97125499cb89d9c253deebfb7d2d.zip |
Merge branch 'v2-prototype' into abi-gen-ignore-unchanged
Diffstat (limited to 'packages/contracts/src/2.0.0/tokens/UnlimitedAllowanceToken')
-rw-r--r-- | packages/contracts/src/2.0.0/tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/contracts/src/2.0.0/tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol b/packages/contracts/src/2.0.0/tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol index 845324e4e..9feb5c914 100644 --- a/packages/contracts/src/2.0.0/tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol +++ b/packages/contracts/src/2.0.0/tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol @@ -16,15 +16,14 @@ */ -pragma solidity ^0.4.24; -pragma experimental ABIEncoderV2; +pragma solidity 0.4.24; import "../ERC20Token/ERC20Token.sol"; contract UnlimitedAllowanceToken is ERC20Token { - uint256 constant MAX_UINT = 2**256 - 1; + uint256 constant internal MAX_UINT = 2**256 - 1; /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance. See https://github.com/ethereum/EIPs/issues/717 /// @param _from Address to transfer from. @@ -38,15 +37,15 @@ contract UnlimitedAllowanceToken is ERC20Token { uint256 allowance = allowed[_from][msg.sender]; require( balances[_from] >= _value, - INSUFFICIENT_BALANCE + "ERC20_INSUFFICIENT_BALANCE" ); require( allowance >= _value, - INSUFFICIENT_ALLOWANCE + "ERC20_INSUFFICIENT_ALLOWANCE" ); require( balances[_to] + _value >= balances[_to], - OVERFLOW + "OVERFLOW" ); balances[_to] += _value; balances[_from] -= _value; |