-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathGxCoinToken.sol
More file actions
49 lines (37 loc) · 1.41 KB
/
GxCoinToken.sol
File metadata and controls
49 lines (37 loc) · 1.41 KB
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
pragma solidity ^0.4.2;
import './ERC20.sol';
import './GxAuth.sol';
import './GxCoinTokenControllerInterface.sol';
contract GxCoinToken is ERC20, GxAuth {
GxCoinTokenControllerInterface public controller;
function setControllerContract(GxCoinTokenControllerInterface _controller) auth()
{
controller = _controller;
}
function emitTransfer(address from, address to, uint amount) auth()
{
Transfer(from, to, amount);
}
function emitApproval(address holder, address spender, uint amount) auth()
{
Approval(holder, spender, amount);
}
function totalSupply() constant returns (uint supply) {
return controller.totalSupply();
}
function balanceOf(address who) constant returns (uint value) {
return controller.balanceOf(who);
}
function allowance(address owner, address spender) constant returns (uint _allowance) {
return controller.allowance(owner, spender);
}
function transfer(address to, uint value) returns (bool ok) {
return controller.transfer(msg.sender, to, value);
}
function transferFrom(address from, address to, uint value) returns (bool ok) {
return controller.transferFrom(msg.sender, from, to, value);
}
function approve(address spender, uint value) returns (bool ok) {
return controller.approve(msg.sender, spender, value);
}
}