@sentio/sdk 2.31.0-rc.8 → 2.31.0
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/builtin/0x1.js +1 -1
- package/lib/aptos/builtin/0x1.js.map +1 -1
- package/lib/aptos/builtin/0x3.js +1 -1
- package/lib/aptos/builtin/0x3.js.map +1 -1
- package/lib/aptos/builtin/0x4.js +1 -1
- package/lib/aptos/builtin/0x4.js.map +1 -1
- package/lib/eth/eth-plugin.d.ts.map +1 -1
- package/lib/eth/eth-plugin.js +25 -9
- package/lib/eth/eth-plugin.js.map +1 -1
- package/lib/eth/eth.test.js.map +1 -1
- package/lib/sui/builtin/0x1.js +1 -1
- package/lib/sui/builtin/0x1.js.map +1 -1
- package/lib/sui/builtin/0x2.js +1 -1
- package/lib/sui/builtin/0x2.js.map +1 -1
- package/lib/sui/builtin/0x3.js +1 -1
- package/lib/sui/builtin/0x3.js.map +1 -1
- package/lib/sui/sui-processor.d.ts.map +1 -1
- package/lib/sui/sui-processor.js +10 -10
- package/lib/sui/sui-processor.js.map +1 -1
- package/package.json +6 -6
- package/src/aptos/builtin/0x1.ts +1 -1
- package/src/aptos/builtin/0x3.ts +1 -1
- package/src/aptos/builtin/0x4.ts +1 -1
- package/src/eth/eth-plugin.ts +41 -33
- package/src/sui/builtin/0x1.ts +1 -1
- package/src/sui/builtin/0x2.ts +1 -1
- package/src/sui/builtin/0x3.ts +1 -1
- package/src/sui/sui-processor.ts +9 -12
package/src/sui/sui-processor.ts
CHANGED
@@ -6,7 +6,6 @@ import { SuiContext, SuiObjectChangeContext } from './context.js'
|
|
6
6
|
import { MoveCallSuiTransaction, SuiEvent, SuiTransactionBlockResponse, SuiObjectChange } from '@mysten/sui.js/client'
|
7
7
|
import {
|
8
8
|
accountAddressString,
|
9
|
-
accountTypeString,
|
10
9
|
CallHandler,
|
11
10
|
EventFilter,
|
12
11
|
EventHandler,
|
@@ -87,7 +86,7 @@ export class SuiBaseProcessor {
|
|
87
86
|
// const moduleName = this.moduleName
|
88
87
|
|
89
88
|
const processor = this
|
90
|
-
const allEventType = new Set(_filters.map((f) =>
|
89
|
+
const allEventType = new Set(_filters.map((f) => f.type))
|
91
90
|
|
92
91
|
this.eventHandlers.push({
|
93
92
|
handler: async function (data) {
|
@@ -101,8 +100,8 @@ export class SuiBaseProcessor {
|
|
101
100
|
|
102
101
|
const processResults = []
|
103
102
|
for (const [idx, evt] of (txn.events as SuiEvent[]).entries()) {
|
104
|
-
const
|
105
|
-
if (!allEventType.has(
|
103
|
+
const [_, module, type] = parseMoveType(evt.type).qname.split(SPLITTER)
|
104
|
+
if (!allEventType.has([module, type].join(SPLITTER))) {
|
106
105
|
continue
|
107
106
|
}
|
108
107
|
|
@@ -117,10 +116,10 @@ export class SuiBaseProcessor {
|
|
117
116
|
processor.config.baseLabels
|
118
117
|
)
|
119
118
|
|
120
|
-
const parts = typeQname.split(SPLITTER)
|
121
|
-
if (evt.packageId && parts[0] != evt.packageId) {
|
122
|
-
|
123
|
-
}
|
119
|
+
// const parts = typeQname.split(SPLITTER)
|
120
|
+
// if (evt.packageId && parts[0] != evt.packageId) {
|
121
|
+
// evt.type = evt.type.replace(parts[0], evt.packageId)
|
122
|
+
// }
|
124
123
|
const decoded = await processor.coder.decodeEvent<any>(evt)
|
125
124
|
await handler(decoded || evt, ctx)
|
126
125
|
processResults.push(ctx.stopAndGetResult())
|
@@ -149,9 +148,7 @@ export class SuiBaseProcessor {
|
|
149
148
|
}
|
150
149
|
|
151
150
|
const processor = this
|
152
|
-
const allFunctionType = new Set(
|
153
|
-
_filters.map((f) => accountTypeString(processor.config.address) + '::' + f.function)
|
154
|
-
)
|
151
|
+
const allFunctionType = new Set(_filters.map((f) => f.function))
|
155
152
|
|
156
153
|
this.callHandlers.push({
|
157
154
|
handler: async function (data) {
|
@@ -182,7 +179,7 @@ export class SuiBaseProcessor {
|
|
182
179
|
|
183
180
|
// TODO potential pass index
|
184
181
|
for (const call of calls) {
|
185
|
-
const functionType = [call.
|
182
|
+
const functionType = [call.module, call.function].join(SPLITTER)
|
186
183
|
if (!allFunctionType.has(functionType)) {
|
187
184
|
continue
|
188
185
|
}
|