-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathToken.sol
37 lines (30 loc) · 1.08 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
pragma solidity ^0.4.0;
contract Token {
string internal _symbol;
string internal _name;
uint8 internal _decimals;
uint internal _totalSupply = 1000;
mapping (address => uint) internal _balanceOf;
mapping (address => mapping (address => uint)) internal _allowances;
constructor(string symbol, string name, uint8 decimals, uint totalSupply) public {
_symbol = symbol;
_name = name;
_decimals = decimals;
_totalSupply = totalSupply;
}
function name() public constant returns (string) {
return _name;
}
function symbol() public constant returns (string) {
return _symbol;
}
function decimals() public constant returns (uint8) {
return _decimals;
}
function totalSupply() public constant returns (uint) {
return _totalSupply;
}
function balanceOf(address _addr) public constant returns (uint);
function transfer(address _to, uint _value) public returns (bool);
event Transfer(address indexed _from, address indexed _to, uint _value);
}