@sentio/sdk 2.21.2 → 2.21.3-rc.2
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-chain-adapter.d.ts +0 -1
- package/lib/aptos/aptos-chain-adapter.d.ts.map +1 -1
- package/lib/aptos/aptos-chain-adapter.js +0 -4
- package/lib/aptos/aptos-chain-adapter.js.map +1 -1
- package/lib/aptos/aptos-plugin.d.ts.map +1 -1
- package/lib/aptos/aptos-plugin.js +2 -3
- 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 +3 -3
- package/lib/aptos/aptos-processor.js.map +1 -1
- package/lib/aptos/ext/coin.js +3 -3
- package/lib/aptos/ext/coin.js.map +1 -1
- package/lib/aptos/utils.d.ts +1 -2
- package/lib/aptos/utils.d.ts.map +1 -1
- package/lib/aptos/utils.js +14 -12
- package/lib/aptos/utils.js.map +1 -1
- package/lib/eth/codegen/functions-handler.js +1 -1
- package/lib/eth/codegen/functions-handler.js.map +1 -1
- package/lib/eth/provider.js +7 -0
- package/lib/eth/provider.js.map +1 -1
- package/lib/move/abstract-codegen.d.ts +2 -3
- package/lib/move/abstract-codegen.d.ts.map +1 -1
- package/lib/move/abstract-codegen.js +45 -45
- package/lib/move/abstract-codegen.js.map +1 -1
- package/lib/move/abstract-move-coder.js +1 -1
- package/lib/move/abstract-move-coder.js.map +1 -1
- package/lib/move/chain-adapter.d.ts +1 -1
- package/lib/move/chain-adapter.d.ts.map +1 -1
- package/lib/move/chain-adapter.js +4 -0
- package/lib/move/chain-adapter.js.map +1 -1
- package/lib/move/types.d.ts.map +1 -1
- package/lib/move/types.js +6 -1
- package/lib/move/types.js.map +1 -1
- package/lib/move/utils.d.ts +4 -0
- package/lib/move/utils.d.ts.map +1 -1
- package/lib/move/utils.js +28 -2
- package/lib/move/utils.js.map +1 -1
- package/lib/move/utils.test.d.ts +2 -0
- package/lib/move/utils.test.d.ts.map +1 -0
- package/lib/move/utils.test.js.map +1 -0
- package/lib/sui/builtin/0x3.d.ts +4 -4
- package/lib/sui/builtin/0x3.js +2 -2
- package/lib/sui/codegen/codegen.js +2 -2
- package/lib/sui/codegen/codegen.js.map +1 -1
- package/lib/sui/ext/coin.js +3 -3
- package/lib/sui/ext/coin.js.map +1 -1
- package/lib/sui/index.d.ts +0 -1
- package/lib/sui/index.d.ts.map +1 -1
- package/lib/sui/index.js +1 -1
- package/lib/sui/index.js.map +1 -1
- package/lib/sui/sui-chain-adapter.d.ts +0 -1
- package/lib/sui/sui-chain-adapter.d.ts.map +1 -1
- package/lib/sui/sui-chain-adapter.js +0 -4
- package/lib/sui/sui-chain-adapter.js.map +1 -1
- package/lib/sui/sui-plugin.d.ts.map +1 -1
- package/lib/sui/sui-plugin.js +2 -3
- 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 +4 -14
- package/lib/sui/sui-processor.js.map +1 -1
- package/lib/sui/utils.d.ts +1 -3
- package/lib/sui/utils.d.ts.map +1 -1
- package/lib/sui/utils.js +24 -26
- package/lib/sui/utils.js.map +1 -1
- package/lib/testing/aptos-facet.d.ts.map +1 -1
- package/lib/testing/aptos-facet.js +4 -2
- package/lib/testing/aptos-facet.js.map +1 -1
- package/lib/testing/sui-facet.d.ts.map +1 -1
- package/lib/testing/sui-facet.js +5 -4
- package/lib/testing/sui-facet.js.map +1 -1
- package/package.json +4 -5
- package/src/aptos/aptos-chain-adapter.ts +3 -4
- package/src/aptos/aptos-plugin.ts +2 -3
- package/src/aptos/aptos-processor.ts +11 -3
- package/src/aptos/ext/coin.ts +3 -3
- package/src/aptos/utils.ts +13 -13
- package/src/eth/codegen/functions-handler.ts +1 -1
- package/src/eth/provider.ts +7 -0
- package/src/move/abstract-codegen.ts +47 -49
- package/src/move/abstract-move-coder.ts +1 -1
- package/src/move/chain-adapter.ts +5 -1
- package/src/move/types.ts +6 -1
- package/src/move/utils.ts +36 -2
- package/src/sui/builtin/0x3.ts +6 -6
- package/src/sui/codegen/codegen.ts +2 -2
- package/src/sui/ext/coin.ts +3 -3
- package/src/sui/index.ts +1 -1
- package/src/sui/sui-chain-adapter.ts +3 -4
- package/src/sui/sui-plugin.ts +2 -3
- package/src/sui/sui-processor.ts +7 -15
- package/src/sui/utils.ts +24 -32
- package/src/testing/aptos-facet.ts +6 -2
- package/src/testing/sui-facet.ts +7 -4
@@ -3,6 +3,7 @@ import { DataBinding, HandlerType } from '@sentio/protos'
|
|
3
3
|
import { TestProcessorServer } from './test-processor-server.js'
|
4
4
|
import { AptosNetwork } from '@sentio/sdk/aptos'
|
5
5
|
import { parseMoveType } from '../move/types.js'
|
6
|
+
import { accountTypeString } from '../move/index.js'
|
6
7
|
|
7
8
|
export class AptosFacet {
|
8
9
|
server: TestProcessorServer
|
@@ -39,7 +40,7 @@ export class AptosFacet {
|
|
39
40
|
}
|
40
41
|
for (const callConfig of config.moveCallConfigs) {
|
41
42
|
for (const callFilter of callConfig.filters) {
|
42
|
-
if (config.contract.address + '::' + callFilter.function === payload.function) {
|
43
|
+
if (accountTypeString(config.contract.address) + '::' + callFilter.function === payload.function) {
|
43
44
|
return {
|
44
45
|
data: {
|
45
46
|
aptCall: {
|
@@ -76,7 +77,10 @@ export class AptosFacet {
|
|
76
77
|
for (const eventConfig of config.moveEventConfigs) {
|
77
78
|
for (const eventFilter of eventConfig.filters) {
|
78
79
|
for (const event of transaction.events) {
|
79
|
-
if (
|
80
|
+
if (
|
81
|
+
accountTypeString(config.contract.address) + '::' + eventFilter.type ===
|
82
|
+
parseMoveType(event.type).qname
|
83
|
+
) {
|
80
84
|
return {
|
81
85
|
data: {
|
82
86
|
aptEvent: {
|
package/src/testing/sui-facet.ts
CHANGED
@@ -4,7 +4,7 @@ import { TestProcessorServer } from './test-processor-server.js'
|
|
4
4
|
import { parseMoveType } from '../move/types.js'
|
5
5
|
import { SuiNetwork } from '../sui/index.js'
|
6
6
|
import { getMoveCalls } from '../sui/utils.js'
|
7
|
-
import { SPLITTER } from '../move/index.js'
|
7
|
+
import { accountTypeString, SPLITTER } from '../move/index.js'
|
8
8
|
|
9
9
|
export class SuiFacet {
|
10
10
|
server: TestProcessorServer
|
@@ -39,7 +39,7 @@ export class SuiFacet {
|
|
39
39
|
// throw Error('Transaction has more than one calls')
|
40
40
|
// }
|
41
41
|
for (const call of calls) {
|
42
|
-
const functionType = [call.package, call.module, call.function].join(SPLITTER)
|
42
|
+
const functionType = [accountTypeString(call.package), call.module, call.function].join(SPLITTER)
|
43
43
|
|
44
44
|
for (const config of this.server.contractConfigs) {
|
45
45
|
if (config.contract?.chainId !== network) {
|
@@ -47,7 +47,7 @@ export class SuiFacet {
|
|
47
47
|
}
|
48
48
|
for (const callConfig of config.moveCallConfigs) {
|
49
49
|
for (const callFilter of callConfig.filters) {
|
50
|
-
if (config.contract.address + '::' + callFilter.function === functionType) {
|
50
|
+
if (accountTypeString(config.contract.address) + '::' + callFilter.function === functionType) {
|
51
51
|
return {
|
52
52
|
data: {
|
53
53
|
suiCall: {
|
@@ -88,7 +88,10 @@ export class SuiFacet {
|
|
88
88
|
for (const eventConfig of config.moveEventConfigs) {
|
89
89
|
for (const eventFilter of eventConfig.filters) {
|
90
90
|
for (const event of transaction.events || []) {
|
91
|
-
if (
|
91
|
+
if (
|
92
|
+
accountTypeString(config.contract.address) + '::' + eventFilter.type ===
|
93
|
+
parseMoveType(event.type).qname
|
94
|
+
) {
|
92
95
|
return {
|
93
96
|
data: {
|
94
97
|
suiEvent: {
|