@graphprotocol/graph-cli 0.43.0-alpha-20230228145716-72ff33f → 0.43.0-alpha-20230317090444-516973a

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/CHANGELOG.md CHANGED
@@ -1,11 +1,32 @@
1
1
  # @graphprotocol/graph-cli
2
2
 
3
- ## 0.43.0-alpha-20230228145716-72ff33f
3
+ ## 0.43.0-alpha-20230317090444-516973a
4
4
 
5
5
  ### Minor Changes
6
6
 
7
+ - [#1192](https://github.com/graphprotocol/graph-tooling/pull/1192)
8
+ [`516973a`](https://github.com/graphprotocol/graph-tooling/commit/516973af26380579d2d2c91171e979d7ab99d040)
9
+ Thanks [@incrypto32](https://github.com/incrypto32)! - Add zksync era
10
+
11
+ ## 0.42.4
12
+
13
+ ### Patch Changes
14
+
15
+ - [#1185](https://github.com/graphprotocol/graph-tooling/pull/1185)
16
+ [`edf14d6`](https://github.com/graphprotocol/graph-tooling/commit/edf14d6fa580e99b317a977d0b693f182e746d4e)
17
+ Thanks [@incrypto32](https://github.com/incrypto32)! - Fix graph init failing to add more than one
18
+ contract
19
+
20
+ ## 0.42.3
21
+
22
+ ### Patch Changes
23
+
24
+ - [#1134](https://github.com/graphprotocol/graph-tooling/pull/1134)
25
+ [`a156355`](https://github.com/graphprotocol/graph-tooling/commit/a156355351f51f242bc2fa005125ffebed62eebe)
26
+ Thanks [@incrypto32](https://github.com/incrypto32)! - Fix Prefix error when using graph init
27
+
7
28
  - [#1138](https://github.com/graphprotocol/graph-tooling/pull/1138)
8
- [`72ff33f`](https://github.com/graphprotocol/graph-tooling/commit/72ff33f32095edd6434b9acbfcac3e5f5a1685f8)
29
+ [`eb6815e`](https://github.com/graphprotocol/graph-tooling/commit/eb6815eb4af7c8c4d9a9f2b252dca8e350c81d32)
9
30
  Thanks [@incrypto32](https://github.com/incrypto32)! - Fix default value issues with abi and
10
31
  startBlock
11
32
 
@@ -146,6 +146,8 @@ const getEtherscanLikeAPIUrl = (network) => {
146
146
  return `https://api.ftmscan.com/api`;
147
147
  case 'fantom-testnet':
148
148
  return `https://api-testnet.ftmscan.com/api`;
149
+ case 'zksync-era':
150
+ return `https://explorer.zksync.io/api`;
149
151
  default:
150
152
  return `https://api-${network}.etherscan.io/api`;
151
153
  }
@@ -208,6 +210,8 @@ const getPublicRPCEndpoint = (network) => {
208
210
  return 'https://sokol.poa.network';
209
211
  case 'rinkeby':
210
212
  return 'https://rpc.ankr.com/eth_rinkeby';
213
+ case 'zksync-era':
214
+ return 'https://zksync2-mainnet.zksync.io';
211
215
  default:
212
216
  throw new Error(`Unknown network: ${network}`);
213
217
  }
@@ -22,6 +22,7 @@ exports.allowedStudioNetworks = [
22
22
  'celo',
23
23
  'arbitrum-one',
24
24
  'avalanche',
25
+ 'zksync-era',
25
26
  ];
26
27
  const validateStudioNetwork = ({ studio, product, network, }) => {
27
28
  const isStudio = studio || product === 'subgraph-studio';
@@ -170,8 +170,8 @@ class InitCommand extends core_1.Command {
170
170
  }
171
171
  else {
172
172
  ({ node, allowSimpleName } = (0, node_1.chooseNodeUrl)({
173
- product,
174
- studio,
173
+ product: answers.product,
174
+ studio: answers.studio,
175
175
  node,
176
176
  allowSimpleName,
177
177
  }));
@@ -752,7 +752,7 @@ async function addAnotherContract({ protocolInstance, directory, }) {
752
752
  const ProtocolContract = protocolInstance.getContract();
753
753
  let contract = '';
754
754
  for (;;) {
755
- contract = await core_1.ux.prompt(`Contract ${ProtocolContract.identifierName()}`, {
755
+ contract = await core_1.ux.prompt(`\nContract ${ProtocolContract.identifierName()}`, {
756
756
  required: true,
757
757
  });
758
758
  const { valid, error } = (0, validation_1.validateContract)(contract, ProtocolContract);
@@ -761,23 +761,26 @@ async function addAnotherContract({ protocolInstance, directory, }) {
761
761
  }
762
762
  this.log(`✖ ${error}`);
763
763
  }
764
- const localAbi = await core_1.ux.prompt('Provide local ABI path? (y/n)', {
764
+ const localAbi = await core_1.ux.prompt('\nProvide local ABI path? (y/n)', {
765
765
  required: true,
766
766
  type: 'single',
767
767
  });
768
768
  abiFromFile = localAbi.toLowerCase() === 'y';
769
769
  let abiPath = '';
770
770
  if (abiFromFile) {
771
- abiPath = await core_1.ux.prompt('ABI file (path)', { required: true });
771
+ abiPath = await core_1.ux.prompt('\nABI file (path)', { required: true });
772
772
  }
773
- const contractName = await core_1.ux.prompt('Contract Name', { required: true, default: 'Contract' });
773
+ const contractName = await core_1.ux.prompt('\nContract Name', {
774
+ required: true,
775
+ default: 'Contract',
776
+ });
774
777
  // Get the cwd before process.chdir in order to switch back in the end of command execution
775
778
  const cwd = process.cwd();
776
779
  try {
777
780
  if (fs_1.default.existsSync(directory)) {
778
781
  process.chdir(directory);
779
782
  }
780
- const commandLine = ['add', contract, '--contract-name', contractName];
783
+ const commandLine = [contract, '--contract-name', contractName];
781
784
  if (abiFromFile) {
782
785
  if (abiPath.includes(directory)) {
783
786
  commandLine.push('--abi', path_1.default.normalize(abiPath.replace(directory, '')));
@@ -119,6 +119,7 @@ class Protocol {
119
119
  'aurora',
120
120
  'aurora-testnet',
121
121
  'base-testnet',
122
+ 'zksync-era',
122
123
  ],
123
124
  near: ['near-mainnet', 'near-testnet'],
124
125
  cosmos: [
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.43.0-alpha-20230228145716-72ff33f",
2
+ "version": "0.43.0-alpha-20230317090444-516973a",
3
3
  "commands": {
4
4
  "add": {
5
5
  "id": "add",
@@ -575,6 +575,7 @@
575
575
  "aurora",
576
576
  "aurora-testnet",
577
577
  "base-testnet",
578
+ "zksync-era",
578
579
  "near-mainnet",
579
580
  "near-testnet",
580
581
  "cosmoshub-4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphprotocol/graph-cli",
3
- "version": "0.43.0-alpha-20230228145716-72ff33f",
3
+ "version": "0.43.0-alpha-20230317090444-516973a",
4
4
  "description": "CLI for building for and deploying to The Graph",
5
5
  "license": "(Apache-2.0 OR MIT)",
6
6
  "engines": {