@reality.eth/contracts 3.0.2 → 3.0.3

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 (53) hide show
  1. package/chains/chainid.network.json +2708 -174
  2. package/chains/deployments/1/ETH/RealityETH-3.0.json +2 -1
  3. package/chains/deployments/1/SWISE/RealityETH_ERC20-3.0.json +7 -0
  4. package/chains/deployments/10/OETH/RealityETH-3.0.json +6 -0
  5. package/chains/deployments/100/GNO/RealityETH_ERC20-3.0.json +7 -0
  6. package/chains/deployments/100/SWISE/RealityETH_ERC20-3.0.json +7 -0
  7. package/chains/deployments/100/XDAI/RealityETH-3.0.json +3 -1
  8. package/chains/deployments/1337702/ETH/RealityETH-3.0.json +6 -0
  9. package/chains/deployments/4/ETH/RealityETH-3.0.json +3 -1
  10. package/chains/deployments/42/ETH/RealityETH-3.0.json +2 -1
  11. package/chains/deployments/56/DEXE/RealityETH_ERC20-3.0.json +7 -0
  12. package/chains/deployments/69/OETH/RealityETH-3.0.json +6 -0
  13. package/chains/deployments/77/XDAI/RealityETH-2.1-rc1.json +1 -3
  14. package/chains/deployments/777/CTH/RealityETH-3.0.json +6 -0
  15. package/chains/supported.json +16 -0
  16. package/development/contracts/Arbitrator.sol +7 -6
  17. package/development/contracts/BalanceHolder.sol +4 -2
  18. package/development/contracts/{BalanceHolderERC20.sol → BalanceHolder_ERC20.sol} +3 -2
  19. package/development/contracts/IArbitrator.sol +4 -7
  20. package/development/contracts/IArbitratorForeignProxy.sol +12 -0
  21. package/development/contracts/IBalanceHolder.sol +3 -1
  22. package/development/contracts/IBalanceHolder_ERC20.sol +11 -0
  23. package/development/contracts/IERC20.sol +1 -1
  24. package/development/contracts/IOwned.sol +1 -1
  25. package/development/contracts/IRealityETH.sol +63 -0
  26. package/development/contracts/IRealityETH_ERC20.sol +67 -0
  27. package/development/contracts/Owned.sol +4 -2
  28. package/development/contracts/RealityETH-3.0.sol +4 -82
  29. package/development/contracts/RealityETH_ERC20-3.0.sol +3 -3
  30. package/generated/chains.json +81 -8
  31. package/generated/contracts.json +87 -7
  32. package/generated/tokens.json +34 -2
  33. package/index.js +7 -1
  34. package/package.json +3 -3
  35. package/scripts/deploy.js +14 -3
  36. package/scripts/fetch_and_reformat_chains_json.js +31 -0
  37. package/scripts/{format_abi.js → format_json.js} +0 -0
  38. package/scripts/generate_chains_json.js +3 -0
  39. package/tokens/CTH.json +7 -0
  40. package/tokens/DEXE.json +7 -0
  41. package/tokens/ETH.json +2 -1
  42. package/tokens/GNO.json +1 -0
  43. package/tokens/OETH.json +8 -0
  44. package/tokens/SWISE.json +8 -0
  45. package/development/contracts/IRealitio.sol +0 -44
  46. package/development/contracts/MultiSigWallet.sol +0 -391
  47. package/development/contracts/Realitio.sol +0 -756
  48. package/development/contracts/RealitioERC20.sol +0 -825
  49. package/development/contracts/RealitioSafeMath256.sol +0 -36
  50. package/development/contracts/RealitioSafeMath32.sol +0 -17
  51. package/development/contracts/Realitio_v2_1.sol +0 -819
  52. package/development/contracts/SplitterWallet.sol +0 -142
  53. package/tests/python/test_wallet.py +0 -185
@@ -52,7 +52,7 @@
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",
@@ -65,9 +65,28 @@
65
65
  ],
66
66
  "hostedRPC": "https://rpc.octano.dev",
67
67
  "blockExplorerUrls": [
68
+ "https://ubiqscan.io",
68
69
  "https://ubqblockexplorer.com/"
69
70
  ]
70
71
  },
72
+ "10": {
73
+ "chainId": "0xa",
74
+ "chainName": "Optimistic Ethereum",
75
+ "nativeCurrency": {
76
+ "name": "Ether",
77
+ "symbol": "OETH",
78
+ "decimals": 18
79
+ },
80
+ "network_name": "mainnet",
81
+ "rpcUrls": [
82
+ "https://mainnet.optimism.io/"
83
+ ],
84
+ "hostedRPC": "https://mainnet.optimism.io",
85
+ "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-optimism",
86
+ "blockExplorerUrls": [
87
+ "https://optimistic.etherscan.io"
88
+ ]
89
+ },
71
90
  "42": {
72
91
  "chainId": "0x2a",
73
92
  "chainName": "Ethereum Testnet Kovan",
@@ -119,12 +138,29 @@
119
138
  "https://www.bscscan.com"
120
139
  ]
121
140
  },
141
+ "69": {
142
+ "chainId": "0x45",
143
+ "chainName": "Optimistic Ethereum Testnet Kovan",
144
+ "nativeCurrency": {
145
+ "name": "Kovan Ether",
146
+ "symbol": "KOR",
147
+ "decimals": 18
148
+ },
149
+ "network_name": "kovan",
150
+ "rpcUrls": [
151
+ "https://kovan.optimism.io/"
152
+ ],
153
+ "hostedRPC": "https://kovan.optimism.io",
154
+ "blockExplorerUrls": [
155
+ "https://kovan-optimistic.etherscan.io"
156
+ ]
157
+ },
122
158
  "77": {
123
159
  "chainId": "0x4d",
124
160
  "chainName": "POA Network Sokol",
125
161
  "nativeCurrency": {
126
162
  "name": "POA Sokol Ether",
127
- "symbol": "POA",
163
+ "symbol": "SPOA",
128
164
  "decimals": 18
129
165
  },
130
166
  "network_name": "poa-sokol",
@@ -163,31 +199,50 @@
163
199
  ],
164
200
  "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-xdai",
165
201
  "blockExplorerUrls": [
202
+ "https://blockscout.com/poa/xdai",
166
203
  "https://blockscout.com/poa/xdai/"
167
204
  ]
168
205
  },
169
206
  "137": {
170
207
  "chainId": "0x89",
171
- "chainName": "Matic(Polygon) Mainnet",
208
+ "chainName": "Polygon Mainnet",
172
209
  "nativeCurrency": {
173
- "name": "Matic",
210
+ "name": "MATIC",
174
211
  "symbol": "MATIC",
175
212
  "decimals": 18
176
213
  },
177
214
  "network_name": "matic",
178
215
  "rpcUrls": [
216
+ "https://polygon-rpc.com/",
179
217
  "https://rpc-mainnet.matic.network",
180
- "wss://ws-mainnet.matic.network",
218
+ "https://matic-mainnet.chainstacklabs.com",
219
+ "https://rpc-mainnet.maticvigil.com",
181
220
  "https://rpc-mainnet.matic.quiknode.pro",
182
- "https://matic-mainnet.chainstacklabs.com"
221
+ "https://matic-mainnet-full-rpc.bwarelabs.com"
183
222
  ],
184
- "hostedRPC": "https://rpc-mainnet.matic.network",
223
+ "hostedRPC": "https://polygon-rpc.com/",
185
224
  "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-polygon",
186
225
  "blockExplorerUrls": [
187
- "https://polygonscan.com",
188
226
  "https://polygonscan.com/"
189
227
  ]
190
228
  },
