diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-02-06 05:02:48 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-02-07 09:26:12 +0800 |
commit | 897515c00207a11f7a45932d3c526a5eaf961635 (patch) | |
tree | 9282ffabd4242c73af49154fa963ebc3378bd935 /packages/contracts/src/current/tokens/ERC20Token | |
parent | 4c9c4c487a034d926443eeb8a0154fd38c97aca3 (diff) | |
download | dexon-sol-tools-897515c00207a11f7a45932d3c526a5eaf961635.tar.gz dexon-sol-tools-897515c00207a11f7a45932d3c526a5eaf961635.tar.zst dexon-sol-tools-897515c00207a11f7a45932d3c526a5eaf961635.zip |
Add CLI option for networkId, add abi-gen to contracts package
Diffstat (limited to 'packages/contracts/src/current/tokens/ERC20Token')
-rw-r--r-- | packages/contracts/src/current/tokens/ERC20Token/ERC20Token.sol | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/packages/contracts/src/current/tokens/ERC20Token/ERC20Token.sol b/packages/contracts/src/current/tokens/ERC20Token/ERC20Token.sol deleted file mode 100644 index 0e5b87aa4..000000000 --- a/packages/contracts/src/current/tokens/ERC20Token/ERC20Token.sol +++ /dev/null @@ -1,58 +0,0 @@ -pragma solidity ^0.4.18; - -import { Token } from "../Token/Token.sol"; - -contract ERC20Token is Token { - - function transfer(address _to, uint _value) - public - returns (bool) - { - require(balances[msg.sender] >= _value && balances[_to] + _value >= balances[_to]); - balances[msg.sender] -= _value; - balances[_to] += _value; - Transfer(msg.sender, _to, _value); - return true; - } - - function transferFrom(address _from, address _to, uint _value) - public - returns (bool) - { - require(balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value >= balances[_to]); - balances[_to] += _value; - balances[_from] -= _value; - allowed[_from][msg.sender] -= _value; - Transfer(_from, _to, _value); - return true; - } - - function approve(address _spender, uint _value) - public - returns (bool) - { - allowed[msg.sender][_spender] = _value; - Approval(msg.sender, _spender, _value); - return true; - } - - function balanceOf(address _owner) - public - view - returns (uint) - { - return balances[_owner]; - } - - function allowance(address _owner, address _spender) - public - view - returns (uint) - { - return allowed[_owner][_spender]; - } - - mapping (address => uint) balances; - mapping (address => mapping (address => uint)) allowed; - uint public totalSupply; -} |