@reality.eth/contracts 3.0.53 → 3.0.55

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.
@@ -0,0 +1,7 @@
1
+ {
2
+ "address": "0xa0B6430cf3C0a2387E81d8BF167cDfA5a26d8807",
3
+ "block": 34587452,
4
+ "token_address": "0x9a2A80c38AbB1FDC3Cb0fbf94FEFe88BEf828E00",
5
+ "notes": null,
6
+ "arbitrators": {}
7
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "address": "0x1E732a1C5e9181622DD5A931Ec6801889ce66185",
3
+ "block": 10438389,
4
+ "notes": null,
5
+ "arbitrators": {}
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "address": "0xc716c23D75f523eF0C511456528F2A1980256a87",
3
+ "block": 3034954,
4
+ "notes": null,
5
+ "arbitrators": {}
6
+ }
@@ -80,6 +80,11 @@
80
80
  "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-zksync-era",
81
81
  "network_name": "zksync-era"
82
82
  },
83
+ "690": {
84
+ "hostedRPC": "https://rpc.redstonechain.com",
85
+ "explorerURL": "https://explorer.redstone.xyz/",
86
+ "network_name": "redstone"
87
+ },
83
88
  "777": {
84
89
  "explorerURL": "https://explore.cheapswap.io/",
85
90
  "network_name": "cheapeth"
@@ -89,6 +94,11 @@
89
94
  "explorerURL": "https://zkevm.polygonscan.com/",
90
95
  "network_name": "polygon-zkevm"
91
96
  },
97
+ "10200": {
98
+ "hostedRPC": "https://rpc.chiadochain.net",
99
+ "explorerURL": "https://gnosis-chiado.blockscout.com/",
100
+ "network_name": "chiado"
101
+ },
92
102
  "17000": {
93
103
  "hostedRPC": "https://ethereum-holesky.publicnode.com",
94
104
  "explorerURL": "https://holesky.etherscan.io/",
@@ -367,6 +367,25 @@
367
367
  "https://explorer.zksync.io/"
368
368
  ]
369
369
  },
370
+ "690": {
371
+ "chainId": "0x2b2",
372
+ "chainName": "Redstone",
373
+ "nativeCurrency": {
374
+ "name": "Ether",
375
+ "symbol": "ETH",
376
+ "decimals": 18
377
+ },
378
+ "network_name": "redstone",
379
+ "rpcUrls": [
380
+ "https://rpc.redstonechain.com",
381
+ "wss://rpc.redstonechain.com"
382
+ ],
383
+ "hostedRPC": "https://rpc.redstonechain.com",
384
+ "blockExplorerUrls": [
385
+ "https://explorer.redstone.xyz",
386
+ "https://explorer.redstone.xyz/"
387
+ ]
388
+ },
370
389
  "777": {
371
390
  "chainId": "0x309",
372
391
  "chainName": "cheapETH",
@@ -404,6 +423,31 @@
404
423
  "https://zkevm.polygonscan.com/"
405
424
  ]
406
425
  },
426
+ "10200": {
427
+ "chainId": "0x27d8",
428
+ "chainName": "Gnosis Chiado Testnet",
429
+ "nativeCurrency": {
430
+ "name": "Chiado xDAI",
431
+ "symbol": "XDAI",
432
+ "decimals": 18
433
+ },
434
+ "network_name": "chiado",
435
+ "rpcUrls": [
436
+ "https://rpc.chiadochain.net",
437
+ "https://rpc.chiado.gnosis.gateway.fm",
438
+ "wss://rpc.chiadochain.net/wss",
439
+ "https://gnosis-chiado-rpc.publicnode.com",
440
+ "wss://gnosis-chiado-rpc.publicnode.com",
441
+ "https://gnosis-chiado.drpc.org",
442
+ "wss://gnosis-chiado.drpc.org"
443
+ ],
444
+ "hostedRPC": "https://rpc.chiadochain.net",
445
+ "blockExplorerUrls": [
446
+ "https://blockscout.chiadochain.net",
447
+ "https://gnosis-chiado.blockscout.com",
448
+ "https://gnosis-chiado.blockscout.com/"
449
+ ]
450
+ },
407
451
  "17000": {
408
452
  "chainId": "0x4268",
409
453
  "chainName": "Holesky",
@@ -283,6 +283,15 @@
283
283
  "arbitrators": {}
284
284
  }
285
285
  },
286
+ "POLK": {
287
+ "RealityETH_ERC20-3.0": {
288
+ "address": "0xa0B6430cf3C0a2387E81d8BF167cDfA5a26d8807",
289
+ "block": 34587452,
290
+ "token_address": "0x9a2A80c38AbB1FDC3Cb0fbf94FEFe88BEf828E00",
291
+ "notes": null,
292
+ "arbitrators": {}
293
+ }
294
+ },
286
295
  "SWISE": {
287
296
  "RealityETH_ERC20-3.0": {
288
297
  "address": "0xC9FbdF0df8dE06Ad8d2193F7FA28bdA78c13a102",
@@ -378,6 +387,16 @@
378
387
  }
379
388
  }
380
389
  },
390
+ "690": {
391
+ "ETH": {
392
+ "RealityETH-3.0": {
393
+ "address": "0xc716c23D75f523eF0C511456528F2A1980256a87",
394
+ "block": 3034954,
395
+ "notes": null,
396
+ "arbitrators": {}
397
+ }
398
+ }
399
+ },
381
400
  "777": {
382
401
  "CTH": {
383
402
  "RealityETH-3.0": {
@@ -398,6 +417,16 @@
398
417
  }
399
418
  }
400
419
  },
420
+ "10200": {
421
+ "XDAI": {
422
+ "RealityETH-3.0": {
423
+ "address": "0x1E732a1C5e9181622DD5A931Ec6801889ce66185",
424
+ "block": 10438389,
425
+ "notes": null,
426
+ "arbitrators": {}
427
+ }
428
+ }
429
+ },
401
430
  "17000": {
402
431
  "ETH": {
403
432
  "RealityETH-3.0": {
@@ -41,6 +41,7 @@
41
41
  "280": true,
42
42
  "300": true,
43
43
  "324": true,
44
+ "690": true,
44
45
  "1101": true,
45
46
  "421614": true,
46
47
  "534353": true,
@@ -83,7 +84,8 @@
83
84
  "small_number": 1000000000000000000,
84
85
  "native_chains": {
85
86
  "77": true,
86
- "100": true
87
+ "100": true,
88
+ "10200": true
87
89
  }
88
90
  },
89
91
  "ZBS": {
@@ -127,6 +129,7 @@
127
129
  "small_number": 1000000000000000000,
128
130
  "erc20_chains": {
129
131
  "42": "0x222E11E134F9AB3750812b37F0DA51B4467EaA7a",
132
+ "100": "0x9a2A80c38AbB1FDC3Cb0fbf94FEFe88BEf828E00",
130
133
  "137": "0x996F19d4b1cE6D5AD72CEaaa53152CEB1B187fD0",
131
134
  "80001": "0x935f82d011ee37e8870c435417ac58407a9863f7"
132
135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reality.eth/contracts",
3
- "version": "3.0.53",
3
+ "version": "3.0.55",
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",
@@ -34,7 +34,7 @@
34
34
  "url": "https://github.com/RealityETH/monorepo/issues"
35
35
  },
36
36
  "homepage": "https://reality.eth.link",
37
- "gitHead": "490a119ed3c0f1ffe016176ee108abcbae3820c4",
37
+ "gitHead": "04ec377a41c3f5b37346bdd34145d0197fdb927c",
38
38
  "dependencies": {
39
39
  "ethers": "^5.6.8"
40
40
  }
package/scripts/deploy.js CHANGED
@@ -4,6 +4,7 @@ const project_base = './../';
4
4
  const build_dir = './../truffle/build/contracts/';
5
5
  const rc = require('../index.js');
6
6
  const { join } = require('path');
7
+ const chain_configs = require('./../generated/chains.json');
7
8
 
8
9
  let secrets_dir = join(__dirname, '../secrets');
9
10
  if (process.env.SECRETS) {
@@ -121,7 +122,30 @@ function usage_error(msg) {
121
122
  throw msg;
122
123
  }
123
124
 
124
- const chain_id = chains[chain];
125
+
126
+ const isNumeric = (string) => /^[+-]?\d+(\.\d+)?$/.test(string)
127
+
128
+ let chain_id;
129
+ // Predefined chains (old method)
130
+ if (chain in chains) {
131
+ chain_id = chains[chain];
132
+ // Get the chain from the chain config
133
+ } else {
134
+ for (const c in chain_configs) {
135
+ const cn = chain_configs[c].chainName.toLowerCase().replace(' ', '-');
136
+ if (cn == chain) {
137
+ chain_id = c;
138
+ break;
139
+ }
140
+ if (chain_configs[c].network_name) {
141
+ const cn2 = chain_configs[c].network_name.toLowerCase();
142
+ if (cn2 == chain) {
143
+ chain_id = c;
144
+ break;
145
+ }
146
+ }
147
+ }
148
+ }
125
149
 
126
150
  if (!chain_id) {
127
151
  usage_error("Network unknown");
@@ -195,14 +219,26 @@ function store_deployed_factory_contract(template, chain_id, out_json) {
195
219
  console.log('wrote file', file);
196
220
  }
197
221
 
222
+ function chain_config_for_name(chain_name) {
223
+ for (cc in chain_configs) {
224
+
225
+ }
226
+ }
198
227
 
199
228
  function provider_for_chain() {
200
229
  if (non_infura_chains[chain]) {
201
230
  console.log('Using chain', non_infura_chains[chain]);
202
231
  return new ethers.providers.JsonRpcProvider(non_infura_chains[chain]);
203
232
  } else {
204
- console.log('Using infura on chain', chain);
205
- return new ethers.providers.InfuraProvider(chain);
233
+ if (chains[chain]) {
234
+ console.log('Using infura on chain', chain);
235
+ return new ethers.providers.InfuraProvider(chain);
236
+ } else {
237
+ const chain_config = chain_configs[chain_id];
238
+ const hostedRPC = chain_config.hostedRPC;
239
+ console.log('Using RPC', hostedRPC);
240
+ return new ethers.providers.JsonRpcProvider(chain_config.hostedRPC);
241
+ }
206
242
  }
207
243
  }
208
244
 
@@ -227,6 +263,7 @@ async function waitForGas(provider) {
227
263
 
228
264
  const f = await provider.getFeeData()
229
265
  console.log('fee', f)
266
+ throw new Error();
230
267
  return;
231
268
  if (f.gasPrice.gt(ethers.BigNumber.from(defaultConfigs.maxFeePerGas))) {
232
269
  console.log('Gas is too expensive, got', f.gasPrice.toString(), 'but you will only pay ', defaultConfigs.maxFeePerGas, ', retrying...')
package/tokens/ETH.json CHANGED
@@ -9,6 +9,7 @@
9
9
  "280": true,
10
10
  "300": true,
11
11
  "324": true,
12
+ "690": true,
12
13
  "1101": true,
13
14
  "421614": true,
14
15
  "534353": true,
package/tokens/POLK.json CHANGED
@@ -3,6 +3,7 @@
3
3
  "small_number": 1000000000000000000,
4
4
  "erc20_chains": {
5
5
  "42": "0x222E11E134F9AB3750812b37F0DA51B4467EaA7a",
6
+ "100": "0x9a2A80c38AbB1FDC3Cb0fbf94FEFe88BEf828E00",
6
7
  "137": "0x996F19d4b1cE6D5AD72CEaaa53152CEB1B187fD0",
7
8
  "80001": "0x935f82d011ee37e8870c435417ac58407a9863f7"
8
9
  }
package/tokens/XDAI.json CHANGED
@@ -3,6 +3,7 @@
3
3
  "small_number": 1000000000000000000,
4
4
  "native_chains": {
5
5
  "100": true,
6
- "77": true
6
+ "77": true,
7
+ "10200": true
7
8
  }
8
9
  }