forked from earth-faucet/faucet
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcoindata.php
More file actions
73 lines (70 loc) · 1.67 KB
/
coindata.php
File metadata and controls
73 lines (70 loc) · 1.67 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
<?php
function getCoinName($cointype)
{
switch ($cointype) {
case "BTC":
return "bitcoin";
case "LTC":
return "litecoin";
case "NMC":
return "namecoin";
case "BTCTEST":
return "bitcoin";
case "NVC":
return "novacoin";
case "PPC":
return "peercoin";
case "DOGE":
return "dogecoin";
case "EAC":
return "Earthcoin";
default:
return "Earthcoin";
}
}
function getSubunitName($cointype)
{ // plural!!!
switch ($cointype) {
case "BTC":
return "satoshis";
case "LTC":
return "microcoins"; // 1000 * 1000
case "NMC":
return "microcoins"; // 1000 * 1000
case "BTCTEST":
return "satoshis";
case "NVC":
return "millicoins"; // 1000
case "PPC":
return "microcoins"; // 1000 * 1000
case "DOGE":
return "microdoges"; // 1000 * 1000
case "EAC":
return "microcoins";
default:
return "microcoins";
}
}
function getSubunitDivider($cointype)
{
switch ($cointype) {
case "BTC":
return 100 * 1000 * 1000;
case "LTC":
return 1000 * 1000;
case "NMC":
return 1000 * 1000;
case "BTCTEST":
return 100 * 1000 * 1000;
case "NVC":
return 1000;
case "PPC":
return 1000 * 1000;
case "DOGE":
return 1000 * 1000;
case "EAC":
return 1000 * 1000;
default:
return 1000 * 1000;
}
}