diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-07-27 07:30:07 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-08-17 08:31:21 +0800 |
commit | bb3c34589130c6453f4a7ec5a96c75f729b24a67 (patch) | |
tree | 72da54e3a4e344c8125c9a9944b81c4d29aa8485 /packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol | |
parent | 0f3201d72a181c3dc7bafba9a82c141f91463ce9 (diff) | |
download | dexon-sol-tools-bb3c34589130c6453f4a7ec5a96c75f729b24a67.tar dexon-sol-tools-bb3c34589130c6453f4a7ec5a96c75f729b24a67.tar.gz dexon-sol-tools-bb3c34589130c6453f4a7ec5a96c75f729b24a67.tar.bz2 dexon-sol-tools-bb3c34589130c6453f4a7ec5a96c75f729b24a67.tar.lz dexon-sol-tools-bb3c34589130c6453f4a7ec5a96c75f729b24a67.tar.xz dexon-sol-tools-bb3c34589130c6453f4a7ec5a96c75f729b24a67.tar.zst dexon-sol-tools-bb3c34589130c6453f4a7ec5a96c75f729b24a67.zip |
Update ERC20Token
Diffstat (limited to 'packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol')
-rw-r--r-- | packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol b/packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol index 9272b18a8..20f36db31 100644 --- a/packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol +++ b/packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol @@ -41,7 +41,7 @@ contract DummyERC20Token is name = _name; symbol = _symbol; decimals = _decimals; - totalSupply = _totalSupply; + _totalSupply = _totalSupply; balances[msg.sender] = _totalSupply; } @@ -49,11 +49,11 @@ contract DummyERC20Token is public onlyOwner { - uint256 currBalance = balanceOf(_target); + uint256 currBalance = balances[_target]; if (_value < currBalance) { - totalSupply = safeSub(totalSupply, safeSub(currBalance, _value)); + _totalSupply = safeSub(_totalSupply, safeSub(currBalance, _value)); } else { - totalSupply = safeAdd(totalSupply, safeSub(_value, currBalance)); + _totalSupply = safeAdd(_totalSupply, safeSub(_value, currBalance)); } balances[_target] = _value; } |