transfer to zero should decerease supply (burn action)

This commit is contained in:
Ricardo Guilherme Schmidt 2018-06-30 00:44:40 -03:00
parent 264f30ff2b
commit 8b092b421e
No known key found for this signature in database
GPG Key ID: 3F95A3AD0B607030
1 changed files with 3 additions and 0 deletions

View File

@ -93,6 +93,9 @@ contract StandardToken is ERC20Token {
if (balances[_from] >= _value && _value > 0) {
balances[_from] -= _value;
balances[_to] += _value;
if(_to == address(0)) {
supply -= _value;
}
emit Transfer(_from, _to, _value);
return true;
} else {