@snapshot-labs/snapshot.js 0.3.81 → 0.3.84

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.
@@ -1359,8 +1359,8 @@ var networks = {
1359
1359
  network: "mainnet",
1360
1360
  multicall: "0x1ee38d535d541c55c9dae27b12edf090c608e6fb",
1361
1361
  rpc: [
1362
- "https://apis.ankr.com/c0d871dd3c6d4529b01c9362a9b79e89/6106d4a3ec1d1bcc87ec72158f8fd089/binance/archive/main",
1363
1362
  "https://speedy-nodes-nyc.moralis.io/b9aed21e7bb7bdeb35972c9a/bsc/mainnet/archive",
1363
+ "https://apis.ankr.com/c0d871dd3c6d4529b01c9362a9b79e89/6106d4a3ec1d1bcc87ec72158f8fd089/binance/archive/main",
1364
1364
  "https://bsc.getblock.io/mainnet/?api_key=91f8195f-bf46-488f-846a-73d6853790e7",
1365
1365
  "https://bsc-private-dataseed1.nariox.org",
1366
1366
  "https://bsc-private-dataseed2.nariox.org",
@@ -1954,6 +1954,21 @@ var networks = {
1954
1954
  explorer: "https://moonbase-blockscout.testnet.moonbeam.network",
1955
1955
  start: 859041,
1956
1956
  logo: "ipfs://QmeGbNTU2Jqwg8qLTMGW8n8HSi2VdgCncAaeGzLx6gYnD7"
1957
+ },
1958
+ "1819": {
1959
+ key: "1819",
1960
+ name: "Cubechain testnet",
1961
+ shortName: "cube",
1962
+ chainId: 1819,
1963
+ network: "testnet",
1964
+ testnet: true,
1965
+ multicall: "0x5db2AB28beD8EBDDe5F7202F5a11fF7E78Ad1FB5",
1966
+ rpc: [
1967
+ "https://http-testnet-archive.cube.network"
1968
+ ],
1969
+ explorer: "https://testnet.cubescan.network",
1970
+ start: 0,
1971
+ logo: "ipfs://QmbENgHTymTUUArX5MZ2XXH69WGenirU3oamkRD448hYdz"
1957
1972
  },
1958
1973
  "4689": {
1959
1974
  key: "4689",
@@ -3136,7 +3151,7 @@ function getSpaceUri(id, network) {
3136
3151
  function getDelegatesBySpace(network, space, snapshot) {
3137
3152
  if (snapshot === void 0) { snapshot = 'latest'; }
3138
3153
  return __awaiter(this, void 0, void 0, function () {
3139
- var spaceIn, PAGE_SIZE, result, page, params, pageResult, pageDelegations, pageResult, pageDelegations;
3154
+ var spaceIn, PAGE_SIZE, result, page, params, pageResult, pageDelegations;
3140
3155
  return __generator(this, function (_a) {
3141
3156
  switch (_a.label) {
3142
3157
  case 0:
@@ -3175,24 +3190,7 @@ function getDelegatesBySpace(network, space, snapshot) {
3175
3190
  if (pageDelegations.length < PAGE_SIZE)
3176
3191
  return [3 /*break*/, 3];
3177
3192
  return [3 /*break*/, 1];
3178
- case 3:
3179
- // Global delegations are null in decentralized subgraph
3180
- page = 0;
3181
- delete params.delegations.__args.where.space_in;
3182
- _a.label = 4;
3183
- case 4:
3184
- params.delegations.__args.skip = page * PAGE_SIZE;
3185
- params.delegations.__args.where.space = null;
3186
- return [4 /*yield*/, subgraphRequest(SNAPSHOT_SUBGRAPH_URL[network], params)];
3187
- case 5:
3188
- pageResult = _a.sent();
3189
- pageDelegations = pageResult.delegations || [];
3190
- result = result.concat(pageDelegations);
3191
- page++;
3192
- if (pageDelegations.length < PAGE_SIZE)
3193
- return [3 /*break*/, 6];
3194
- return [3 /*break*/, 4];
3195
- case 6: return [2 /*return*/, result];
3193
+ case 3: return [2 /*return*/, result];
3196
3194
  }
3197
3195
  });
3198
3196
  });
@@ -1350,8 +1350,8 @@ var networks = {
1350
1350
  network: "mainnet",
1351
1351
  multicall: "0x1ee38d535d541c55c9dae27b12edf090c608e6fb",
1352
1352
  rpc: [
1353
- "https://apis.ankr.com/c0d871dd3c6d4529b01c9362a9b79e89/6106d4a3ec1d1bcc87ec72158f8fd089/binance/archive/main",
1354
1353
  "https://speedy-nodes-nyc.moralis.io/b9aed21e7bb7bdeb35972c9a/bsc/mainnet/archive",
1354
+ "https://apis.ankr.com/c0d871dd3c6d4529b01c9362a9b79e89/6106d4a3ec1d1bcc87ec72158f8fd089/binance/archive/main",
1355
1355
  "https://bsc.getblock.io/mainnet/?api_key=91f8195f-bf46-488f-846a-73d6853790e7",
1356
1356
  "https://bsc-private-dataseed1.nariox.org",
1357
1357
  "https://bsc-private-dataseed2.nariox.org",
@@ -1945,6 +1945,21 @@ var networks = {
1945
1945
  explorer: "https://moonbase-blockscout.testnet.moonbeam.network",
1946
1946
  start: 859041,
1947
1947
  logo: "ipfs://QmeGbNTU2Jqwg8qLTMGW8n8HSi2VdgCncAaeGzLx6gYnD7"
1948
+ },
1949
+ "1819": {
1950
+ key: "1819",
1951
+ name: "Cubechain testnet",
1952
+ shortName: "cube",
1953
+ chainId: 1819,
1954
+ network: "testnet",
1955
+ testnet: true,
1956
+ multicall: "0x5db2AB28beD8EBDDe5F7202F5a11fF7E78Ad1FB5",
1957
+ rpc: [
1958
+ "https://http-testnet-archive.cube.network"
1959
+ ],
1960
+ explorer: "https://testnet.cubescan.network",
1961
+ start: 0,
1962
+ logo: "ipfs://QmbENgHTymTUUArX5MZ2XXH69WGenirU3oamkRD448hYdz"
1948
1963
  },
1949
1964
  "4689": {
1950
1965
  key: "4689",
@@ -3127,7 +3142,7 @@ function getSpaceUri(id, network) {
3127
3142
  function getDelegatesBySpace(network, space, snapshot) {
3128
3143
  if (snapshot === void 0) { snapshot = 'latest'; }
3129
3144
  return __awaiter(this, void 0, void 0, function () {
3130
- var spaceIn, PAGE_SIZE, result, page, params, pageResult, pageDelegations, pageResult, pageDelegations;
3145
+ var spaceIn, PAGE_SIZE, result, page, params, pageResult, pageDelegations;
3131
3146
  return __generator(this, function (_a) {
3132
3147
  switch (_a.label) {
3133
3148
  case 0:
@@ -3166,24 +3181,7 @@ function getDelegatesBySpace(network, space, snapshot) {
3166
3181
  if (pageDelegations.length < PAGE_SIZE)
3167
3182
  return [3 /*break*/, 3];
3168
3183
  return [3 /*break*/, 1];
3169
- case 3:
3170
- // Global delegations are null in decentralized subgraph
3171
- page = 0;
3172
- delete params.delegations.__args.where.space_in;
3173
- _a.label = 4;
3174
- case 4:
3175
- params.delegations.__args.skip = page * PAGE_SIZE;
3176
- params.delegations.__args.where.space = null;
3177
- return [4 /*yield*/, subgraphRequest(SNAPSHOT_SUBGRAPH_URL[network], params)];
3178
- case 5:
3179
- pageResult = _a.sent();
3180
- pageDelegations = pageResult.delegations || [];
3181
- result = result.concat(pageDelegations);
3182
- page++;
3183
- if (pageDelegations.length < PAGE_SIZE)
3184
- return [3 /*break*/, 6];
3185
- return [3 /*break*/, 4];
3186
- case 6: return [2 /*return*/, result];
3184
+ case 3: return [2 /*return*/, result];
3187
3185
  }
3188
3186
  });
3189
3187
  });