229
+ "777": {
230
+ "chainId": "0x309",
231
+ "chainName": "cheapETH",
232
+ "nativeCurrency": {
233
+ "name": "cTH",
234
+ "symbol": "cTH",
235
+ "decimals": 18
236
+ },
237
+ "network_name": "cheapeth",
238
+ "rpcUrls": [
239
+ "https://node.cheapeth.org/rpc"
240
+ ],
241
+ "hostedRPC": "https://node.cheapeth.org/rpc",
242
+ "blockExplorerUrls": [
243
+ "https://explore.cheapswap.io/"
244
+ ]
245
+ },
191
246
  "42161": {
192
247
  "chainId": "0xa4b1",
193
248
  "chainName": "Arbitrum One",
@@ -221,6 +276,7 @@
221
276
  "hostedRPC": "https://api.avax.network/ext/bc/C/rpc",
222
277
  "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-ava",
223
278
  "blockExplorerUrls": [
279
+ "https://snowtrace.io/",
224
280
  "https://cchain.explorer.avax.network/"
225
281
  ]
226
282
  },
@@ -241,5 +297,22 @@
241
297
  "blockExplorerUrls": [
242
298
  "https://rinkeby-explorer.arbitrum.io"
243
299
  ]
300
+ },
301
+ "1337702": {
302
+ "chainId": "0x146966",
303
+ "chainName": "Kintsugi merge testnet",
304
+ "nativeCurrency": {
305
+ "name": "kintsugi Ethere",
306
+ "symbol": "kiETH",
307
+ "decimals": 18
308
+ },
309
+ "network_name": "kintsugi",
310
+ "rpcUrls": [
311
+ "https://rpc.kintsugi.themerge.dev"
312
+ ],
313
+ "hostedRPC": "https://rpc.kintsugi.themerge.dev",
314
+ "blockExplorerUrls": [
315
+ "https://explorer.kintsugi.themerge.dev/"
316
+ ]
244
317
  }
245
318
  }
@@ -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,16 @@
284
344
  }
285
345
  }
286
346
  },
347
+ "777": {
348
+ "CTH": {
349
+ "RealityETH-3.0": {
350
+ "address": "0xF935d11116fA0103Bd340B663879d325673106f0",
351
+ "block": 13539397,
352
+ "notes": null,
353
+ "arbitrators": {}
354
+ }
355
+ }
356
+ },
287
357
  "42161": {
288
358
  "ARETH": {
289
359
  "Arbitrator": {
@@ -339,5 +409,15 @@
339
409
  "arbitrators": {}
340
410
  }
341
411
  }
412
+ },
413
+ "1337702": {
414
+ "ETH": {
415
+ "RealityETH-3.0": {
416
+ "address": "0x45fF90518c92C0AcF5C58784435852B5F0CBD4Be",
417
+ "block": 47012,
418
+ "notes": null,
419
+ "arbitrators": {}
420
+ }
421
+ }
342
422
  }
343
423
  }
