-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRateCard.sol
More file actions
86 lines (69 loc) · 2.44 KB
/
Copy pathRateCard.sol
File metadata and controls
86 lines (69 loc) · 2.44 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import "std.sol";
contract RateCard is abstract, owned, mortal {
bytes32 public name;
bytes32 public domain;
mapping (uint => uint) public rates;
event RateInit(address owner, bytes32 name);
event RateAdded(uint countryCode, uint rateInWei);
event RateUpdated(uint countryCode, uint rateInWei);
function RateCard(bytes32 _name, bytes32 _domain) {
name = _name;
domain = _domain;
RateInit(msg.sender, name);
}
function addRate(uint countryCode, uint rateInWei) {
rates[countryCode] = rateInWei;
RateAdded(countryCode, rateInWei);
}
function updateRate(uint countryCode, uint rateInWei) {
rates[countryCode] = rateInWei;
RateUpdated(countryCode, rateInWei);
}
function getBalance() returns (uint bal) {
return this.balance;
}
}
contract RateCardAlpha is RateCard(0x616c706861000000000000000000000000000000000000000000000000000000, 0x7369702e676c74642e6e65740000000000000000000000000000000000000000) {
function RateCardAlpha() {
//uk
addRate(44, 6);
//usa
addRate(1, 15);
//india
addRate(91, 6);
changeOwner(0x84bfba8f12eb09a3963b62c55ad2893343e93ecc);
}
}
contract RateCardBeta is RateCard(0x6265746100000000000000000000000000000000000000000000000000000000, 0x7369702e78797a2e6e6574000000000000000000000000000000000000000000) {
function RateCardBeta() {
//uk
addRate(44, 2);
//usa
addRate(1, 3);
//india
addRate(91, 9);
changeOwner(0xd62c3ac42bd52faf8895c156eb9008513e9de5d8);
}
}
contract RateCardGltd is RateCard(0x474c544400000000000000000000000000000000000000000000000000000000, 0x7369702e676c74642e6e65740000000000000000000000000000000000000000) {
function RateCardGltd() {
//uk
addRate(44, 2);
//usa
addRate(1, 5);
//india
addRate(91, 7);
changeOwner(0x887e735ec8f358126a901b5a130b3efaf0ca18c5);
}
}
contract RateCardXyz is RateCard(0x58595a0000000000000000000000000000000000000000000000000000000000, 0x7369702e78797a2e6e6574000000000000000000000000000000000000000000) {
function RateCardXyz() {
//uk
addRate(44, 3);
//usa
addRate(1, 16);
//india
addRate(91, 4);
changeOwner(0xf7a8a273a1c0230519747ba55baf64a8df567707);
}
}