Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c85aa42

Browse files
author
Kotsias, Panagiotis-Christos
committed
Added enums
1 parent 45449b2 commit c85aa42

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

etherscan/enums/actions_enum.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from dataclasses import dataclass
2+
3+
4+
@dataclass(frozen=True)
5+
class ActionsEnum:
6+
BALANCE_HISTORY: str = "balancehistory"
7+
BALANCE_MULTI: str = "balancemulti"
8+
BALANCE: str = "balance"
9+
GET_MINED_BLOCKS: str = "getminedblocks"
10+
TOKENNFTTX: str = "tokennfttx"
11+
TOKENTX: str = "tokentx"
12+
TXLIST_INTERNAL: str = "txlistinternal"
13+
TXLIST: str = "txlist"
14+

etherscan/enums/fields_enum.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from dataclasses import dataclass
2+
3+
4+
@dataclass(frozen=True)
5+
class FieldsEnum:
6+
ACTION: str = "&action="
7+
ADDRESS: str = "&address="
8+
API_KEY: str = "&apikey="
9+
BLOCK_TYPE: str = "&blocktype="
10+
BLOCKNO: str = "&blockno="
11+
BOOLEAN: str = "&boolean="
12+
CONTRACT_ADDRESS: str = "&contractaddress="
13+
DATA: str = "&data="
14+
END_BLOCK: str = "&endblock="
15+
GAS_PRICE: str = "&gasPrice="
16+
GAS: str = "&gas="
17+
HEX: str = "&hex="
18+
INDEX: str = "&index="
19+
MODULE: str = "module="
20+
OFFSET: str = "&offset="
21+
PAGE: str = "&page="
22+
POSITION: str = "&position="
23+
PREFIX: str = "https://api.etherscan.io/api?"
24+
SORT: str = "&sort="
25+
START_BLOCK: str = "&startblock="
26+
TAG: str = "&tag="
27+
TO: str = "&to="
28+
TXHASH: str = "&txhash="
29+
VALUE: str = "&value="

etherscan/enums/messages_enum.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from dataclasses import dataclass
2+
3+
4+
@dataclass(frozen=True)
5+
class MessagesEnum:
6+
METHOD_DISABLED: str = "This method is disabled for now."
7+
INVALID_ADDRESS: str = "This address is invalid."

etherscan/enums/tags_enum.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from dataclasses import dataclass
2+
3+
4+
@dataclass(frozen=True)
5+
class TagsEnum:
6+
ACCOUNT: str = "account"
7+
LATEST: str = "latest"

0 commit comments

Comments
 (0)