@reality.eth/contracts 3.0.2 → 3.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +9 -3
  2. package/chains/chainid.network.json +7691 -1349
  3. package/chains/chainid.network.local.json +25 -0
  4. package/chains/deployments/1/ETH/RealityETH-3.0.json +2 -1
  5. package/chains/deployments/1/SWISE/RealityETH_ERC20-3.0.json +7 -0
  6. package/chains/deployments/10/OETH/RealityETH-3.0.json +6 -0
  7. package/chains/deployments/100/GNO/RealityETH_ERC20-3.0.json +7 -0
  8. package/chains/deployments/100/SWISE/RealityETH_ERC20-3.0.json +7 -0
  9. package/chains/deployments/100/XDAI/RealityETH-3.0.json +3 -1
  10. package/chains/deployments/1337702/ETH/RealityETH-3.0.json +6 -0
  11. package/chains/deployments/280/WETH/RealityETH_ERC20-3.0.json +8 -0
  12. package/chains/deployments/4/ETH/RealityETH-3.0.json +3 -1
  13. package/chains/deployments/42/ETH/RealityETH-3.0.json +2 -1
  14. package/chains/deployments/56/DEXE/RealityETH_ERC20-3.0.json +7 -0
  15. package/chains/deployments/69/OETH/RealityETH-3.0.json +6 -0
  16. package/chains/deployments/77/XDAI/RealityETH-2.1-rc1.json +1 -3
  17. package/chains/deployments/777/CTH/RealityETH-3.0.json +6 -0
  18. package/chains/supported.json +29 -3
  19. package/development/contracts/Arbitrator.sol +7 -6
  20. package/development/contracts/BalanceHolder.sol +4 -2
  21. package/development/contracts/{BalanceHolderERC20.sol → BalanceHolder_ERC20.sol} +3 -2
  22. package/development/contracts/IArbitrator.sol +4 -7
  23. package/development/contracts/IArbitratorForeignProxy.sol +12 -0
  24. package/development/contracts/IBalanceHolder.sol +3 -1
  25. package/development/contracts/IBalanceHolder_ERC20.sol +11 -0
  26. package/development/contracts/IERC20.sol +1 -1
  27. package/development/contracts/IOwned.sol +1 -1
  28. package/development/contracts/IRealityETH.sol +63 -0
  29. package/development/contracts/IRealityETH_ERC20.sol +67 -0
  30. package/development/contracts/Owned.sol +4 -2
  31. package/development/contracts/RealityETH-3.0.sol +4 -82
  32. package/development/contracts/RealityETH_ERC20-3.0.sol +3 -3
  33. package/generated/chains.json +114 -22
  34. package/generated/contracts.json +98 -7
  35. package/generated/tokens.json +41 -2
  36. package/index.js +7 -2
  37. package/non_standard_deployments/zksync2/README +21 -0
  38. package/{development/contracts/Realitio_v2_1.sol → non_standard_deployments/zksync2/contracts/RealityETH_ERC20-3.0.sol} +324 -47
  39. package/non_standard_deployments/zksync2/deploy/deploy.ts +53 -0
  40. package/non_standard_deployments/zksync2/hardhat.config.ts +30 -0
  41. package/non_standard_deployments/zksync2/package.json +15 -0
  42. package/non_standard_deployments/zksync2/yarn.lock +2907 -0
  43. package/package.json +3 -3
  44. package/scripts/deploy.js +14 -3
  45. package/scripts/fetch_and_reformat_chains_json.js +31 -0
  46. package/scripts/{format_abi.js → format_json.js} +0 -0
  47. package/scripts/generate_chains_json.js +3 -0
  48. package/tokens/CTH.json +7 -0
  49. package/tokens/DEXE.json +7 -0
  50. package/tokens/ETH.json +2 -1
  51. package/tokens/GNO.json +1 -0
  52. package/tokens/OETH.json +8 -0
  53. package/tokens/SWISE.json +8 -0
  54. package/tokens/WETH.json +7 -0
  55. package/development/contracts/IRealitio.sol +0 -44
  56. package/development/contracts/MultiSigWallet.sol +0 -391
  57. package/development/contracts/Realitio.sol +0 -756
  58. package/development/contracts/RealitioERC20.sol +0 -825
  59. package/development/contracts/RealitioSafeMath256.sol +0 -36
  60. package/development/contracts/RealitioSafeMath32.sol +0 -17
  61. package/development/contracts/SplitterWallet.sol +0 -142
  62. package/tests/python/test_wallet.py +0 -185
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "3": {
22
22
  "chainId": "0x3",
23
- "chainName": "Ethereum Testnet Ropsten",
23
+ "chainName": "Ropsten",
24
24
  "nativeCurrency": {
25
25
  "name": "Ropsten Ether",
26
26
  "symbol": "ROP",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "4": {
38
38
  "chainId": "0x4",
39
- "chainName": "Ethereum Testnet Rinkeby",
39
+ "chainName": "Rinkeby",
40
40
  "nativeCurrency": {
41
41
  "name": "Rinkeby Ether",
42
42
  "symbol": "RIN",
@@ -52,31 +52,48 @@
52
52
  },
53
53
  "8": {
54
54
  "chainId": "0x8",
55
- "chainName": "Ubiq Network Mainnet",
55
+ "chainName": "Ubiq",
56
56
  "nativeCurrency": {
57
57
  "name": "Ubiq Ether",
58
58
  "symbol": "UBQ",
59
59
  "decimals": 18
60
60
  },
61
- "network_name": "mainnet",
62
61
  "rpcUrls": [
63
62
  "https://rpc.octano.dev",
64
63
  "https://pyrus2.ubiqscan.io"
65
64
  ],
66
65
  "hostedRPC": "https://rpc.octano.dev",
67
66
  "blockExplorerUrls": [
67
+ "https://ubiqscan.io",
68
68
  "https://ubqblockexplorer.com/"
69
69
  ]
70
70
  },
71
+ "10": {
72
+ "chainId": "0xa",
73
+ "chainName": "Optimism",
74
+ "nativeCurrency": {
75
+ "name": "Ether",
76
+ "symbol": "ETH",
77
+ "decimals": 18
78
+ },
79
+ "rpcUrls": [
80
+ "https://mainnet.optimism.io/"
81
+ ],
82
+ "hostedRPC": "https://mainnet.optimism.io",
83
+ "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-optimism",
84
+ "blockExplorerUrls": [
85
+ "https://optimistic.etherscan.io"
86
+ ]
87
+ },
71
88
  "42": {
72
89
  "chainId": "0x2a",
73
- "chainName": "Ethereum Testnet Kovan",
90
+ "chainName": "Kovan",
74
91
  "nativeCurrency": {
75
92
  "name": "Kovan Ether",
76
93
  "symbol": "KOV",
77
94
  "decimals": 18
78
95
  },
79
- "network_name": "kovan",
96
+ "network_name": "testnet",
80
97
  "rpcUrls": [
81
98
  "https://kovan.poa.network",
82
99
  "http://kovan.poa.network:8545",
@@ -119,12 +136,29 @@
119
136
  "https://www.bscscan.com"
120
137
  ]
121
138
  },
139
+ "69": {
140
+ "chainId": "0x45",
141
+ "chainName": "Optimism Kovan",
142
+ "nativeCurrency": {
143
+ "name": "Kovan Ether",
144
+ "symbol": "KOR",
145
+ "decimals": 18
146
+ },
147
+ "network_name": "kovan",
148
+ "rpcUrls": [
149
+ "https://kovan.optimism.io/"
150
+ ],
151
+ "hostedRPC": "https://kovan.optimism.io",
152
+ "blockExplorerUrls": [
153
+ "https://kovan-optimistic.etherscan.io"
154
+ ]
155
+ },
122
156
  "77": {
123
157
  "chainId": "0x4d",
124
158
  "chainName": "POA Network Sokol",
125
159
  "nativeCurrency": {
126
160
  "name": "POA Sokol Ether",
127
- "symbol": "POA",
161
+ "symbol": "SPOA",
128
162
  "decimals": 18
129
163
  },
130
164
  "network_name": "poa-sokol",
@@ -141,7 +175,7 @@
141
175
  },
142
176
  "100": {
143
177
  "chainId": "0x64",
144
- "chainName": "xDAI Chain",
178
+ "chainName": "Gnosis",
145
179
  "nativeCurrency": {
146
180
  "name": "xDAI",
147
181
  "symbol": "xDAI",
@@ -149,45 +183,85 @@
149
183
  },
150
184
  "network_name": "xdai",
151
185
  "rpcUrls": [
152
- "https://rpc.xdaichain.com",
186
+ "https://rpc.gnosischain.com",
153
187
  "https://xdai.poanetwork.dev",
154
- "wss://rpc.xdaichain.com/wss",
155
- "wss://xdai.poanetwork.dev/wss",
156
- "http://xdai.poanetwork.dev",
157
188
  "https://dai.poa.network",
189
+ "https://rpc.ankr.com/gnosis",
190
+ "https://gnosischain-rpc.gateway.pokt.network",
191
+ "wss://rpc.gnosischain.com/wss",
192
+ "wss://xdai.poanetwork.dev/wss",
158
193
  "ws://xdai.poanetwork.dev:8546"
159
194
  ],
160
- "hostedRPC": "https://rpc.xdaichain.com",
195
+ "hostedRPC": "https://rpc.gnosischain.com",
161
196
  "iconUrls": [
162
197
  "https://gblobscdn.gitbook.com/spaces%2F-Lpi9AHj62wscNlQjI-l%2Favatar.png"
163
198
  ],
164
199
  "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-xdai",
165
200
  "blockExplorerUrls": [
201
+ "https://blockscout.com/xdai/mainnet",
166
202
  "https://blockscout.com/poa/xdai/"
167
203
  ]
168
204
  },
169
205
  "137": {
170
206
  "chainId": "0x89",
171
- "chainName": "Matic(Polygon) Mainnet",
207
+ "chainName": "Polygon Mainnet",
172
208
  "nativeCurrency": {
173
- "name": "Matic",
209
+ "name": "MATIC",
174
210
  "symbol": "MATIC",
175
211
  "decimals": 18
176
212
  },
177
213
  "network_name": "matic",
178
214
  "rpcUrls": [
215
+ "https://polygon-rpc.com/",
179
216
  "https://rpc-mainnet.matic.network",
180
- "wss://ws-mainnet.matic.network",
217
+ "https://matic-mainnet.chainstacklabs.com",
218
+ "https://rpc-mainnet.maticvigil.com",
181
219
  "https://rpc-mainnet.matic.quiknode.pro",
182
- "https://matic-mainnet.chainstacklabs.com"
220
+ "https://matic-mainnet-full-rpc.bwarelabs.com"
183
221
  ],
184
- "hostedRPC": "https://rpc-mainnet.matic.network",
222
+ "hostedRPC": "https://polygon-rpc.com/",
185
223
  "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-polygon",
186
224
  "blockExplorerUrls": [
187
225
  "https://polygonscan.com",
188
226
  "https://polygonscan.com/"
189
227
  ]
190
228
  },
229
+ "280": {
230
+ "chainId": "0x118",
231
+ "chainName": "ZKSync Goerli Alpha",
232
+ "nativeCurrency": {
233
+ "name": "Ether",
234
+ "symbol": "WETH",
235
+ "decimals": 18
236
+ },
237
+ "network_name": "zkSync2-testnet",
238
+ "rpcUrls": [
239
+ "https://zksync2-testnet.zksync.dev"
240
+ ],
241
+ "hostedRPC": "https://zksync2-testnet.zksync.dev",
242
+ "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-zksync-goerli",
243
+ "blockExplorerUrls": [
244
+ "https://zksync2-testnet.zkscan.io/",
245
+ "https://zksync2-testnet.zkscan.io"
246
+ ]
247
+ },
248
+ "777": {
249
+ "chainId": "0x309",
250
+ "chainName": "cheapETH",
251
+ "nativeCurrency": {
252
+ "name": "cTH",
253
+ "symbol": "cTH",
254
+ "decimals": 18
255
+ },
256
+ "network_name": "cheapeth",
257
+ "rpcUrls": [
258
+ "https://node.cheapeth.org/rpc"
259
+ ],
260
+ "hostedRPC": "https://node.cheapeth.org/rpc",
261
+ "blockExplorerUrls": [
262
+ "https://explore.cheapswap.io/"
263
+ ]
264
+ },
191
265
  "42161": {
192
266
  "chainId": "0xa4b1",
193
267
  "chainName": "Arbitrum One",
@@ -208,7 +282,7 @@
208
282
  },
209
283
  "43114": {
210
284
  "chainId": "0xa86a",
211
- "chainName": "Avalanche Mainnet",
285
+ "chainName": "Avalanche C-Chain",
212
286
  "nativeCurrency": {
213
287
  "name": "Avalanche",
214
288
  "symbol": "AVAX",
@@ -221,12 +295,13 @@
221
295
  "hostedRPC": "https://api.avax.network/ext/bc/C/rpc",
222
296
  "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-ava",
223
297
  "blockExplorerUrls": [
298
+ "https://snowtrace.io",
224
299
  "https://cchain.explorer.avax.network/"
225
300
  ]
226
301
  },
227
302
  "421611": {
228
303
  "chainId": "0x66eeb",
229
- "chainName": "Arbitrum Testnet Rinkeby",
304
+ "chainName": "Arbitrum Rinkeby",
230
305
  "nativeCurrency": {
231
306
  "name": "Arbitrum Rinkeby Ether",
232
307
  "symbol": "ARETH",
@@ -234,12 +309,29 @@
234
309
  },
235
310
  "network_name": "arbitrum-rinkeby",
236
311
  "rpcUrls": [
237
- "https://rinkeby.arbitrum.io/rpc",
238
- "wss://rinkeby.arbitrum.io/ws"
312
+ "https://rinkeby.arbitrum.io/rpc"
239
313
  ],
240
314
  "hostedRPC": "https://rinkeby.arbitrum.io/rpc",
241
315
  "blockExplorerUrls": [
316
+ "https://testnet.arbiscan.io",
242
317
  "https://rinkeby-explorer.arbitrum.io"
243
318
  ]
319
+ },
320
+ "1337702": {
321
+ "chainId": "0x146966",
322
+ "chainName": "Kintsugi",
323
+ "nativeCurrency": {
324
+ "name": "kintsugi Ethere",
325
+ "symbol": "kiETH",
326
+ "decimals": 18
327
+ },
328
+ "network_name": "kintsugi",
329
+ "rpcUrls": [
330
+ "https://rpc.kintsugi.themerge.dev"
331
+ ],
332
+ "hostedRPC": "https://rpc.kintsugi.themerge.dev",
333
+ "blockExplorerUrls": [
334
+ "https://explorer.kintsugi.themerge.dev"
335
+ ]
244
336
  }
245
337
  }
@@ -17,7 +17,8 @@
17
17
  "block": 13194676,
18
18
  "notes": null,
19
19
  "arbitrators": {
20
- "0xf72cfd1b34a91a64f9a98537fe63fbab7530adca": "Kleros Arbitrator (DAO Governance)"
20
+ "0x728cba71a3723caab33ea416cb46e2cc9215a596": "Kleros (General Court)",
21
+ "0xf72cfd1b34a91a64f9a98537fe63fbab7530adca": "Kleros DAO Governance (Technical Court)"
21
22
  }
22
23
  }
23
24
  },
@@ -48,6 +49,15 @@
48
49
  "arbitrators": {}
49
50
  }
