@sentio/sdk 2.53.3-rc.5 → 2.54.0-rc.10
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-plugin.d.ts.map +1 -1
- package/lib/aptos/aptos-plugin.js +6 -2
- package/lib/aptos/aptos-plugin.js.map +1 -1
- package/lib/aptos/aptos-processor.d.ts.map +1 -1
- package/lib/aptos/aptos-processor.js +7 -0
- package/lib/aptos/aptos-processor.js.map +1 -1
- package/lib/aptos/builtin/0x1.d.ts +840 -815
- package/lib/aptos/builtin/0x1.d.ts.map +1 -1
- package/lib/aptos/builtin/0x1.js +1200 -1137
- package/lib/aptos/builtin/0x1.js.map +1 -1
- package/lib/aptos/builtin/0x3.d.ts +67 -52
- package/lib/aptos/builtin/0x3.d.ts.map +1 -1
- package/lib/aptos/builtin/0x3.js +66 -53
- package/lib/aptos/builtin/0x3.js.map +1 -1
- package/lib/aptos/builtin/0x4.d.ts +113 -113
- package/lib/aptos/builtin/0x4.d.ts.map +1 -1
- package/lib/aptos/builtin/0x4.js +149 -149
- package/lib/aptos/builtin/0x4.js.map +1 -1
- package/lib/btc/btc-plugin.d.ts.map +1 -1
- package/lib/btc/btc-plugin.js +5 -2
- package/lib/btc/btc-plugin.js.map +1 -1
- package/lib/btc/btc-processor.d.ts +1 -0
- package/lib/btc/btc-processor.d.ts.map +1 -1
- package/lib/btc/btc-processor.js +1 -0
- package/lib/btc/btc-processor.js.map +1 -1
- package/lib/cosmos/cosmos-plugin.d.ts.map +1 -1
- package/lib/cosmos/cosmos-plugin.js +1 -0
- package/lib/cosmos/cosmos-plugin.js.map +1 -1
- package/lib/cosmos/cosmos-processor.d.ts.map +1 -1
- package/lib/cosmos/cosmos-processor.js +3 -0
- package/lib/cosmos/cosmos-processor.js.map +1 -1
- package/lib/cosmos/types.d.ts +1 -0
- package/lib/cosmos/types.d.ts.map +1 -1
- package/lib/eth/base-processor.d.ts.map +1 -1
- package/lib/eth/base-processor.js +1 -0
- package/lib/eth/base-processor.js.map +1 -1
- package/lib/fuel/asset-processor.d.ts.map +1 -1
- package/lib/fuel/asset-processor.js +3 -0
- package/lib/fuel/asset-processor.js.map +1 -1
- package/lib/fuel/base-processor.d.ts.map +1 -1
- package/lib/fuel/base-processor.js +2 -0
- package/lib/fuel/base-processor.js.map +1 -1
- package/lib/fuel/fuel-plugin.d.ts +4 -2
- package/lib/fuel/fuel-plugin.d.ts.map +1 -1
- package/lib/fuel/fuel-plugin.js +58 -25
- package/lib/fuel/fuel-plugin.js.map +1 -1
- package/lib/fuel/fuel-processor.d.ts +3 -2
- package/lib/fuel/fuel-processor.d.ts.map +1 -1
- package/lib/fuel/fuel-processor.js +22 -24
- package/lib/fuel/fuel-processor.js.map +1 -1
- package/lib/fuel/global-processor.d.ts.map +1 -1
- package/lib/fuel/global-processor.js +3 -0
- package/lib/fuel/global-processor.js.map +1 -1
- package/lib/fuel/transaction.d.ts +5 -1
- package/lib/fuel/transaction.d.ts.map +1 -1
- package/lib/fuel/transaction.js +17 -10
- package/lib/fuel/transaction.js.map +1 -1
- package/lib/fuel/types.d.ts +7 -1
- package/lib/fuel/types.d.ts.map +1 -1
- package/lib/fuel/types.js.map +1 -1
- package/lib/move/filter.d.ts +4 -0
- package/lib/move/filter.d.ts.map +1 -1
- package/lib/move/filter.js +4 -0
- package/lib/move/filter.js.map +1 -1
- package/lib/stark/starknet-plugin.d.ts.map +1 -1
- package/lib/stark/starknet-plugin.js +2 -1
- package/lib/stark/starknet-plugin.js.map +1 -1
- package/lib/stark/starknet-processor.d.ts +1 -0
- package/lib/stark/starknet-processor.d.ts.map +1 -1
- package/lib/stark/starknet-processor.js +4 -0
- package/lib/stark/starknet-processor.js.map +1 -1
- package/lib/store/codegen.js +22 -5
- package/lib/store/codegen.js.map +1 -1
- package/lib/sui/builtin/0x1.d.ts +83 -0
- package/lib/sui/builtin/0x1.d.ts.map +1 -1
- package/lib/sui/builtin/0x1.js +345 -1
- package/lib/sui/builtin/0x1.js.map +1 -1
- package/lib/sui/context.d.ts +1 -0
- package/lib/sui/context.d.ts.map +1 -1
- package/lib/sui/context.js +2 -0
- package/lib/sui/context.js.map +1 -1
- package/lib/sui/sui-object-processor.d.ts.map +1 -1
- package/lib/sui/sui-object-processor.js +2 -0
- package/lib/sui/sui-object-processor.js.map +1 -1
- package/lib/sui/sui-plugin.d.ts.map +1 -1
- package/lib/sui/sui-plugin.js +10 -5
- package/lib/sui/sui-plugin.js.map +1 -1
- package/lib/sui/sui-processor.d.ts.map +1 -1
- package/lib/sui/sui-processor.js +6 -0
- package/lib/sui/sui-processor.js.map +1 -1
- package/lib/testing/fuel-facet.d.ts.map +1 -1
- package/lib/testing/fuel-facet.js +8 -7
- package/lib/testing/fuel-facet.js.map +1 -1
- package/package.json +8 -8
- package/src/aptos/abis/0x1.json +3816 -3657
- package/src/aptos/abis/0x3.json +247 -219
- package/src/aptos/abis/0x4.json +576 -576
- package/src/aptos/aptos-plugin.ts +6 -2
- package/src/aptos/aptos-processor.ts +8 -0
- package/src/aptos/builtin/0x1.ts +2374 -2235
- package/src/aptos/builtin/0x3.ts +154 -113
- package/src/aptos/builtin/0x4.ts +280 -282
- package/src/btc/btc-plugin.ts +5 -2
- package/src/btc/btc-processor.ts +2 -0
- package/src/cosmos/cosmos-plugin.ts +1 -0
- package/src/cosmos/cosmos-processor.ts +5 -1
- package/src/cosmos/types.ts +1 -0
- package/src/eth/base-processor.ts +2 -0
- package/src/fuel/asset-processor.ts +5 -1
- package/src/fuel/base-processor.ts +2 -0
- package/src/fuel/fuel-plugin.ts +66 -24
- package/src/fuel/fuel-processor.ts +38 -31
- package/src/fuel/global-processor.ts +5 -1
- package/src/fuel/transaction.ts +18 -9
- package/src/fuel/types.ts +8 -0
- package/src/move/filter.ts +4 -0
- package/src/stark/starknet-plugin.ts +2 -1
- package/src/stark/starknet-processor.ts +7 -1
- package/src/store/codegen.ts +20 -4
- package/src/sui/abis/0x1.json +391 -0
- package/src/sui/builtin/0x1.ts +510 -1
- package/src/sui/context.ts +2 -0
- package/src/sui/sui-object-processor.ts +2 -0
- package/src/sui/sui-plugin.ts +10 -5
- package/src/sui/sui-processor.ts +7 -0
- package/src/testing/fuel-facet.ts +8 -7
package/src/sui/context.ts
CHANGED
@@ -179,6 +179,7 @@ export class SuiAddressContext extends MoveAccountContext<
|
|
179
179
|
export class SuiObjectContext extends SuiAddressContext {
|
180
180
|
contractName = 'object'
|
181
181
|
objectId: string
|
182
|
+
objectVersion: bigint
|
182
183
|
|
183
184
|
constructor(
|
184
185
|
network: SuiNetwork,
|
@@ -190,5 +191,6 @@ export class SuiObjectContext extends SuiAddressContext {
|
|
190
191
|
) {
|
191
192
|
super(network, objectId, checkpoint, timestamp, baseLabels)
|
192
193
|
this.objectId = objectId
|
194
|
+
this.objectVersion = objectVersion
|
193
195
|
}
|
194
196
|
}
|
@@ -196,6 +196,7 @@ export class SuiAddressProcessor extends SuiBaseObjectOrAddressProcessorInternal
|
|
196
196
|
const processor = this
|
197
197
|
|
198
198
|
this.callHandlers.push({
|
199
|
+
handlerName: getHandlerName(),
|
199
200
|
handler: async function (data) {
|
200
201
|
if (!data.transaction) {
|
201
202
|
throw new ServerError(Status.INVALID_ARGUMENT, 'transaction is null')
|
@@ -290,6 +291,7 @@ export class SuiObjectTypeProcessor<T> extends SuiBaseObjectOrAddressProcessor<
|
|
290
291
|
}
|
291
292
|
const processor = this
|
292
293
|
this.objectChangeHandlers.push({
|
294
|
+
handlerName: getHandlerName(),
|
293
295
|
handler: async function (data: Data_SuiObjectChange) {
|
294
296
|
const ctx = new SuiObjectChangeContext(
|
295
297
|
processor.config.network,
|
package/src/sui/sui-plugin.ts
CHANGED
@@ -100,7 +100,8 @@ export class SuiPlugin extends Plugin {
|
|
100
100
|
}
|
101
101
|
}),
|
102
102
|
fetchConfig: handler.fetchConfig,
|
103
|
-
handlerId
|
103
|
+
handlerId,
|
104
|
+
handlerName: handler.handlerName
|
104
105
|
}
|
105
106
|
contractConfig.moveEventConfigs.push(eventHandlerConfig)
|
106
107
|
}
|
@@ -118,7 +119,8 @@ export class SuiPlugin extends Plugin {
|
|
118
119
|
}
|
119
120
|
}),
|
120
121
|
fetchConfig: handler.fetchConfig,
|
121
|
-
handlerId
|
122
|
+
handlerId,
|
123
|
+
handlerName: handler.handlerName
|
122
124
|
}
|
123
125
|
contractConfig.moveCallConfigs.push(functionHandlerConfig)
|
124
126
|
}
|
@@ -127,7 +129,8 @@ export class SuiPlugin extends Plugin {
|
|
127
129
|
const handlerId = handlers.suiObjectChangeHandlers.push(handler.handler) - 1
|
128
130
|
const objectChangeHandler: MoveResourceChangeConfig = {
|
129
131
|
type: handler.type,
|
130
|
-
handlerId
|
132
|
+
handlerId,
|
133
|
+
handlerName: handler.handlerName
|
131
134
|
}
|
132
135
|
contractConfig.moveResourceChangeConfigs.push(objectChangeHandler)
|
133
136
|
}
|
@@ -145,7 +148,8 @@ export class SuiPlugin extends Plugin {
|
|
145
148
|
const handlerId = handlers.suiObjectChangeHandlers.push(handler.handler) - 1
|
146
149
|
const objectChangeHandler: MoveResourceChangeConfig = {
|
147
150
|
type: handler.type,
|
148
|
-
handlerId
|
151
|
+
handlerId,
|
152
|
+
handlerName: handler.handlerName
|
149
153
|
}
|
150
154
|
accountConfig.moveResourceChangeConfigs.push(objectChangeHandler)
|
151
155
|
}
|
@@ -185,7 +189,8 @@ export class SuiPlugin extends Plugin {
|
|
185
189
|
}
|
186
190
|
}),
|
187
191
|
fetchConfig: handler.fetchConfig,
|
188
|
-
handlerId
|
192
|
+
handlerId,
|
193
|
+
handlerName: handler.handlerName
|
189
194
|
}
|
190
195
|
accountConfig.moveCallConfigs.push(functionHandlerConfig)
|
191
196
|
}
|
package/src/sui/sui-processor.ts
CHANGED
@@ -19,6 +19,7 @@ import { getMoveCalls } from './utils.js'
|
|
19
19
|
import { defaultMoveCoder, MoveCoder } from './index.js'
|
20
20
|
import { ALL_ADDRESS, Labels } from '../core/index.js'
|
21
21
|
import { Required } from 'utility-types'
|
22
|
+
import { getHandlerName, proxyProcessor } from '../utils/metrics.js'
|
22
23
|
|
23
24
|
export const DEFAULT_FETCH_CONFIG: MoveFetchConfig = {
|
24
25
|
resourceChanges: false,
|
@@ -63,6 +64,8 @@ export class SuiBaseProcessor {
|
|
63
64
|
this.config = configure(options)
|
64
65
|
SuiProcessorState.INSTANCE.addValue(this)
|
65
66
|
this.coder = defaultMoveCoder(this.config.network)
|
67
|
+
|
68
|
+
return proxyProcessor(this)
|
66
69
|
}
|
67
70
|
|
68
71
|
getChainId(): string {
|
@@ -90,6 +93,7 @@ export class SuiBaseProcessor {
|
|
90
93
|
const allEventType = new Set(_filters.map((f) => f.type))
|
91
94
|
|
92
95
|
this.eventHandlers.push({
|
96
|
+
handlerName: getHandlerName(),
|
93
97
|
handler: async function (data) {
|
94
98
|
if (!data.transaction) {
|
95
99
|
throw new ServerError(Status.INVALID_ARGUMENT, 'event is null')
|
@@ -153,6 +157,7 @@ export class SuiBaseProcessor {
|
|
153
157
|
const allFunctionType = new Set(_filters.map((f) => f.function))
|
154
158
|
|
155
159
|
this.callHandlers.push({
|
160
|
+
handlerName: getHandlerName(),
|
156
161
|
handler: async function (data) {
|
157
162
|
if (!data.transaction) {
|
158
163
|
throw new ServerError(Status.INVALID_ARGUMENT, 'call is null')
|
@@ -214,6 +219,7 @@ export class SuiBaseProcessor {
|
|
214
219
|
const processor = this
|
215
220
|
|
216
221
|
this.callHandlers.push({
|
222
|
+
handlerName: getHandlerName(),
|
217
223
|
handler: async function (data) {
|
218
224
|
if (!data.transaction) {
|
219
225
|
throw new ServerError(Status.INVALID_ARGUMENT, 'transaction is null')
|
@@ -250,6 +256,7 @@ export class SuiBaseProcessor {
|
|
250
256
|
}
|
251
257
|
const processor = this
|
252
258
|
this.objectChangeHandlers.push({
|
259
|
+
handlerName: getHandlerName(),
|
253
260
|
handler: async function (data: Data_SuiObjectChange) {
|
254
261
|
const ctx = new SuiObjectChangeContext(
|
255
262
|
processor.config.network,
|
@@ -30,13 +30,13 @@ export class FuelFacet {
|
|
30
30
|
for (const callConfig of config.fuelCallConfigs) {
|
31
31
|
const binding = {
|
32
32
|
data: {
|
33
|
-
|
33
|
+
fuelTransaction: {
|
34
34
|
transaction,
|
35
35
|
timestamp: new Date()
|
36
36
|
}
|
37
37
|
},
|
38
38
|
handlerIds: [callConfig.handlerId],
|
39
|
-
handlerType: HandlerType.
|
39
|
+
handlerType: HandlerType.FUEL_TRANSACTION
|
40
40
|
}
|
41
41
|
|
42
42
|
const filter = callConfig.filters[0]?.function
|
@@ -55,13 +55,14 @@ export class FuelFacet {
|
|
55
55
|
for (const logConfig of config.fuelLogConfigs) {
|
56
56
|
const binding = {
|
57
57
|
data: {
|
58
|
-
|
58
|
+
fuelLog: {
|
59
59
|
transaction,
|
60
|
-
timestamp: new Date()
|
60
|
+
timestamp: new Date(),
|
61
|
+
receiptIndex: BigInt(transaction.status.receipts.findIndex((r: any) => r.rb == logConfig.logIds[0]))
|
61
62
|
}
|
62
63
|
},
|
63
64
|
handlerIds: [logConfig.handlerId],
|
64
|
-
handlerType: HandlerType.
|
65
|
+
handlerType: HandlerType.FUEL_RECEIPT
|
65
66
|
}
|
66
67
|
|
67
68
|
const logIds = logConfig.logIds
|
@@ -76,13 +77,13 @@ export class FuelFacet {
|
|
76
77
|
for (const assetConfig of config.assetConfigs) {
|
77
78
|
const binding = {
|
78
79
|
data: {
|
79
|
-
|
80
|
+
fuelTransaction: {
|
80
81
|
transaction,
|
81
82
|
timestamp: new Date()
|
82
83
|
}
|
83
84
|
},
|
84
85
|
handlerIds: [assetConfig.handlerId],
|
85
|
-
handlerType: HandlerType.
|
86
|
+
handlerType: HandlerType.FUEL_TRANSACTION
|
86
87
|
}
|
87
88
|
|
88
89
|
res.push(binding)
|