forked from viaprotocol/tokenlists
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.py
66 lines (58 loc) · 1.36 KB
/
common.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from typing import NewType, TypedDict
CHAIN_NAMES_BY_ID = {
'1': 'ethereum',
'10': 'optimism',
'100': 'gnosis',
'10000': 'smartbch',
'-1': 'solana',
'1024': 'clover',
'11297108109': 'palm',
'122': 'fuse',
'128': 'heco',
'1284': 'moonbeam',
'1285': 'moonriver',
'1287': 'moonbase',
'1313161554': 'aurora',
'137': 'polygon',
'1666600000': 'harmony',
'1666700000': 'harmony-testnet',
'20': 'elastos',
'25': 'cronos',
'250': 'ftm',
'256': 'heco-testnet',
'288': 'boba',
'3': 'ropsten',
'321': 'kcc',
'361': 'theta',
'4': 'rinkeby',
'40': 'telos',
'4002': 'ftmtest',
'42': 'kovan',
'42161': 'arbitrum',
'42220': 'celo',
'43113': 'fuji',
'43114': 'avax',
'4689': 'iotex',
'5': 'goerli',
'56': 'bsc',
'65': 'okex-testnet',
'66': 'okex',
'70': 'hoo',
'80001': 'mumbai',
'82': 'meter',
'88': 'tomochain',
'97': 'bsc-testnet'
}
Address = NewType('Address', str)
ChainId = NewType('ChainId', str)
class Token(TypedDict):
symbol: str
name: str
address: str
decimals: str
chainId: str
logoURI: str
coingeckoId: str
NATIVE_ADDR_0xe = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
MATIC_NATIVE_ADDr = "0x0000000000000000000000000000000000001010"
NATIVE_ADDRESSES = (NATIVE_ADDR_0xe, MATIC_NATIVE_ADDr)