50
51
  },
52
+ "SWISE": {
53
+ "RealityETH_ERC20-3.0": {
54
+ "address": "0x867092A32bC16816F12Fb326EfF7A2865E1ec138",
55
+ "block": 14485577,
56
+ "token_address": "0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2",
57
+ "notes": null,
58
+ "arbitrators": {}
59
+ }
60
+ },
51
61
  "TRST": {
52
62
  "RealityETH_ERC20-2.0": {
53
63
  "address": "0x3D3B51b1091d1F6491AeB1916C94BAfe57f6Cc9d",
@@ -100,7 +110,9 @@
100
110
  "address": "0xDf33060F476F8cff7511F806C72719394da1Ad64",
101
111
  "block": 9106451,
102
112
  "notes": null,
103
- "arbitrators": {}
113
+ "arbitrators": {
114
+ "0xe27768bdb76a9b742b7ddcfe1539fadaf3b89bc7": "Kleros (General Court)"
115
+ }
104
116
  }
105
117
  },
106
118
  "TRST": {
@@ -143,6 +155,16 @@
143
155
  }
144
156
  }
145
157
  },
158
+ "10": {
159
+ "OETH": {
160
+ "RealityETH-3.0": {
161
+ "address": "0x0eF940F7f053a2eF5D6578841072488aF0c7d89A",
162
+ "block": 2462149,
163
+ "notes": null,
164
+ "arbitrators": {}
165
+ }
166
+ }
167
+ },
146
168
  "42": {
147
169
  "ETH": {
148
170
  "RealityETH-2.0": {
@@ -160,7 +182,8 @@
160
182
  "block": 27103177,
161
183
  "notes": null,
162
184
  "arbitrators": {
163
- "0xb9fdd2904cbcc5543F02DB948B2CE59Ef10A950E": "Kleros Arbitrator (DAO Governance)"
185
+ "0x99489d7bb33539f3d1a401741e56e8f02b9ae0cf": "Kleros (General Court)",
186
+ "0xb9fdd2904cbcc5543F02DB948B2CE59Ef10A950E": "Kleros DAO Governance (Technical Court)"
164
187
  }
165
188
  }
166
189
  },
@@ -210,6 +233,25 @@
210
233
  "notes": null,
211
234
  "arbitrators": {}
212
235
  }