@@ -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,
package/index.js CHANGED
@@ -8,6 +8,7 @@ function realityETHInstance(config) {
8
8
  const abis = {
9
9
  'RealityETH-2.0': require('./abi/solc-0.8.6/RealityETH-2.0.abi.json'),
10
10
  'RealityETH-2.1': require('./abi/solc-0.8.6/RealityETH-2.1.abi.json'),
11
+ 'RealityETH-2.1-rc1': require('./abi/solc-0.8.6/RealityETH-2.1.abi.json'),
11
12
  'RealityETH-3.0': require('./abi/solc-0.8.6/RealityETH-3.0.abi.json'),
12
13
  'RealityETH_ERC20-2.0': require('./abi/solc-0.8.6/RealityETH_ERC20-2.0.abi.json'),
13
14
  'RealityETH_ERC20-3.0': require('./abi/solc-0.8.6/RealityETH_ERC20-3.0.abi.json')
@@ -50,7 +51,7 @@ function erc20Instance(config) {
50
51
  function chainTokenList(chain_id) {
51
52
  let ret = {};
52
53
  for (t in token_info) {
53
- if (all_config[""+chain_id][t]) {
54
+ if (all_config[""+chain_id] && all_config[""+chain_id][t]) {
54
55
  ret[t] = token_info[t];
55
56
  ret[t].is_native = (token_info[t].native_chains && token_info[t].native_chains[""+chain_id]);
56
57
  }
@@ -158,6 +159,10 @@ function chainData(chain_id) {
158
159
  return chain_info[""+chain_id];
159
160
  }
160
161
 
162
+ function isChainSupported(chain_id) {
163
+ return (""+chain_id in chain_info);
164
+ }
165
+
161
166
  function walletAddParameters(chain_id) {
162
167
  var params = ['chainId', 'chainName', 'nativeCurrency', 'rpcUrls', 'blockExplorerUrls']
163
168
  var ret = {};
@@ -217,3 +222,4 @@ module.exports.walletAddParameters = walletAddParameters;
217
222
  module.exports.templateConfig = templateConfig;
218
223
  module.exports.defaultTokenForChain = defaultTokenForChain;
219
224
  module.exports.versionHasFeature = versionHasFeature;
225
+ module.exports.isChainSupported = isChainSupported;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reality.eth/contracts",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "Collection of smart contracts for the Realitio fact verification platform",
5
5
  "scripts": {
6
6
  "generate-chains": "node scripts/generate_chains_json.js",
@@ -30,8 +30,8 @@
30
30
  "url": "https://github.com/RealityETH/monorepo/issues"
31
31
  },
32
32
  "homepage": "https://reality.eth.link",
33
- "gitHead": "48b58e830b19c65a8695da37861d6d49f0f7ec26",
33
+ "gitHead": "b9fcb24ff3274a58c4f98c0c97b58c4d5c5b0fcd",
34
34
  "dependencies": {
35
- "ethers": "^5.4.6"
35
+ "ethers": "^5.6.8"
36
36
  }
37
37
  }
package/scripts/deploy.js CHANGED
@@ -14,7 +14,10 @@ const defaultConfigs = {
14
14
  // maxFeePerGas: 61000000000,
15
15
  // maxPriorityFeePerGas: 1000000000,
16
16
  //gasPrice: 70000000000
17
- //; gasLimit: 6000000,
17
+ // gasPrice: 10000, // optimism 1000000,
18
+ gasPrice: 5000000000,
19
+ // gasLimit: 6000000, // optimism 4500000
20
+ gasLimit: 4500000,
18
21
  //etherscanApiKey: 'TPA4BFDDIH8Q7YBQ4JMGN6WDDRRPAV6G34'
19
22
  // gasLimit: 155734867 // arbitrum
20
23
  }
@@ -33,14 +36,18 @@ const chains = {
33
36
  'rinkeby': 4,
34
37
  'goerli': 5,
35
38
  'ubiq': 8,
39
+ 'optimism': 10,
36
40
  'kovan': 42,
37
41
  'bsc': 56,
38
42
  'sokol': 77,
43
+ 'cheapeth': 777,
39
44
  'xdai': 100,
40
45
  'polygon': 137,
41
46
  'ava': 43114,
42
47
  'arbitrum': 42161,
43
- 'arbitrum-rinkeby': 421611
48
+ 'arbitrum-rinkeby': 421611,
49
+ 'kovan-optimistic': 69,
50
+ 'kintsugi': 1337702,
44
51
  }
45
52
  const non_infura_chains = {
46
53
  'xdai': 'https://xdai.poanetwork.dev',
@@ -50,7 +57,11 @@ const non_infura_chains = {
50
57
  'ava': 'https://api.avax.network/ext/bc/C/rpc',
51
58
  'arbitrum': 'https://arb1.arbitrum.io/rpc',
52
59
  'arbitrum-rinkeby': 'https://rinkeby.arbitrum.io/rpc',
53
- 'ubiq': 'https://rpc.octano.dev'
60
+ 'ubiq': 'https://rpc.octano.dev',
61
+ 'cheapeth': 'https://node.cheapeth.org/rpc',
62
+ 'kovan-optimistic': 'https://kovan.optimism.io',
63
+ 'optimism': 'https://mainnet.optimism.io',
64
+ 'kintsugi': 'https://rpc.kintsugi.themerge.dev',
54
65
  }
55
66
 
56
67
  function constructContractTemplate(contract_name) {
@@ -0,0 +1,31 @@
1
+ /*
2
+ Add new lines to the abi file for more meaningful version control
3
+ */
4
+
5
+ const request = require('request');
6
+ const fs = require('fs');
7
+
8
+ const url = 'https://chainid.network/chains.json';
9
+ const out = './../chains/chainid.network.json';
10
+
11
+ let options = {json: true};
12
+
13
+ request(url, options, (error, res, body) => {
14
+ if (error) {
15
+ console.log(error)
16
+ };
17
+
18
+ if (!error && res.statusCode == 200) {
19
+ // console.log(body);
20
+ fs.writeFileSync(out, JSON.stringify(body, null, 4));
21
+ // do something with JSON, using the 'body' variable
22
+ };
23
+ });
24
+ //
25
+
26
+
27
+ /*
28
+
29
+ const file = process.argv[2]
30
+ const abi = JSON.parse(fs.readFileSync(file));
31
+ */
File without changes
@@ -42,6 +42,9 @@ for (var ci = 0; ci< chain_id_list.length; ci++) {
42
42
  if (thisr.indexOf('INFURA_API_KEY') !== -1) {
43
43
  continue;
44
44
  }
45
+ if (thisr.indexOf('ALCHEMY_API_KEY') !== -1) {
46
+ continue;
47
+ }
45
48
  rpc.push(thisr);
46
49
  }
47
50
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "decimals": 18,
3
+ "small_number": 10000000000000000000,
4
+ "native_chains": {
5
+ "777": true
6
+ }
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "decimals": 18,
3
+ "small_number": 1000000000000000000,
4
+ "erc20_chains": {
5
+ "56": "0x039cb485212f996a9dbb85a9a75d898f94d38da6"
6
+ }
7
+ }
package/tokens/ETH.json CHANGED
@@ -4,6 +4,7 @@
4
4
  "native_chains": {
5
5
  "1": true,
6
6
  "4": true,
7
- "42": true
7
+ "42": true,
8
+ "1337702": true
8
9
  }
9
10
  }
package/tokens/GNO.json CHANGED
@@ -3,5 +3,6 @@
3
3
  "small_number": 10000000,
4
4
  "erc20_chains": {
5
5
  "1": "0x6810e776880c02933d47db1b9fc05908e5386b96"
6
+ ,"100": "0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb"
6
7
  }
7
8
  }
@@ -0,0 +1,8 @@
1
+ {
2
+ "decimals": 18,
3
+ "small_number": 10000000000000000000,
4
+ "native_chains": {
5
+ "10": true,
6
+ "69": true
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "decimals": 18,
3
+ "small_number": 1000000000000000000,
4
+ "erc20_chains": {
5
+ "1": "0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2",
6
+ "100": "0xfdA94F056346d2320d4B5E468D6Ad099b2277746"
7
+ }
8
+ }
@@ -1,44 +0,0 @@
1
- // SPDX-License-Identifier: GPL-3.0-only
2
-
3
- pragma solidity ^0.8.6;
4
-
5
- interface IRealitio {
6
- function claimWinnings ( bytes32 question_id, bytes32[] memory history_hashes, address[] memory addrs, uint256[] memory bonds, bytes32[] memory answers ) external;
7
- function getFinalAnswerIfMatches ( bytes32 question_id, bytes32 content_hash, address arbitrator, uint32 min_timeout, uint256 min_bond ) external view returns ( bytes32 );
8
- function getBounty ( bytes32 question_id ) external view returns ( uint256 );
9
- function getArbitrator ( bytes32 question_id ) external view returns ( address );
10
- function getBond ( bytes32 question_id ) external view returns ( uint256 );
11
- function claimMultipleAndWithdrawBalance ( bytes32[] memory question_ids, uint256[] memory lengths, bytes32[] memory hist_hashes, address[] memory addrs, uint256[] memory bonds, bytes32[] memory answers ) external;
12
- function withdraw ( ) external;
13
- function submitAnswerReveal ( bytes32 question_id, bytes32 answer, uint256 nonce, uint256 bond ) external;
14
- function setQuestionFee ( uint256 fee ) external;
15
- function template_hashes ( uint256 ) external view returns ( bytes32 );
16
- function getContentHash ( bytes32 question_id ) external view returns ( bytes32 );
17
- function question_claims ( bytes32 ) external view returns ( address payee, uint256 last_bond, uint256 queued_funds );
18
- function fundAnswerBounty ( bytes32 question_id ) external payable;
19
- function arbitrator_question_fees ( address ) external view returns ( uint256 );
20
- function balanceOf ( address ) external view returns ( uint256 );
21
- function askQuestion ( uint256 template_id, string memory question, address arbitrator, uint32 timeout, uint32 opening_ts, uint256 nonce ) external payable returns ( bytes32 );
22
- function submitAnswer ( bytes32 question_id, bytes32 answer, uint256 max_previous ) external payable;
23
- function submitAnswerFor ( bytes32 question_id, bytes32 answer, uint256 max_previous, address answerer ) external payable; // Only available from v2.1
24
- function isFinalized ( bytes32 question_id ) external view returns ( bool );
25
- function getHistoryHash ( bytes32 question_id ) external view returns ( bytes32 );
26
- function commitments ( bytes32 ) external view returns ( uint32 reveal_ts, bool is_revealed, bytes32 revealed_answer );
27
- function createTemplate ( string memory content ) external returns ( uint256 );
28
- function getBestAnswer ( bytes32 question_id ) external view returns ( bytes32 );
29
- function isPendingArbitration ( bytes32 question_id ) external view returns ( bool );
30
- function questions ( bytes32 ) external view returns ( bytes32 content_hash, address arbitrator, uint32 opening_ts, uint32 timeout, uint32 finalize_ts, bool is_pending_arbitration, uint256 bounty, bytes32 best_answer, bytes32 history_hash, uint256 bond );
31
- function getOpeningTS ( bytes32 question_id ) external view returns ( uint32 );
32
- function getTimeout ( bytes32 question_id ) external view returns ( uint32 );
33
- function createTemplateAndAskQuestion ( string memory content, string memory question, address arbitrator, uint32 timeout, uint32 opening_ts, uint256 nonce ) external payable returns ( bytes32 );
34
- function getFinalAnswer ( bytes32 question_id ) external view returns ( bytes32 );
35
- function getFinalizeTS ( bytes32 question_id ) external view returns ( uint32 );
36
- function templates ( uint256 ) external view returns ( uint256 );
37
- function resultFor ( bytes32 question_id ) external view returns ( bytes32 );
38
- function submitAnswerCommitment ( bytes32 question_id, bytes32 answer_hash, uint256 max_previous, address _answerer ) external payable;
39
- function notifyOfArbitrationRequest ( bytes32 question_id, address requester, uint256 max_previous ) external;
40
- function submitAnswerByArbitrator ( bytes32 question_id, bytes32 answer, address answerer ) external;
41
- function assignWinnerAndSubmitAnswerByArbitrator( bytes32 question_id, bytes32 answer, address payee_if_wrong, bytes32 last_history_hash, bytes32 last_answer_or_commitment_id, address last_answerer ) external;
42
- function cancelArbitration(bytes32 question_id) external; // Only available from v2.1
43
- }
44
-