@graphprotocol/graph-cli 0.90.0-alpha-20241126193614-f922c8e → 0.90.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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @graphprotocol/graph-cli
2
2
 
3
- ## 0.90.0-alpha-20241126193614-f922c8e
3
+ ## 0.90.0
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -10,10 +10,15 @@
10
10
 
11
11
  ### Patch Changes
12
12
 
13
- - [#1772](https://github.com/graphprotocol/graph-tooling/pull/1772)
14
- [`f922c8e`](https://github.com/graphprotocol/graph-tooling/commit/f922c8e05d037d521b86e194e54ee086dc9793ee)
15
- Thanks [@alinobrasil](https://github.com/alinobrasil)! - Add new chains: `abstract-testnet`,
16
- `corn` and `corn-testnet`
13
+ - [#1771](https://github.com/graphprotocol/graph-tooling/pull/1771)
14
+ [`93271b0`](https://github.com/graphprotocol/graph-tooling/commit/93271b07116752c74419720a39c1fdbd460c078d)
15
+ Thanks [@0237h](https://github.com/0237h)! - Support parsing full path contract name from block
16
+ explorers
17
+
18
+ - [#1774](https://github.com/graphprotocol/graph-tooling/pull/1774)
19
+ [`5d9f0c9`](https://github.com/graphprotocol/graph-tooling/commit/5d9f0c9c9d714d95ed455deb02137ea5440f3e2d)
20
+ Thanks [@0237h](https://github.com/0237h)! - Add new chains: `abstract-testnet`, `corn` and
21
+ `corn-testnet`
17
22
 
18
23
  - [#1767](https://github.com/graphprotocol/graph-tooling/pull/1767)
19
24
  [`6f2cb45`](https://github.com/graphprotocol/graph-tooling/commit/6f2cb45e5a07d8de2946a485763feb0b1bcfd4f0)
@@ -94,7 +94,11 @@ exports.fetchSourceCodeFromEtherscan = fetchSourceCodeFromEtherscan;
94
94
  const getContractNameForAddress = async (network, address) => {
95
95
  try {
96
96
  const contractSourceCode = await (0, exports.fetchSourceCodeFromEtherscan)(network, address);
97
- const contractName = contractSourceCode.result[0].ContractName;
97
+ let contractName = contractSourceCode.result[0].ContractName;
98
+ // Some explorers will return the full path of the contract instead of just the name
99
+ // Example: contracts/SyncSwapRouter.sol:SyncSwapRouter
100
+ if (contractName.includes(':'))
101
+ contractName = contractName.substring(contractName.lastIndexOf(':') + 1);
98
102
  logger('Successfully getContractNameForAddress. contractName: %s', contractName);
99
103
  return contractName;
100
104
  }
@@ -272,11 +276,11 @@ const getEtherscanLikeAPIUrl = (network) => {
272
276
  return 'https://unichain-sepolia.blockscout.com/api';
273
277
  case 'lens-testnet':
274
278
  return 'https://block-explorer-api.testnet.lens.dev/api';
275
- case 'abstract-testnet':
279
+ case 'abstract-sepolia':
276
280
  return 'https://block-explorer-api.testnet.abs.xyz/api';
277
281
  case 'corn':
278
282
  return 'https://maizenet-explorer.usecorn.com/api';
279
- case 'corn-testnet':
283
+ case 'corn-sepolia':
280
284
  return 'https://testnet-explorer.usecorn.com/api';
281
285
  default:
282
286
  return `https://api-${network}.etherscan.io/api`;
@@ -436,11 +440,11 @@ const getPublicRPCEndpoint = (network) => {
436
440
  return 'https://sepolia.unichain.org';
437
441
  case 'lens-testnet':
438
442
  return 'https://api.staging.lens.zksync.dev';
439
- case 'abstract-testnet':
443
+ case 'abstract-sepolia':
440
444
  return 'https://api.testnet.abs.xyz';
441
445
  case 'corn':
442
446
  return 'https://maizenet-rpc.usecorn.com';
443
- case 'corn-testnet':
447
+ case 'corn-sepolia':
444
448
  return 'https://testnet-rpc.usecorn.com';
445
449
  default:
446
450
  throw new Error(`Unknown network: ${network}`);
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.90.0-alpha-20241126193614-f922c8e",
2
+ "version": "0.90.0",
3
3
  "commands": {
4
4
  "add": {
5
5
  "id": "add",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphprotocol/graph-cli",
3
- "version": "0.90.0-alpha-20241126193614-f922c8e",
3
+ "version": "0.90.0",
4
4
  "description": "CLI for building for and deploying to The Graph",
5
5
  "license": "(Apache-2.0 OR MIT)",
6
6
  "engines": {