236
+ },
237
+ "DEXE": {
238
+ "RealityETH_ERC20-3.0": {
239
+ "address": "0x95f8fc16C7Bd5a5b24CaE629471c6cCC3916826A",
240
+ "block": 13749748,
241
+ "token_address": "0x039cb485212f996a9dbb85a9a75d898f94d38da6",
242
+ "notes": null,
243
+ "arbitrators": {}
244
+ }
245
+ }
246
+ },
247
+ "69": {
248
+ "OETH": {
249
+ "RealityETH-3.0": {
250
+ "address": "0x327543eaf65FE0D68333d4D092282cDBA0Bc37a6",
251
+ "block": 28282,
252
+ "notes": null,
253
+ "arbitrators": {}
254
+ }
213
255
  }
214
256
  },
215
257
  "77": {
@@ -219,9 +261,7 @@
219
261
  "block": 17307142,
220
262
  "token_address": null,
221
263
  "notes": "Same as 2.1 except missing an empty address check",
222
- "arbitrators": {
223
- "0x37Fcdb26F12f3FC76F2424EC6B94D434a959A0f7": "Kleros (testing)"
224
- }
264
+ "arbitrators": {}
225
265
  },
226
266
  "RealityETH-2.1": {
227
267
  "address": "0x90a617ed516ab7fAaBA56CcEDA0C5D952f294d03",
@@ -241,6 +281,24 @@
241
281
  }
242
282
  },
243
283
  "100": {
284
+ "GNO": {
285
+ "RealityETH_ERC20-3.0": {
286
+ "address": "0x95b2b2b4b66A5a47Df79bF07BEBe72E9870fceb2",
287
+ "block": 20882108,
288
+ "token_address": "0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb",
289
+ "notes": null,
290
+ "arbitrators": {}
291
+ }
292
+ },
293
+ "SWISE": {
294
+ "RealityETH_ERC20-3.0": {
295
+ "address": "0xC9FbdF0df8dE06Ad8d2193F7FA28bdA78c13a102",
296
+ "block": 21371853,
297
+ "token_address": "0xfdA94F056346d2320d4B5E468D6Ad099b2277746",
298
+ "notes": null,
299
+ "arbitrators": {}
300
+ }
301
+ },
244
302
  "XDAI": {
245
303
  "RealityETH-2.1": {
246
304
  "address": "0x79e32aE03fb27B07C89c0c568F80287C01ca2E57",
@@ -257,7 +315,9 @@
257
315
  "address": "0xE78996A233895bE74a66F451f1019cA9734205cc",
258
316
  "block": 17997262,
259
317
  "notes": null,
260
- "arbitrators": {}
318
+ "arbitrators": {
319
+ "0x29f39de98d750eb77b5fafb31b2837f079fce222": "Kleros"
320
+ }
261
321
  }
262
322
  }
263
323
  },
@@ -284,6 +344,27 @@
284
344
  }
285
345
  }
286
346
  },
347
+ "280": {
348
+ "WETH": {
349
+ "RealityETH_ERC20-3.0": {
350
+ "address": "0xE80bc83Dad9B3794471912c29612A20d8170Befd",
351
+ "block": 333541,
352
+ "token_address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
353
+ "notes": null,
354
+ "arbitrators": {}
355
+ }
356
+ }
357
+ },
358
+ "777": {
359
+ "CTH": {
360
+ "RealityETH-3.0": {
361
+ "address": "0xF935d11116fA0103Bd340B663879d325673106f0",
362
+ "block": 13539397,
363
+ "notes": null,
364
+ "arbitrators": {}
365
+ }
366
+ }
367
+ },
287
368
  "42161": {
288
369
  "ARETH": {
289
370
  "Arbitrator": {
@@ -339,5 +420,15 @@
339
420
  "arbitrators": {}
340
421
  }
341
422
  }
423
+ },
424
+ "1337702": {
425
+ "ETH": {
426
+ "RealityETH-3.0": {
427
+ "address": "0x45fF90518c92C0AcF5C58784435852B5F0CBD4Be",
428
+ "block": 47012,
429
+ "notes": null,
430
+ "arbitrators": {}
431
+ }
432
+ }
342
433
  }
343
434
  }
@@ -21,13 +21,21 @@
21
21
  "56": true
22
22
  }
23
23
  },
24
+ "CTH": {
25
+ "decimals": 18,
26
+ "small_number": 10000000000000000000,
27
+ "native_chains": {
28
+ "777": true
29
+ }
30
+ },
24
31
  "ETH": {
25
32
  "decimals": 18,
26
33
  "small_number": 10000000000000000,
27
34
  "native_chains": {
28
35
  "1": true,
29
36
  "4": true,
30
- "42": true
37
+ "42": true,
38
+ "1337702": true
31
39
  }
32
40
  },
33
41
  "MATIC": {
@@ -37,6 +45,14 @@
37
45
  "137": true
38
46
  }
39
47
  },
48
+ "OETH": {
49
+ "decimals": 18,
50
+ "small_number": 10000000000000000000,
51
+ "native_chains": {
52
+ "10": true,
53
+ "69": true
54
+ }
55
+ },
40
56
  "UBQ": {
41
57
  "decimals": 18,
42
58
  "small_number": 1000000000000000000,
@@ -59,6 +75,13 @@
59
75
  "4": "0x56AE5fd086823d1892BACE27034Eb5531Fcdc3f8"
60
76
  }
61
77
  },
78
+ "DEXE": {
79
+ "decimals": 18,
80
+ "small_number": 1000000000000000000,
81
+ "erc20_chains": {
82
+ "56": "0x039cb485212f996a9dbb85a9a75d898f94d38da6"
83
+ }
84
+ },
62
85
  "FOX": {
63
86
  "decimals": 18,
64
87
  "small_number": 1000000000000000000,
@@ -70,7 +93,8 @@
70
93
  "decimals": 18,
71
94
  "small_number": 10000000,
72
95
  "erc20_chains": {
73
- "1": "0x6810e776880c02933d47db1b9fc05908e5386b96"
96
+ "1": "0x6810e776880c02933d47db1b9fc05908e5386b96",
97
+ "100": "0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb"
74
98
  }
75
99
  },
76
100
  "POLK": {
@@ -80,6 +104,14 @@
80
104
  "42": "0x222E11E134F9AB3750812b37F0DA51B4467EaA7a"
81
105
  }
82
106
  },
107
+ "SWISE": {
108
+ "decimals": 18,
109
+ "small_number": 1000000000000000000,
110
+ "erc20_chains": {
111
+ "1": "0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2",
112
+ "100": "0xfdA94F056346d2320d4B5E468D6Ad099b2277746"
113
+ }
114
+ },
83
115
  "TRST": {
84
116
  "decimals": 6,
85
117
  "small_number": 100000000,
@@ -87,5 +119,12 @@
87
119
  "1": "0xcb94be6f13a1182e4a4b6140cb7bf2025d28e41b",
88
120
  "4": "0x21036C54e16521B8809553956123E44054120226"
89
121
  }
122
+ },
123
+ "WETH": {
124
+ "decimals": 18,
125
+ "small_number": 10000000000000000,
126
+ "erc20_chains": {
127
+ "280": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
128
+ }
90
129
  }
91
130
  }
package/index.js CHANGED
@@ -1,4 +1,3 @@
1
- const fs = require('fs');
2
1
  const all_config = require('./generated/contracts.json');
3
2
  const token_info = require('./generated/tokens.json');
4
3
  const chain_info = require('./generated/chains.json');
@@ -8,6 +7,7 @@ function realityETHInstance(config) {
8
7
  const abis = {
9
8
  'RealityETH-2.0': require('./abi/solc-0.8.6/RealityETH-2.0.abi.json'),
10
9
  'RealityETH-2.1': require('./abi/solc-0.8.6/RealityETH-2.1.abi.json'),
10
+ 'RealityETH-2.1-rc1': require('./abi/solc-0.8.6/RealityETH-2.1.abi.json'),
11
11
  'RealityETH-3.0': require('./abi/solc-0.8.6/RealityETH-3.0.abi.json'),
12
12
  'RealityETH_ERC20-2.0': require('./abi/solc-0.8.6/RealityETH_ERC20-2.0.abi.json'),
13
13
  'RealityETH_ERC20-3.0': require('./abi/solc-0.8.6/RealityETH_ERC20-3.0.abi.json')
@@ -50,7 +50,7 @@ function erc20Instance(config) {
50
50
  function chainTokenList(chain_id) {
51
51
  let ret = {};
52
52
  for (t in token_info) {
53
- if (all_config[""+chain_id][t]) {
53
+ if (all_config[""+chain_id] && all_config[""+chain_id][t]) {
54
54
  ret[t] = token_info[t];
55
55
  ret[t].is_native = (token_info[t].native_chains && token_info[t].native_chains[""+chain_id]);
56
56
  }
@@ -158,6 +158,10 @@ function chainData(chain_id) {
158
158
  return chain_info[""+chain_id];
159
159
  }
160
160
 
161
+ function isChainSupported(chain_id) {
162
+ return (""+chain_id in chain_info);
163
+ }
164
+
161
165
  function walletAddParameters(chain_id) {
162
166
  var params = ['chainId', 'chainName', 'nativeCurrency', 'rpcUrls', 'blockExplorerUrls']
163
167
  var ret = {};
@@ -217,3 +221,4 @@ module.exports.walletAddParameters = walletAddParameters;
217
221
  module.exports.templateConfig = templateConfig;
218
222
  module.exports.defaultTokenForChain = defaultTokenForChain;
219
223
  module.exports.versionHasFeature = versionHasFeature;
224
+ module.exports.isChainSupported = isChainSupported;
@@ -0,0 +1,21 @@
1
+ We made the zk-sync alpha deployment using their hardhat deployment mechanism.
2
+ https://v2-docs.zksync.io/api/hardhat/getting-started.html#initializing-the-project
3
+
4
+ We used a standalone copy of RealityETH_ERC20-3.0.sol from the flat/ directory.
5
+
6
+ mkdir realityeth-hardhat
7
+ cd realityeth-hardhat
8
+ yarn init -y
9
+ yarn add -D typescript ts-node ethers zksync-web3 hardhat @matterlabs/hardhat-zksync-solc @matterlabs/hardhat-zksync-deploy
10
+
11
+ # create hardhat.config.ts
12
+
13
+ mkdir contracts
14
+ mkdir deploy
15
+ # Copy source into contracts from our flat/ directory
16
+ # Replace block.number with block.timestamp, not sure if we'll always need to do this, see https://github.com/RealityETH/reality-eth-monorepo/issues/60
17
+
18
+ yarn hardhat compile
19
+
20
+ # You may need to edit deploy.ts to make sure the appropriate account is funded etc.
21
+ yarn hardhat deploy-zksync