@graphprotocol/graph-cli 0.96.0 → 0.96.1-alpha-20250227184351-bb6cf87645c242389bdf93ff0e60b2ef575ff145
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,5 +1,11 @@
|
|
|
1
1
|
# @graphprotocol/graph-cli
|
|
2
2
|
|
|
3
|
+
## 0.96.1-alpha-20250227184351-bb6cf87645c242389bdf93ff0e60b2ef575ff145
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1974](https://github.com/graphprotocol/graph-tooling/pull/1974) [`bb6cf87`](https://github.com/graphprotocol/graph-tooling/commit/bb6cf87645c242389bdf93ff0e60b2ef575ff145) Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - handle non-standard Etherscan API responses, i.e. kaia
|
|
8
|
+
|
|
3
9
|
## 0.96.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -124,10 +124,10 @@ export class ContractService {
|
|
|
124
124
|
}
|
|
125
125
|
try {
|
|
126
126
|
const result = await Promise.any(urls.map(url => this.fetchFromEtherscan(`${url}?module=contract&action=getsourcecode&address=${address}`).then(json => {
|
|
127
|
-
if (!json?.result
|
|
127
|
+
if (!json?.result) {
|
|
128
128
|
throw new Error(`No result: ${JSON.stringify(json)}`);
|
|
129
129
|
}
|
|
130
|
-
const { ContractName } = json.result[0];
|
|
130
|
+
const { ContractName } = json.result?.[0] ?? json.result ?? {};
|
|
131
131
|
if (!ContractName) {
|
|
132
132
|
throw new Error('Contract name is empty');
|
|
133
133
|
}
|
package/dist/commands/init.js
CHANGED
|
@@ -640,7 +640,7 @@ async function processInitForm({ abi: initAbi, abiPath: initAbiPath, directory:
|
|
|
640
640
|
type: 'input',
|
|
641
641
|
name: 'startBlock',
|
|
642
642
|
message: 'Start block',
|
|
643
|
-
initial: () => initStartBlock || startBlock ||
|
|
643
|
+
initial: () => String(initStartBlock || startBlock || 0),
|
|
644
644
|
skip: () => initFromExample !== undefined || isSubstreams,
|
|
645
645
|
validate: value => initFromExample !== undefined ||
|
|
646
646
|
isSubstreams ||
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED