Skip to content

Instantly share code, notes, and snippets.

@stupeters187
Last active January 24, 2019 19:48
Show Gist options
  • Save stupeters187/6093d4136b38b2f985c81ad6ce5b1fac to your computer and use it in GitHub Desktop.
Save stupeters187/6093d4136b38b2f985c81ad6ce5b1fac to your computer and use it in GitHub Desktop.
ERC20 Token Example
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
// ----------------------------------------------------------------------------
contract ERC20Interface {
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment