@reality.eth/contracts 3.0.52 → 3.0.54

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,6 @@
1
+ {
2
+ "address": "0xc716c23D75f523eF0C511456528F2A1980256a87",
3
+ "block": 3034954,
4
+ "notes": null,
5
+ "arbitrators": {}
6
+ }
@@ -2,7 +2,7 @@
2
2
  "1": {
3
3
  "hostedRPC": "https://eth-mainnet.alchemyapi.io/v2/c9uS--nIxEOjVjh0AJlNttMaqUXQy8gR",
4
4
  "explorerURL": "https://etherscan.io",
5
- "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth",
5
+ "graphURL": "https://gateway-arbitrum.network.thegraph.com/api/73380b22a17017c081123ec9c0e34677/subgraphs/id/AGLkTv6eaW7JhQsLgB6SMzo43uM9V12ZoNkjAw7uijra",
6
6
  "network_name": "mainnet"
7
7
  },
8
8
  "3": {
@@ -20,7 +20,7 @@
20
20
  "5": {
21
21
  "hostedRPC": "https://eth-goerli.g.alchemy.com/v2/i2jZKhmFBPZYl8YdSHxsZ6viP3PQLwId",
22
22
  "explorerURL": "https://goerli.etherscan.io",
23
- "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-goerli",
23
+ "graphURL": "https://gateway.testnet.thegraph.com/api/73380b22a17017c081123ec9c0e34677/subgraphs/id/AWx6jkeKZ3xKRzkrzgfCAMPT7d6Jc3AMcqB8koN3QEqE",
24
24
  "network_name": "goerli"
25
25
  },
26
26
  "8": {
@@ -30,14 +30,14 @@
30
30
  "10": {
31
31
  "hostedRPC": "https://mainnet.optimism.io",
32
32
  "explorerURL": "https://optimistic.etherscan.io",
33
- "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-optimism"
33
+ "graphURL": "https://gateway-arbitrum.network.thegraph.com/api/73380b22a17017c081123ec9c0e34677/subgraphs/id/DbXiienZtjzLNQiXUfVvEyGxR3xkrJ7sJm5XdDKT4DqL"
34
34
  },
35
35
  "40": {
36
36
  "network_name": "TelosEVM"
37
37
  },
38
38
  "56": {
39
39
  "explorerURL": "https://www.bscscan.com",
40
- "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-bsc",
40
+ "graphURL": "https://gateway-arbitrum.network.thegraph.com/api/73380b22a17017c081123ec9c0e34677/subgraphs/id/5KjMLU6mx7RrjJJK9XKrM7i6oeB7C6gpnsi3CTWqpYpm",
41
41
  "network_name": "bsc"
42
42
  },
43
43
  "69": {
@@ -57,7 +57,7 @@
57
57
  },
58
58
  "100": {
59
59
  "explorerURL": "https://gnosisscan.io",
60
- "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-gnosis",
60
+ "graphURL": "https://gateway-arbitrum.network.thegraph.com/api/73380b22a17017c081123ec9c0e34677/subgraphs/id/E7ymrCnNcQdAAgLbdFWzGE5mvr5Mb5T9VfT43FqA7bNh",
61
61
  "network_name": "gnosis"
62
62
  },
63
63
  "137": {
@@ -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"
@@ -96,12 +101,12 @@
96
101
  },
97
102
  "42161": {
98
103
  "hostedRPC": "https://arb1.arbitrum.io/rpc",
99
- "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-arbitrum",
104
+ "graphURL": "https://gateway-arbitrum.network.thegraph.com/api/73380b22a17017c081123ec9c0e34677/subgraphs/id/GE8vDWJM3JBeqM8uk3LHZMbyBaeZTNjaeZRx1KgWvHeD",
100
105
  "network_name": "arbitrum-one"
101
106
  },
102
107
  "43114": {
103
108
  "explorerURL": "https://cchain.explorer.avax.network/",
104
- "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-ava",
109
+ "graphURL": "https://gateway-arbitrum.network.thegraph.com/api/73380b22a17017c081123ec9c0e34677/subgraphs/id/5mxhdAbQubvMU8cVjevsC2L8vre6EaHhpCXBdNPjd6EL",
105
110
  "network_name": "avalanche"
106
111
  },
107
112
  "80001": {
@@ -26,7 +26,7 @@
26
26
  "wss://eth.drpc.org"
27
27
  ],
28
28
  "hostedRPC": "https://eth-mainnet.alchemyapi.io/v2/c9uS--nIxEOjVjh0AJlNttMaqUXQy8gR",
29
- "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth",
29
+ "graphURL": "https://gateway-arbitrum.network.thegraph.com/api/73380b22a17017c081123ec9c0e34677/subgraphs/id/AGLkTv6eaW7JhQsLgB6SMzo43uM9V12ZoNkjAw7uijra",
30
30
  "blockExplorerUrls": [
31
31
  "https://etherscan.io",
32
32
  "https://eth.blockscout.com",
@@ -82,7 +82,7 @@
82
82
  "wss://goerli.gateway.tenderly.co"
83
83
  ],
84
84
  "hostedRPC": "https://eth-goerli.g.alchemy.com/v2/i2jZKhmFBPZYl8YdSHxsZ6viP3PQLwId",
85
- "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-goerli",
85
+ "graphURL": "https://gateway.testnet.thegraph.com/api/73380b22a17017c081123ec9c0e34677/subgraphs/id/AWx6jkeKZ3xKRzkrzgfCAMPT7d6Jc3AMcqB8koN3QEqE",
86
86
  "blockExplorerUrls": [
87
87
  "https://goerli.etherscan.io",
88
88
  "https://eth-goerli.blockscout.com"
@@ -124,7 +124,7 @@
124
124
  "wss://optimism.drpc.org"
125
125
  ],
126
126
  "hostedRPC": "https://mainnet.optimism.io",
127
- "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-optimism",
127
+ "graphURL": "https://gateway-arbitrum.network.thegraph.com/api/73380b22a17017c081123ec9c0e34677/subgraphs/id/DbXiienZtjzLNQiXUfVvEyGxR3xkrJ7sJm5XdDKT4DqL",
128
128
  "blockExplorerUrls": [
129
129
  "https://optimistic.etherscan.io",
130
130
  "https://optimism.blockscout.com",
@@ -177,7 +177,7 @@
177
177
  "wss://bsc-ws-node.nariox.org"
178
178
  ],
179
179
  "hostedRPC": "https://bsc-dataseed1.bnbchain.org",
180
- "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-bsc",
180
+ "graphURL": "https://gateway-arbitrum.network.thegraph.com/api/73380b22a17017c081123ec9c0e34677/subgraphs/id/5KjMLU6mx7RrjJJK9XKrM7i6oeB7C6gpnsi3CTWqpYpm",
181
181
  "blockExplorerUrls": [
182
182
  "https://bscscan.com",
183
183
  "https://bnb.dex.guru",
@@ -270,7 +270,7 @@
270
270
  "wss://gnosis-rpc.publicnode.com"
271
271
  ],
272
272
  "hostedRPC": "https://rpc.gnosischain.com",
273
- "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-gnosis",
273
+ "graphURL": "https://gateway-arbitrum.network.thegraph.com/api/73380b22a17017c081123ec9c0e34677/subgraphs/id/E7ymrCnNcQdAAgLbdFWzGE5mvr5Mb5T9VfT43FqA7bNh",
274
274
  "blockExplorerUrls": [
275
275
  "https://gnosisscan.io",
276
276
  "https://gnosis.blockscout.com",
@@ -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",
@@ -442,7 +461,7 @@
442
461
  "wss://arb1.arbitrum.io/ws"
443
462
  ],
444
463
  "hostedRPC": "https://arb1.arbitrum.io/rpc",
445
- "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-arbitrum",
464
+ "graphURL": "https://gateway-arbitrum.network.thegraph.com/api/73380b22a17017c081123ec9c0e34677/subgraphs/id/GE8vDWJM3JBeqM8uk3LHZMbyBaeZTNjaeZRx1KgWvHeD",
446
465
  "blockExplorerUrls": [
447
466
  "https://explorer.arbitrum.io"
448
467
  ]
@@ -462,7 +481,7 @@
462
481
  "wss://avalanche-c-chain-rpc.publicnode.com"
463
482
  ],
464
483
  "hostedRPC": "https://api.avax.network/ext/bc/C/rpc",
465
- "graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-ava",
484
+ "graphURL": "https://gateway-arbitrum.network.thegraph.com/api/73380b22a17017c081123ec9c0e34677/subgraphs/id/5mxhdAbQubvMU8cVjevsC2L8vre6EaHhpCXBdNPjd6EL",
466
485
  "blockExplorerUrls": [
467
486
  "https://snowtrace.io",
468
487
  "https://cchain.explorer.avax.network/"
@@ -378,6 +378,16 @@
378
378
  }
379
379
  }
380
380
  },
381
+ "690": {
382
+ "ETH": {
383
+ "RealityETH-3.0": {
384
+ "address": "0xc716c23D75f523eF0C511456528F2A1980256a87",
385
+ "block": 3034954,
386
+ "notes": null,
387
+ "arbitrators": {}
388
+ }
389
+ }
390
+ },
381
391
  "777": {
382
392
  "CTH": {
383
393
  "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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reality.eth/contracts",
3
- "version": "3.0.52",
3
+ "version": "3.0.54",
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": "f9d3cb6311dc265f3682aa4997f50e69c9799869",
37
+ "gitHead": "6277f6e0474a0051c6dd4531be3453bd56d7c75e",
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,23 @@ 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
+ }
141
+ }
125
142
 
126
143
  if (!chain_id) {
127
144
  usage_error("Network unknown");
@@ -195,14 +212,26 @@ function store_deployed_factory_contract(template, chain_id, out_json) {
195
212
  console.log('wrote file', file);
196
213
  }
197
214
 
215
+ function chain_config_for_name(chain_name) {
216
+ for (cc in chain_configs) {
217
+
218
+ }
219
+ }
198
220
 
199
221
  function provider_for_chain() {
200
222
  if (non_infura_chains[chain]) {
201
223
  console.log('Using chain', non_infura_chains[chain]);
202
224
  return new ethers.providers.JsonRpcProvider(non_infura_chains[chain]);
203
225
  } else {
204
- console.log('Using infura on chain', chain);
205
- return new ethers.providers.InfuraProvider(chain);
226
+ if (chains[chain]) {
227
+ console.log('Using infura on chain', chain);
228
+ return new ethers.providers.InfuraProvider(chain);
229
+ } else {
230
+ const chain_config = chain_configs[chain_id];
231
+ const hostedRPC = chain_config.hostedRPC;
232
+ console.log('Using RPC', hostedRPC);
233
+ return new ethers.providers.JsonRpcProvider(chain_config.hostedRPC);
234
+ }
206
235
  }
207
236
  }
208
237
 
@@ -227,6 +256,7 @@ async function waitForGas(provider) {
227
256
 
228
257
  const f = await provider.getFeeData()
229
258
  console.log('fee', f)
259
+ throw new Error();
230
260
  return;
231
261
  if (f.gasPrice.gt(ethers.BigNumber.from(defaultConfigs.maxFeePerGas))) {
232
262
  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,