@sentio/runtime 2.40.0-rc.21 → 2.40.0-rc.23
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/lib/{chunk-HF2KLDBY.js → chunk-EDSLVEVQ.js} +4958 -3318
- package/lib/index.d.ts +6 -1
- package/lib/index.js +5 -1
- package/lib/processor-runner.js +6 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/multicall.ts +1616 -0
- package/src/processor-runner.ts +5 -0
- package/src/provider.ts +1 -0
- package/src/service.ts +59 -11
package/lib/index.d.ts
CHANGED
@@ -5,6 +5,8 @@ import { AsyncLocalStorage } from 'node:async_hooks';
|
|
5
5
|
import { Required } from 'utility-types';
|
6
6
|
import { CallContext } from 'nice-grpc';
|
7
7
|
import _m0 from 'protobufjs/minimal.js';
|
8
|
+
import { JsonRpcProvider, Provider } from 'ethers';
|
9
|
+
import { EthChainId } from '@sentio/chain';
|
8
10
|
|
9
11
|
type Request = Omit<DBRequest, 'opId'>;
|
10
12
|
type RequestType = keyof Request;
|
@@ -374,4 +376,7 @@ interface GlobalConfig {
|
|
374
376
|
}
|
375
377
|
declare const GLOBAL_CONFIG: GlobalConfig;
|
376
378
|
|
377
|
-
|
379
|
+
declare const DummyProvider: JsonRpcProvider;
|
380
|
+
declare function getProvider(chainId?: EthChainId): Provider;
|
381
|
+
|
382
|
+
export { ChainConfig, DummyProvider, Endpoints, GLOBAL_CONFIG, GlobalConfig, ListStateStorage, MapStateStorage, Plugin, PluginManager, ProcessorServiceImpl, State, StateStorage, StoreContext, USER_PROCESSOR, errorString, getProvider, makeEthCallKey, mergeProcessResults, timeoutError };
|
package/lib/index.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
|
2
2
|
import {
|
3
|
+
DummyProvider,
|
3
4
|
Endpoints,
|
4
5
|
GLOBAL_CONFIG,
|
5
6
|
Plugin,
|
@@ -9,10 +10,11 @@ import {
|
|
9
10
|
USER_PROCESSOR,
|
10
11
|
__publicField,
|
11
12
|
errorString,
|
13
|
+
getProvider,
|
12
14
|
makeEthCallKey,
|
13
15
|
mergeProcessResults,
|
14
16
|
timeoutError
|
15
|
-
} from "./chunk-
|
17
|
+
} from "./chunk-EDSLVEVQ.js";
|
16
18
|
|
17
19
|
// src/state.ts
|
18
20
|
var _State = class {
|
@@ -76,6 +78,7 @@ var ListStateStorage = class extends StateStorage {
|
|
76
78
|
}
|
77
79
|
};
|
78
80
|
export {
|
81
|
+
DummyProvider,
|
79
82
|
Endpoints,
|
80
83
|
GLOBAL_CONFIG,
|
81
84
|
ListStateStorage,
|
@@ -88,6 +91,7 @@ export {
|
|
88
91
|
StoreContext,
|
89
92
|
USER_PROCESSOR,
|
90
93
|
errorString,
|
94
|
+
getProvider,
|
91
95
|
makeEthCallKey,
|
92
96
|
mergeProcessResults,
|
93
97
|
timeoutError
|
package/lib/processor-runner.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
|
3
3
|
import {
|
4
|
+
DiagConsoleLogger,
|
4
5
|
DiagLogLevel,
|
5
6
|
Endpoints,
|
6
7
|
ExecutionConfig,
|
@@ -40,7 +41,7 @@ import {
|
|
40
41
|
require_minimal,
|
41
42
|
require_src,
|
42
43
|
trace
|
43
|
-
} from "./chunk-
|
44
|
+
} from "./chunk-EDSLVEVQ.js";
|
44
45
|
|
45
46
|
// ../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
|
46
47
|
var require_universalify = __commonJS({
|
@@ -51346,6 +51347,7 @@ var import_sdk_node = __toESM(require_src7(), 1);
|
|
51346
51347
|
var import_exporter_metrics_otlp_grpc = __toESM(require_src8(), 1);
|
51347
51348
|
var import_exporter_trace_otlp_grpc = __toESM(require_src6(), 1);
|
51348
51349
|
init_esm7();
|
51350
|
+
init_esm();
|
51349
51351
|
var sdk = new import_sdk_node.NodeSDK({
|
51350
51352
|
traceExporter: new import_exporter_trace_otlp_grpc.OTLPTraceExporter(),
|
51351
51353
|
metricReader: new PeriodicExportingMetricReader({
|
@@ -51376,6 +51378,9 @@ var options = (0, import_command_line_args.default)(optionDefinitions, { partial
|
|
51376
51378
|
var logLevel = process.env["LOG_LEVEL"]?.toUpperCase();
|
51377
51379
|
setupLogger(options["log-format"] === "json", logLevel === "debug" ? true : options.debug);
|
51378
51380
|
console.debug("Starting with", options.target);
|
51381
|
+
if (options.debug) {
|
51382
|
+
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG);
|
51383
|
+
}
|
51379
51384
|
Error.stackTraceLimit = 20;
|
51380
51385
|
var fullPath = path4.resolve(options["chains-config"]);
|
51381
51386
|
var chainsConfig = import_fs_extra2.default.readJsonSync(fullPath);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED