|
@@ -3,7 +3,7 @@ Implements EIP20 token standard: https://github.com/ethereum/EIPs/issues/20
|
|
|
.*/
|
|
|
|
|
|
|
|
|
-pragma solidity 0.4.18;
|
|
|
+pragma solidity ^0.4.18;
|
|
|
|
|
|
import "./EIP20Interface.sol";
|
|
|
|
|
@@ -37,11 +37,6 @@ contract EIP20 is EIP20Interface {
|
|
|
}
|
|
|
|
|
|
function transfer(address _to, uint256 _value) public returns (bool success) {
|
|
|
- //Default assumes totalSupply can't be over max (2^256 - 1).
|
|
|
- //If your token leaves out totalSupply and can issue more tokens as time goes on,
|
|
|
- // you need to check if it doesn't wrap.
|
|
|
- //Replace the if with this one instead.
|
|
|
- //require(balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]);
|
|
|
require(balances[msg.sender] >= _value);
|
|
|
balances[msg.sender] -= _value;
|
|
|
balances[_to] += _value;
|
|
@@ -50,9 +45,6 @@ contract EIP20 is EIP20Interface {
|
|
|
}
|
|
|
|
|
|
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
|
|
|
- //same as above. Replace this line with the following if you want to protect against wrapping uints.
|
|
|
- // solhint-disable-next-line
|
|
|
- //require(balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]);
|
|
|
uint256 allowance = allowed[_from][msg.sender];
|
|
|
require(balances[_from] >= _value && allowance >= _value);
|
|
|
balances[_to] += _value;
|