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/previous/ERC20Token | |
parent | 4c9c4c487a034d926443eeb8a0154fd38c97aca3 (diff) | |
download | dexon-sol-tools-897515c00207a11f7a45932d3c526a5eaf961635.tar dexon-sol-tools-897515c00207a11f7a45932d3c526a5eaf961635.tar.gz dexon-sol-tools-897515c00207a11f7a45932d3c526a5eaf961635.tar.bz2 dexon-sol-tools-897515c00207a11f7a45932d3c526a5eaf961635.tar.lz dexon-sol-tools-897515c00207a11f7a45932d3c526a5eaf961635.tar.xz 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/previous/ERC20Token')
-rw-r--r-- | packages/contracts/src/previous/ERC20Token/ERC20Token_v1.sol | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/packages/contracts/src/previous/ERC20Token/ERC20Token_v1.sol b/packages/contracts/src/previous/ERC20Token/ERC20Token_v1.sol deleted file mode 100644 index e05ee2d5e..000000000 --- a/packages/contracts/src/previous/ERC20Token/ERC20Token_v1.sol +++ /dev/null @@ -1,44 +0,0 @@ -pragma solidity ^0.4.11; - -import { Token_v1 as Token } from "../Token/Token_v1.sol"; - -contract ERC20Token_v1 is Token { - - function transfer(address _to, uint _value) returns (bool) { - //Default assumes totalSupply can't be over max (2^256 - 1). - if (balances[msg.sender] >= _value && balances[_to] + _value >= balances[_to]) { - balances[msg.sender] -= _value; - balances[_to] += _value; - Transfer(msg.sender, _to, _value); - return true; - } else { return false; } - } - - function transferFrom(address _from, address _to, uint _value) returns (bool) { - if (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; - } else { return false; } - } - - function balanceOf(address _owner) constant returns (uint) { - return balances[_owner]; - } - - function approve(address _spender, uint _value) returns (bool) { - allowed[msg.sender][_spender] = _value; - Approval(msg.sender, _spender, _value); - return true; - } - - function allowance(address _owner, address _spender) constant returns (uint) { - return allowed[_owner][_spender]; - } - - mapping (address => uint) balances; - mapping (address => mapping (address => uint)) allowed; - uint public totalSupply; -} |