@snapshot-labs/snapshot.js 0.4.53 → 0.4.55

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/dist/index.d.ts CHANGED
@@ -511,10 +511,8 @@ declare const _default: {
511
511
  validate: typeof import("./utils").validate;
512
512
  SNAPSHOT_SUBGRAPH_URL: {
513
513
  1: string;
514
- 4: string;
515
514
  5: string;
516
515
  10: string;
517
- 42: string;
518
516
  56: string;
519
517
  100: string;
520
518
  137: string;
@@ -2890,6 +2890,22 @@ var networks = {
2890
2890
  },
2891
2891
  start: 30900,
2892
2892
  logo: "ipfs://QmNkwQ9uyaNgtu9YZM48VmKqmFceQhCMPLF2vZy7mWvw4L"
2893
+ },
2894
+ "7700": {
2895
+ key: "7700",
2896
+ name: "Canto",
2897
+ shortName: "Canto",
2898
+ chainId: 7700,
2899
+ network: "mainnet",
2900
+ multicall: "0x9787792A1020B00fb65191754c3D87c89Bf36444",
2901
+ rpc: [
2902
+ "https://canto.neobase.one"
2903
+ ],
2904
+ explorer: {
2905
+ url: "https://evm.explorer.canto.io"
2906
+ },
2907
+ start: 1683285,
2908
+ logo: "ipfs://QmVh5XRi7xN4UNw7SNKpEhjF1TsPXJnRyNkB4EuMVTVCB6"
2893
2909
  },
2894
2910
  "8217": {
2895
2911
  key: "8217",
@@ -3433,10 +3449,8 @@ var networks = {
3433
3449
 
3434
3450
  var delegationSubgraphs = {
3435
3451
  "1": "https://gateway.thegraph.com/api/0f15b42bdeff7a063a4e1757d7e2f99e/deployments/id/QmXZiV6S13ha6QXq4dmaM3TB4CHcDxBMvGexSNu9Kc28EH",
3436
- "4": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-rinkeby",
3437
3452
  "5": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-goerli",
3438
3453
  "10": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-optimism",
3439
- "42": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-kovan",
3440
3454
  "56": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-binance-smart-chain",
3441
3455
  "100": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-gnosis-chain",
3442
3456
  "137": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-polygon",
@@ -3914,9 +3928,15 @@ function subgraphRequest(url, query, options) {
3914
3928
  })];
3915
3929
  case 1:
3916
3930
  res = _a.sent();
3917
- return [4 /*yield*/, res.json()];
3931
+ return [4 /*yield*/, res.text()];
3918
3932
  case 2:
3919
3933
  responseData = _a.sent();
3934
+ try {
3935
+ responseData = JSON.parse(responseData);
3936
+ }
3937
+ catch (e) {
3938
+ throw new Error("Errors found in subgraphRequest: " + url + " " + responseData);
3939
+ }
3920
3940
  if (responseData.errors) {
3921
3941
  throw new Error('Errors found in subgraphRequest: ' +
3922
3942
  url +
@@ -2881,6 +2881,22 @@ var networks = {
2881
2881
  },
2882
2882
  start: 30900,
2883
2883
  logo: "ipfs://QmNkwQ9uyaNgtu9YZM48VmKqmFceQhCMPLF2vZy7mWvw4L"
2884
+ },
2885
+ "7700": {
2886
+ key: "7700",
2887
+ name: "Canto",
2888
+ shortName: "Canto",
2889
+ chainId: 7700,
2890
+ network: "mainnet",
2891
+ multicall: "0x9787792A1020B00fb65191754c3D87c89Bf36444",
2892
+ rpc: [
2893
+ "https://canto.neobase.one"
2894
+ ],
2895
+ explorer: {
2896
+ url: "https://evm.explorer.canto.io"
2897
+ },
2898
+ start: 1683285,
2899
+ logo: "ipfs://QmVh5XRi7xN4UNw7SNKpEhjF1TsPXJnRyNkB4EuMVTVCB6"
2884
2900
  },
2885
2901
  "8217": {
2886
2902
  key: "8217",
@@ -3424,10 +3440,8 @@ var networks = {
3424
3440
 
3425
3441
  var delegationSubgraphs = {
3426
3442
  "1": "https://gateway.thegraph.com/api/0f15b42bdeff7a063a4e1757d7e2f99e/deployments/id/QmXZiV6S13ha6QXq4dmaM3TB4CHcDxBMvGexSNu9Kc28EH",
3427
- "4": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-rinkeby",
3428
3443
  "5": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-goerli",
3429
3444
  "10": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-optimism",
3430
- "42": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-kovan",
3431
3445
  "56": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-binance-smart-chain",
3432
3446
  "100": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-gnosis-chain",
3433
3447
  "137": "https://api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-polygon",
@@ -3905,9 +3919,15 @@ function subgraphRequest(url, query, options) {
3905
3919
  })];
3906
3920
  case 1:
3907
3921
  res = _a.sent();
3908
- return [4 /*yield*/, res.json()];
3922
+ return [4 /*yield*/, res.text()];
3909
3923
  case 2:
3910
3924
  responseData = _a.sent();
3925
+ try {
3926
+ responseData = JSON.parse(responseData);
3927
+ }
3928
+ catch (e) {
3929
+ throw new Error("Errors found in subgraphRequest: " + url + " " + responseData);
3930
+ }
3911
3931
  if (responseData.errors) {
3912
3932
  throw new Error('Errors found in subgraphRequest: ' +
3913
3933
  url +