@reality.eth/contracts 3.0.26 → 3.0.27
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.
- package/chains/supported.json +2 -2
- package/example.js +1 -1
- package/generated/chains.json +2 -2
- package/index.js +9 -0
- package/package.json +2 -2
- package/scripts/deploy.js +2 -2
package/chains/supported.json
CHANGED
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
},
|
|
69
69
|
"324": {
|
|
70
70
|
"explorerURL": "https://explorer.zksync.io/",
|
|
71
|
-
"graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-zksync-
|
|
72
|
-
"network_name": "era
|
|
71
|
+
"graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-zksync-era",
|
|
72
|
+
"network_name": "zksync-era"
|
|
73
73
|
},
|
|
74
74
|
"777": {
|
|
75
75
|
"explorerURL": "https://explore.cheapswap.io/",
|
package/example.js
CHANGED
|
@@ -7,7 +7,7 @@ const ethers = require('ethers');
|
|
|
7
7
|
|
|
8
8
|
// The chain ID is usually either specified by the user or detected from metamask etc.
|
|
9
9
|
const chain_id = 1;
|
|
10
|
-
console.log('Using chain
|
|
10
|
+
console.log('Using chain', chain_id, realityeth_contracts.getChainLabel(chain_id))
|
|
11
11
|
|
|
12
12
|
// We provide some basic information about chains we support.
|
|
13
13
|
// This will include an RPC node and a Graph endpoint where available.
|
package/generated/chains.json
CHANGED
|
@@ -290,12 +290,12 @@
|
|
|
290
290
|
"symbol": "ETH",
|
|
291
291
|
"decimals": 18
|
|
292
292
|
},
|
|
293
|
-
"network_name": "era
|
|
293
|
+
"network_name": "zksync-era",
|
|
294
294
|
"rpcUrls": [
|
|
295
295
|
"https://zksync2-mainnet.zksync.io"
|
|
296
296
|
],
|
|
297
297
|
"hostedRPC": "https://zksync2-mainnet.zksync.io",
|
|
298
|
-
"graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-zksync-
|
|
298
|
+
"graphURL": "https://api.thegraph.com/subgraphs/name/realityeth/realityeth-zksync-era",
|
|
299
299
|
"blockExplorerUrls": [
|
|
300
300
|
"https://explorer.zksync.io",
|
|
301
301
|
"https://explorer.zksync.io/"
|
package/index.js
CHANGED
|
@@ -315,6 +315,14 @@ function tokenAndContractConfigFromFactory(factory_data, chain_id) {
|
|
|
315
315
|
}
|
|
316
316
|
|
|
317
317
|
|
|
318
|
+
function getChainLabel(chain_id) {
|
|
319
|
+
const c = chain_info[chain_id];
|
|
320
|
+
if (!c) {
|
|
321
|
+
return null;
|
|
322
|
+
}
|
|
323
|
+
return c['chainName'];
|
|
324
|
+
}
|
|
325
|
+
|
|
318
326
|
module.exports.realityETHConfig = realityETHConfig;
|
|
319
327
|
module.exports.realityETHConfigs = realityETHConfigs;
|
|
320
328
|
module.exports.realityETHInstance = realityETHInstance;
|
|
@@ -332,3 +340,4 @@ module.exports.factoryList = factoryList;
|
|
|
332
340
|
module.exports.tokenAndContractConfigFromFactory = tokenAndContractConfigFromFactory;
|
|
333
341
|
module.exports.configForAddress = configForAddress;
|
|
334
342
|
module.exports.populateImports = populateImports;
|
|
343
|
+
module.exports.getChainLabel = getChainLabel;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reality.eth/contracts",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.27",
|
|
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,7 +30,7 @@
|
|
|
30
30
|
"url": "https://github.com/RealityETH/monorepo/issues"
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://reality.eth.link",
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "346bd597623b347e4e8cc578d9531236630616e9",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"ethers": "^5.6.8"
|
|
36
36
|
}
|
package/scripts/deploy.js
CHANGED
|
@@ -43,7 +43,7 @@ const chains = {
|
|
|
43
43
|
'chapel': 97,
|
|
44
44
|
'sokol': 77,
|
|
45
45
|
'cheapeth': 777,
|
|
46
|
-
'
|
|
46
|
+
'gnosis': 100,
|
|
47
47
|
'polygon': 137,
|
|
48
48
|
'mumbai': 80001,
|
|
49
49
|
'ava': 43114,
|
|
@@ -54,7 +54,7 @@ const chains = {
|
|
|
54
54
|
'sepolia': 11155111,
|
|
55
55
|
}
|
|
56
56
|
const non_infura_chains = {
|
|
57
|
-
'
|
|
57
|
+
'gnosis': 'https://rpc.ankr.com/gnosis',
|
|
58
58
|
'sokol': 'https://sokol.poa.network',
|
|
59
59
|
'bsc': 'https://bsc-dataseed.binance.org',
|
|
60
60
|
'chapel': 'https://bsc-testnet.public.blastapi.io',
|