Last active
January 31, 2017 22:03
-
-
Save izqui/fc99ee4f7d40a503a23a13a244cefc24 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import './ERC20Lib.sol'; | |
contract StandardToken { | |
using ERC20Lib for ERC20Lib.TokenStorage; | |
ERC20Lib.TokenStorage token; | |
string public name = "SimpleToken"; | |
string public symbol = "SIM"; | |
uint public decimals = 18; | |
uint public INITIAL_SUPPLY = 10000; | |
function StandardToken() { | |
token.init(INITIAL_SUPPLY); | |
} | |
function totalSupply() constant returns (uint) { | |
return token.totalSupply; | |
} | |
function balanceOf(address who) constant returns (uint) { | |
return token.balanceOf(who); | |
} | |
function allowance(address owner, address spender) constant returns (uint) { | |
return token.allowance(owner, spender); | |
} | |
function transfer(address to, uint value) returns (bool ok) { | |
return token.transfer(to, value); | |
} | |
function transferFrom(address from, address to, uint value) returns (bool ok) { | |
return token.transferFrom(from, to, value); | |
} | |
function approve(address spender, uint value) returns (bool ok) { | |
return token.approve(spender, value); | |
} | |
event Transfer(address indexed from, address indexed to, uint value); | |
event Approval(address indexed owner, address indexed spender, uint value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment