-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathToken.sol
52 lines (42 loc) · 1.18 KB
/
Token.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
pragma solidity ^0.4.0;
contract Token {
string internal _symbol;
string internal _name;
uint8 internal _decimals;
uint internal _totalSupply;
mapping (address => uint) internal _balanceOf;
mapping (address => mapping (address => uint)) internal _allowances;
function Token(string symbol, string name, uint8 decimals, uint totalSupply) public {
_symbol = symbol;
_name = name;
_decimals = decimals;
_totalSupply = totalSupply;
}
function name()
public
view
returns (string) {
return _name;
}
function symbol()
public
view
returns (string) {
return _symbol;
}
function decimals()
public
view
returns (uint8) {
return _decimals;
}
function totalSupply()
public
view
returns (uint) {
return _totalSupply;
}
function balanceOf(address _addr) public view returns (uint);
function transfer(address _to, uint _value) public returns (bool);
event Transfer(address indexed _from, address indexed _to, uint _value);
}