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

Skip to content

Commit b771819

Browse files
author
Kotsias, Panagiotis-Christos
committed
Added TokenAddress
1 parent 3cd8bfb commit b771819

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

etherscan/utils/datatypes.py

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from etherscan.enums.messages_enum import MessagesEnum as msgs
22

33
_CONTRACT_LEN = 42
4+
_TOKEN_LEN = 42
45
_TX_LEN = 66
56
_WALLET_LEN = 42
67

@@ -39,6 +40,12 @@ def __init__(self, address: str):
3940
self._address = self._check_len(self._check_0x(address))
4041

4142

43+
class TokenAddress(BaseAddress):
44+
def __init__(self, address: str):
45+
self._maxlen = _TOKEN_LEN
46+
self._address = self._check_len(self._check_0x(address))
47+
48+
4249
class TxHash(BaseAddress):
4350
def __init__(self, address: str):
4451
self._maxlen = _TX_LEN

0 commit comments

Comments
 (0)