-
-
Notifications
You must be signed in to change notification settings - Fork 114
/
Copy pathstats.py
47 lines (43 loc) · 1.25 KB
/
stats.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
from etherscan.enums.actions_enum import ActionsEnum as actions
from etherscan.enums.fields_enum import FieldsEnum as fields
from etherscan.enums.modules_enum import ModulesEnum as modules
class Stats:
@staticmethod
def get_total_eth_supply() -> str:
url = (
f"{fields.MODULE}"
f"{modules.STATS}"
f"{fields.ACTION}"
f"{actions.ETH_SUPPLY}"
)
return url
@staticmethod
def get_eth_last_price() -> str:
url = (
f"{fields.MODULE}"
f"{modules.STATS}"
f"{fields.ACTION}"
f"{actions.ETH_PRICE}"
)
return url
@staticmethod
def get_eth_nodes_size(
start_date: str, end_date: str, client_type: str, sync_mode: str, sort: str
) -> str:
url = (
f"{fields.MODULE}"
f"{modules.STATS}"
f"{fields.ACTION}"
f"{actions.CHAIN_SIZE}"
f"{fields.START_DATE}"
f"{start_date}"
f"{fields.END_DATE}"
f"{end_date}"
f"{fields.CLIENT_TYPE}"
f"{client_type}"
f"{fields.SYNC_MODE}"
f"{sync_mode}"
f"{fields.SORT}"
f"{sort}"
)
return url