@sentio/runtime 2.40.0-rc.2 → 2.40.0-rc.3

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.
@@ -78261,6 +78261,7 @@ function getProvider2(chainId) {
78261
78261
  const network = Network.from(parseInt(chainId));
78262
78262
  const address = Endpoints.INSTANCE.chainServer.get(chainId);
78263
78263
  const key = network.chainId.toString() + "-" + address;
78264
+ console.log(`init provider for ${chainId}, address: ${address}`);
78264
78265
  let provider = providers.get(key);
78265
78266
  if (provider) {
78266
78267
  return provider;
@@ -78442,7 +78443,7 @@ var ProcessorServiceImpl = class {
78442
78443
  };
78443
78444
  }
78444
78445
  async preprocessBindings(bindings, dbContext, options) {
78445
- console.log("preprocessBindings start");
78446
+ console.log(`preprocessBindings start, bindings: ${bindings.length}`);
78446
78447
  const promises = [];
78447
78448
  for (const binding of bindings) {
78448
78449
  promises.push(this.preprocessBinding(binding, dbContext, options));
@@ -78486,7 +78487,12 @@ var ProcessorServiceImpl = class {
78486
78487
  );
78487
78488
  }
78488
78489
  }
78489
- const results = Object.fromEntries(await Promise.all(callPromises));
78490
+ let results = {};
78491
+ try {
78492
+ results = Object.fromEntries(await Promise.all(callPromises));
78493
+ } catch (e) {
78494
+ console.error(`eth call error: ${e}`);
78495
+ }
78490
78496
  console.log(`${callPromises.length} calls finished, elapsed: ${Date.now() - start}ms`);
78491
78497
  return results;
78492
78498
  }
package/lib/index.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  errorString,
12
12
  mergeProcessResults,
13
13
  timeoutError
14
- } from "./chunk-WDKQZPD5.js";
14
+ } from "./chunk-Y3KJTCAS.js";
15
15
 
16
16
  // src/state.ts
17
17
  var _State = class {
@@ -40,7 +40,7 @@ import {
40
40
  require_minimal,
41
41
  require_src,
42
42
  trace
43
- } from "./chunk-WDKQZPD5.js";
43
+ } from "./chunk-Y3KJTCAS.js";
44
44
 
45
45
  // ../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
46
46
  var require_universalify = __commonJS({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/runtime",
3
- "version": "2.40.0-rc.2",
3
+ "version": "2.40.0-rc.3",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
package/src/provider.ts CHANGED
@@ -37,6 +37,8 @@ export function getProvider(chainId?: EthChainId): Provider {
37
37
 
38
38
  const address = Endpoints.INSTANCE.chainServer.get(chainId)
39
39
  const key = network.chainId.toString() + '-' + address
40
+
41
+ console.log(`init provider for ${chainId}, address: ${address}`)
40
42
  let provider = providers.get(key)
41
43
 
42
44
  if (provider) {
package/src/service.ts CHANGED
@@ -160,7 +160,7 @@ export class ProcessorServiceImpl implements ProcessorServiceImplementation {
160
160
  dbContext?: StoreContext,
161
161
  options?: CallContext
162
162
  ): Promise<{ [calldata: string]: any[] }> {
163
- console.log('preprocessBindings start')
163
+ console.log(`preprocessBindings start, bindings: ${bindings.length}`)
164
164
  const promises = []
165
165
  for (const binding of bindings) {
166
166
  promises.push(this.preprocessBinding(binding, dbContext, options))
@@ -208,7 +208,12 @@ export class ProcessorServiceImpl implements ProcessorServiceImplementation {
208
208
  )
209
209
  }
210
210
  }
211
- const results = Object.fromEntries(await Promise.all(callPromises))
211
+ let results = {}
212
+ try {
213
+ results = Object.fromEntries(await Promise.all(callPromises))
214
+ } catch (e) {
215
+ console.error(`eth call error: ${e}`)
216
+ }
212
217
  console.log(`${callPromises.length} calls finished, elapsed: ${Date.now() - start}ms`)
213
218
  return results
214
219
  }