-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b089f0
commit d6a72b8
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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); | ||
} |