@graphprotocol/graph-cli 0.34.0 → 0.35.0-alpha.0
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/package.json
CHANGED
|
@@ -65,6 +65,7 @@ const getEtherscanLikeAPIUrl = (network) => {
|
|
|
65
65
|
case "mbase": return `https://api-moonbase.moonscan.io/api`
|
|
66
66
|
case "avalanche": return `https://api.snowtrace.io/api`;
|
|
67
67
|
case "fuji": return `https://api-testnet.snowtrace.io/api`;
|
|
68
|
+
case "gnosis": return `https://api.gnosisscan.io/api`;
|
|
68
69
|
default: return `https://api-${network}.etherscan.io/api`
|
|
69
70
|
}
|
|
70
71
|
}
|
|
@@ -12,10 +12,19 @@ describe('Version Command Helpers', () => {
|
|
|
12
12
|
.toThrow(new Error(`The Subgraph Studio only allows subgraphs for these networks: ${allowedStudioNetworks.join(', ')}`))
|
|
13
13
|
})
|
|
14
14
|
|
|
15
|
-
test("And it's
|
|
15
|
+
test("And it's Gnosis chain", () => {
|
|
16
|
+
expect(() => validateStudioNetwork({
|
|
17
|
+
studio: true,
|
|
18
|
+
network: 'gnosis',
|
|
19
|
+
}))
|
|
20
|
+
.not
|
|
21
|
+
.toThrow(new Error(`The Subgraph Studio only allows subgraphs for these networks: ${allowedStudioNetworks.join(', ')}`))
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
test("And it's NOT an allowed network", () => {
|
|
16
25
|
expect(() => validateStudioNetwork({
|
|
17
26
|
product: 'subgraph-studio',
|
|
18
|
-
network: '
|
|
27
|
+
network: 'celo',
|
|
19
28
|
}))
|
|
20
29
|
.toThrow(new Error(`The Subgraph Studio only allows subgraphs for these networks: ${allowedStudioNetworks.join(', ')}`))
|
|
21
30
|
})
|
|
@@ -31,10 +40,10 @@ describe('Version Command Helpers', () => {
|
|
|
31
40
|
.toThrow(new Error(`The Subgraph Studio only allows subgraphs for these networks: ${allowedStudioNetworks.join(', ')}`))
|
|
32
41
|
})
|
|
33
42
|
|
|
34
|
-
test("And it's NOT
|
|
43
|
+
test("And it's NOT an allowed network", () => {
|
|
35
44
|
expect(() => validateStudioNetwork({
|
|
36
45
|
product: 'hosted-service',
|
|
37
|
-
network: '
|
|
46
|
+
network: 'celo',
|
|
38
47
|
}))
|
|
39
48
|
.not
|
|
40
49
|
.toThrow(new Error(`The Subgraph Studio only allows subgraphs for these networks: ${allowedStudioNetworks.join(', ')}`))
|
package/src/protocols/index.js
CHANGED
|
@@ -247,7 +247,7 @@ const validateValue = (value, ctx) => {
|
|
|
247
247
|
// [
|
|
248
248
|
// { name: 'contract0', kind: 'ethereum/contract', network: 'mainnet' },
|
|
249
249
|
// { name: 'contract1', kind: 'ethereum', network: 'mainnet' },
|
|
250
|
-
// { name: 'contract2', kind: 'ethereum/contract', network: '
|
|
250
|
+
// { name: 'contract2', kind: 'ethereum/contract', network: 'gnosis' },
|
|
251
251
|
// { name: 'contract3', kind: 'near', network: 'near-mainnet' },
|
|
252
252
|
// ]
|
|
253
253
|
//
|
|
@@ -255,7 +255,7 @@ const validateValue = (value, ctx) => {
|
|
|
255
255
|
// {
|
|
256
256
|
// ethereum: {
|
|
257
257
|
// mainnet: ['contract0', 'contract1'],
|
|
258
|
-
//
|
|
258
|
+
// gnosis: ['contract2'],
|
|
259
259
|
// },
|
|
260
260
|
// near: {
|
|
261
261
|
// 'near-mainnet': ['contract3'],
|