-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.py
50 lines (39 loc) · 1.01 KB
/
constants.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
44
45
46
47
48
49
50
PNT_CONTRACT_ADDRESS = '0x89ab32156e46f46d02ade3fecbe5fc4243b9aaed'
AVERAGE_ETHEREUM_CTIME = 13
EMPTY_STR = ''
NEW_LINE = '\n'
HEADER = {'Content-type': 'application/json'}
DATA_LENGTH = 66
class Config:
def __init__(self):
self._url = 'https://aged-wispy-sun.quiknode.pro/a9c866c62d28d63303de21fd44e95f747f725857/'
self._valid_caching_time = 30
self._port = 3000
def set_port(self, p):
try:
self._port = p
return 1
except:
return 0
raise
def get_port(self):
return self._port
def set_caching_time(self, t):
try:
self._valid_caching_time = t
return 1
except:
return 0
raise
def get_caching_time(self):
return self._valid_caching_time
def set_url(self, u):
try:
self._url = u
return 1
except:
return 0
raise
def get_url(self):
return self._url
cfg = Config()