forked from nftscripts/zksync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchains.py
83 lines (73 loc) · 1.52 KB
/
chains.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
class Chain:
def __init__(self, chain_id: int, rpc: str, scan: str, token: str, code: int) -> None:
self.chain_id = chain_id
self.rpc = rpc
self.scan = scan
self.token = token
self.code = code
ETH = Chain(
chain_id=1,
rpc='http://rpc.ankr.com/eth',
scan='https://etherscan.io/tx',
token='ETH',
code=9001
)
OP = Chain(
chain_id=10,
rpc='https://rpc.ankr.com/optimism',
scan='https://optimistic.etherscan.io/tx',
token='ETH',
code=9007
)
BSC = Chain(
chain_id=56,
rpc='https://bsc-dataseed.binance.org',
scan='https://bscscan.com/tx',
token='BNB',
code=9015
)
POLYGON = Chain(
chain_id=137,
rpc='https://polygon-rpc.com',
scan='https://polygonscan.com/tx',
token='MATIC',
code=9006
)
ARB = Chain(
chain_id=42161,
rpc='https://arb1.arbitrum.io/rpc',
scan='https://arbiscan.io/tx',
token='ETH',
code=9002
)
NOVA = Chain(
chain_id=42170,
rpc='https://nova.arbitrum.io/rpc',
scan='https://nova.arbiscan.io/tx',
token='ETH',
code=9016
)
ERA = Chain(
chain_id=324,
rpc='https://mainnet.era.zksync.io',
scan='https://explorer.zksync.io/tx',
token='ETH',
code=9014
)
LITE = Chain(
chain_id=...,
rpc='https://mainnet.era.zksync.io',
scan='https://explorer.zksync.io/tx',
token='ETH',
code=9003
)
chain_mapping = {
'matic': POLYGON,
'eth': ETH,
'op': OP,
'bsc': BSC,
'arb': ARB,
'nova': NOVA,
'era': ERA,
'lite': LITE
}