forked from sb-/OpenExchange
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
43 lines (40 loc) · 945 Bytes
/
config.py
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
instruments = ["ltc_btc"]
currencies = {
"ltc": {
"daemon": "http://litecoinrpc:[email protected]:7332",
"multiplier": 100000000,
"name": "Litecoin"
},
"btc": {
"daemon": "http://bitcoinrpc:[email protected]:8332",
"multiplier": 100000000,
"name": "Bitcoin"
}
}
dbfile = 'test.db'
txlogfile = 'depositor.log'
class config:
@staticmethod
def is_valid_instrument(instrument):
return instrument in instruments
@staticmethod
def get_instruments():
return instruments
@staticmethod
def is_valid_currency(currency):
return currency in currencies
@staticmethod
def getRPC(currency):
return currencies[currency]["daemon"]
@staticmethod
def get_currencies():
return currencies
@staticmethod
def get_multiplier(currency):
return currencies[currency]["multiplier"]
@staticmethod
def get_database_file():
return dbfile
@staticmethod
def get_tx_log_file():
return txlogfile