Skip to content

Commit

Permalink
Add ERC20 interface
Browse files Browse the repository at this point in the history
  • Loading branch information
xilibi2003 committed Feb 9, 2018
1 parent 1b089f0 commit d6a72b8
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ERC20Interface.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
contract ERC20Interface {

string public constant name = "Token Name";
string public constant symbol = "SYM";
uint8 public constant decimals = 18; // 18 is the most common number of decimal places
// 0.0000000000000000001 个代币

function totalSupply() public constant returns (uint);

function balanceOf(address tokenOwner) public constant returns (uint balance);

function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function approve(address spender, uint tokens) public returns (bool success);

function transfer(address to, 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);
}

0 comments on commit d6a72b8

Please sign in to comment.