@graphprotocol/graph-cli 0.34.1 → 0.35.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphprotocol/graph-cli",
3
- "version": "0.34.1",
3
+ "version": "0.35.0",
4
4
  "license": "(Apache-2.0 OR MIT)",
5
5
  "description": "CLI for building for and deploying to The Graph",
6
6
  "dependencies": {
@@ -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
  }
@@ -1,4 +1,4 @@
1
- const allowedStudioNetworks = ['mainnet', 'rinkeby', 'goerli']
1
+ const allowedStudioNetworks = ['mainnet', 'rinkeby', 'goerli', 'gnosis']
2
2
 
3
3
  const validateStudioNetwork = ({ studio, product, network }) => {
4
4
  let isStudio = studio || product === 'subgraph-studio'
@@ -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 NOT Ethereum mainnet", () => {
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: 'xdai',
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 Ethereum mainnet", () => {
43
+ test("And it's NOT an allowed network", () => {
35
44
  expect(() => validateStudioNetwork({
36
45
  product: 'hosted-service',
37
- network: 'xdai',
46
+ network: 'celo',
38
47
  }))
39
48
  .not
40
49
  .toThrow(new Error(`The Subgraph Studio only allows subgraphs for these networks: ${allowedStudioNetworks.join(', ')}`))
@@ -46,7 +46,7 @@ module.exports = class Protocol {
46
46
  'goerli',
47
47
  'poa-core',
48
48
  'poa-sokol',
49
- 'xdai',
49
+ 'gnosis',
50
50
  'matic',
51
51
  'mumbai',
52
52
  'fantom',
@@ -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: 'xdai' },
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
- // xdai: ['contract2'],
258
+ // gnosis: ['contract2'],
259
259
  // },
260
260
  // near: {
261
261
  // 'near-mainnet': ['contract3'],