Skip to content

Instantly share code, notes, and snippets.

@izqui izqui/StandardToken.sol
Last active Jan 31, 2017

What would you like to do?
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() {
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
You can’t perform that action at this time.