forked from GX-Coin/SmartContract
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GxCoinTokenController.sol
45 lines (34 loc) · 1.22 KB
/
GxCoinTokenController.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
pragma solidity ^0.4.2;
import './GxAuth.sol';
import './GxTradersInterface.sol';
import './GxCoinTotalsInterface.sol';
import './GxCoinTokenControllerInterface.sol';
contract GxCoinTokenController is GxAuth, GxCoinTokenControllerInterface
{
GxTradersInterface public traders;
GxCoinTotalsInterface public totals;
function setTradersContract(address _traders) public auth() {
traders = GxTradersInterface(_traders);
}
function setTotalsContract(address _totals) public auth() {
totals = GxCoinTotalsInterface(_totals);
}
function totalSupply() constant returns (uint supply) {
return uint(totals.totalCoins());
}
function balanceOf(address who) constant returns (uint amount) {
return uint(traders.coinBalance(who));
}
function allowance(address owner, address spender) constant returns (uint _allowance) {
throw;
}
function transfer(address _caller, address to, uint value) returns (bool ok) {
throw;
}
function transferFrom(address _caller, address from, address to, uint value) returns (bool ok) {
throw;
}
function approve(address _caller, address spender, uint value) returns (bool ok) {
throw;
}
}