diff --git a/ERC20Interface.sol b/ERC20Interface.sol new file mode 100644 index 0000000..79c0857 --- /dev/null +++ b/ERC20Interface.sol @@ -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); +} \ No newline at end of file