@sentio/sdk 2.57.2-rc.2 → 2.57.2-rc.4
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/aptos/aptos-processor.d.ts +1 -1
- package/lib/aptos/aptos-processor.d.ts.map +1 -1
- package/lib/aptos/aptos-processor.js +2 -2
- package/lib/aptos/aptos-processor.js.map +1 -1
- package/lib/aptos/aptos-resource-processor-template.d.ts +1 -0
- package/lib/aptos/aptos-resource-processor-template.d.ts.map +1 -1
- package/lib/aptos/aptos-resource-processor-template.js +4 -2
- package/lib/aptos/aptos-resource-processor-template.js.map +1 -1
- package/lib/eth/base-processor-template.d.ts +3 -0
- package/lib/eth/base-processor-template.d.ts.map +1 -1
- package/lib/eth/base-processor-template.js +7 -4
- package/lib/eth/base-processor-template.js.map +1 -1
- package/lib/eth/base-processor.d.ts +3 -3
- package/lib/eth/base-processor.d.ts.map +1 -1
- package/lib/eth/base-processor.js +6 -6
- package/lib/eth/base-processor.js.map +1 -1
- package/lib/fuel/fuel-processor-template.d.ts +3 -0
- package/lib/fuel/fuel-processor-template.d.ts.map +1 -1
- package/lib/fuel/fuel-processor-template.js +7 -4
- package/lib/fuel/fuel-processor-template.js.map +1 -1
- package/lib/fuel/fuel-processor.d.ts +3 -3
- package/lib/fuel/fuel-processor.d.ts.map +1 -1
- package/lib/fuel/fuel-processor.js +6 -6
- package/lib/fuel/fuel-processor.js.map +1 -1
- package/lib/sui/sui-object-processor-template.d.ts +1 -0
- package/lib/sui/sui-object-processor-template.d.ts.map +1 -1
- package/lib/sui/sui-object-processor-template.js +4 -2
- package/lib/sui/sui-object-processor-template.js.map +1 -1
- package/lib/sui/sui-object-processor.d.ts +1 -1
- package/lib/sui/sui-object-processor.d.ts.map +1 -1
- package/lib/sui/sui-object-processor.js +2 -2
- package/lib/sui/sui-object-processor.js.map +1 -1
- package/package.json +3 -3
- package/src/aptos/aptos-processor.ts +3 -2
- package/src/aptos/aptos-resource-processor-template.ts +11 -2
- package/src/eth/base-processor-template.ts +17 -4
- package/src/eth/base-processor.ts +9 -6
- package/src/fuel/fuel-processor-template.ts +10 -4
- package/src/fuel/fuel-processor.ts +9 -6
- package/src/sui/sui-object-processor-template.ts +11 -2
- package/src/sui/sui-object-processor.ts +3 -2
@@ -16,12 +16,13 @@ import { TemplateInstanceState } from '../core/template.js'
|
|
16
16
|
import { SuiBindOptions } from './sui-processor.js'
|
17
17
|
import { TransactionFilter, accountAddressString } from '../move/index.js'
|
18
18
|
import { ServerError, Status } from 'nice-grpc'
|
19
|
-
import { proxyProcessor } from '../utils/metrics.js'
|
19
|
+
import { getHandlerName, proxyProcessor } from '../utils/metrics.js'
|
20
20
|
|
21
21
|
class ObjectHandler<HandlerType> {
|
22
22
|
type?: string
|
23
23
|
checkpointInterval?: HandleInterval
|
24
24
|
timeIntervalInMinutes?: HandleInterval
|
25
|
+
handlerName: string
|
25
26
|
handler: HandlerType
|
26
27
|
fetchConfig: MoveAccountFetchConfig
|
27
28
|
}
|
@@ -68,7 +69,14 @@ export abstract class SuiObjectOrAddressProcessorTemplate<
|
|
68
69
|
|
69
70
|
const processor = this.createProcessor(options)
|
70
71
|
for (const h of this.objectHandlers) {
|
71
|
-
processor.onInterval(
|
72
|
+
processor.onInterval(
|
73
|
+
h.handler,
|
74
|
+
h.timeIntervalInMinutes,
|
75
|
+
h.checkpointInterval,
|
76
|
+
h.type,
|
77
|
+
h.fetchConfig,
|
78
|
+
h.handlerName
|
79
|
+
)
|
72
80
|
}
|
73
81
|
const config = processor.config
|
74
82
|
|
@@ -162,6 +170,7 @@ export abstract class SuiObjectOrAddressProcessorTemplate<
|
|
162
170
|
fetchConfig: Partial<MoveAccountFetchConfig> | undefined
|
163
171
|
): this {
|
164
172
|
this.objectHandlers.push({
|
173
|
+
handlerName: getHandlerName(),
|
165
174
|
handler: handler,
|
166
175
|
timeIntervalInMinutes: timeInterval,
|
167
176
|
checkpointInterval: checkpointInterval,
|
@@ -97,11 +97,12 @@ export abstract class SuiBaseObjectOrAddressProcessor<HandlerType> {
|
|
97
97
|
timeInterval: HandleInterval | undefined,
|
98
98
|
checkpointInterval: HandleInterval | undefined,
|
99
99
|
type: string | undefined,
|
100
|
-
fetchConfig: Partial<MoveAccountFetchConfig> | undefined
|
100
|
+
fetchConfig: Partial<MoveAccountFetchConfig> | undefined,
|
101
|
+
handlerName = getHandlerName()
|
101
102
|
): this {
|
102
103
|
const processor = this
|
103
104
|
this.objectHandlers.push({
|
104
|
-
handlerName
|
105
|
+
handlerName,
|
105
106
|
handler: async function (data) {
|
106
107
|
const ctx = new SuiObjectContext(
|
107
108
|
processor.config.network,
|