@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 +23 -2
- package/dist/command-helpers/abi.js +4 -0
- package/dist/command-helpers/studio.js +1 -0
- package/dist/commands/init.js +10 -7
- package/dist/protocols/index.js +1 -0
- package/oclif.manifest.json +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
# @graphprotocol/graph-cli
|
|
2
2
|
|
|
3
|
-
## 0.43.0-alpha-
|
|
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
|
-
[`
|
|
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
|
}
|
package/dist/commands/init.js
CHANGED
|
@@ -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(
|
|
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('
|
|
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('
|
|
771
|
+
abiPath = await core_1.ux.prompt('\nABI file (path)', { required: true });
|
|
772
772
|
}
|
|
773
|
-
const contractName = await core_1.ux.prompt('
|
|
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 = [
|
|
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, '')));
|
package/dist/protocols/index.js
CHANGED
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.43.0-alpha-
|
|
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