@sentio/sdk 2.1.6-rc.1 → 2.2.0-rc.1

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.
Files changed (97) hide show
  1. package/lib/aptos/aptos-plugin.js +5 -13
  2. package/lib/aptos/aptos-plugin.js.map +1 -1
  3. package/lib/aptos/aptos-processor.d.ts +5 -28
  4. package/lib/aptos/aptos-processor.js +4 -14
  5. package/lib/aptos/aptos-processor.js.map +1 -1
  6. package/lib/aptos/builtin/0x1.d.ts +116 -115
  7. package/lib/aptos/builtin/0x1.js +0 -1
  8. package/lib/aptos/builtin/0x1.js.map +1 -1
  9. package/lib/aptos/builtin/0x3.d.ts +28 -27
  10. package/lib/aptos/builtin/0x3.js +0 -1
  11. package/lib/aptos/builtin/0x3.js.map +1 -1
  12. package/lib/aptos/codegen/codegen.js +5 -5
  13. package/lib/aptos/codegen/codegen.js.map +1 -1
  14. package/lib/aptos/index.d.ts +0 -1
  15. package/lib/aptos/index.js.map +1 -1
  16. package/lib/aptos/tests/types/reserved.d.ts +21 -20
  17. package/lib/aptos/tests/types/reserved.js +0 -1
  18. package/lib/aptos/tests/types/reserved.js.map +1 -1
  19. package/lib/aptos/tests/types/soffl3.d.ts +37 -36
  20. package/lib/aptos/tests/types/soffl3.js +0 -1
  21. package/lib/aptos/tests/types/soffl3.js.map +1 -1
  22. package/lib/aptos/tests/types/souffle.d.ts +21 -20
  23. package/lib/aptos/tests/types/souffle.js +0 -1
  24. package/lib/aptos/tests/types/souffle.js.map +1 -1
  25. package/lib/core/chain.d.ts +3 -2
  26. package/lib/core/chain.js +3 -2
  27. package/lib/core/chain.js.map +1 -1
  28. package/lib/core/index.d.ts +0 -2
  29. package/lib/core/index.js +0 -2
  30. package/lib/core/index.js.map +1 -1
  31. package/lib/eth/context.d.ts +0 -7
  32. package/lib/eth/context.js +0 -24
  33. package/lib/eth/context.js.map +1 -1
  34. package/lib/eth/eth-plugin.js +4 -14
  35. package/lib/eth/eth-plugin.js.map +1 -1
  36. package/lib/move/index.d.ts +25 -0
  37. package/lib/move/index.js +11 -0
  38. package/lib/move/index.js.map +1 -0
  39. package/lib/solana/solana-plugin.js +3 -10
  40. package/lib/solana/solana-plugin.js.map +1 -1
  41. package/lib/sui/context.d.ts +13 -0
  42. package/lib/sui/context.js +33 -0
  43. package/lib/sui/context.js.map +1 -0
  44. package/lib/sui/index.d.ts +2 -0
  45. package/lib/sui/index.js +3 -0
  46. package/lib/sui/index.js.map +1 -0
  47. package/lib/sui/models.d.ts +8 -0
  48. package/lib/sui/models.js +25 -0
  49. package/lib/sui/models.js.map +1 -0
  50. package/lib/sui/network.d.ts +11 -0
  51. package/lib/sui/network.js +26 -0
  52. package/lib/sui/network.js.map +1 -0
  53. package/lib/sui/sui-plugin.d.ts +12 -0
  54. package/lib/sui/sui-plugin.js +96 -0
  55. package/lib/sui/sui-plugin.js.map +1 -0
  56. package/lib/sui/sui-processor.d.ts +29 -0
  57. package/lib/sui/sui-processor.js +120 -0
  58. package/lib/sui/sui-processor.js.map +1 -0
  59. package/lib/sui/tests/sui.test.d.ts +1 -0
  60. package/lib/sui/tests/sui.test.js.map +1 -0
  61. package/lib/testing/test-processor-server.d.ts +1 -0
  62. package/lib/testing/test-processor-server.js +3 -0
  63. package/lib/testing/test-processor-server.js.map +1 -1
  64. package/package.json +14 -7
  65. package/src/aptos/aptos-plugin.ts +8 -16
  66. package/src/aptos/aptos-processor.ts +8 -46
  67. package/src/aptos/builtin/0x1.ts +115 -115
  68. package/src/aptos/builtin/0x3.ts +27 -27
  69. package/src/aptos/codegen/codegen.ts +5 -5
  70. package/src/aptos/index.ts +0 -1
  71. package/src/aptos/tests/types/reserved.ts +20 -20
  72. package/src/aptos/tests/types/soffl3.ts +36 -36
  73. package/src/aptos/tests/types/souffle.ts +20 -20
  74. package/src/core/chain.ts +4 -3
  75. package/src/core/index.ts +0 -3
  76. package/src/eth/context.ts +0 -26
  77. package/src/eth/eth-plugin.ts +3 -13
  78. package/src/move/index.ts +33 -0
  79. package/src/solana/solana-plugin.ts +2 -9
  80. package/src/sui/abis/0x1.json +2067 -0
  81. package/src/sui/abis/0x2.json +15598 -0
  82. package/src/sui/context.ts +43 -0
  83. package/src/sui/index.ts +3 -0
  84. package/src/sui/models.ts +38 -0
  85. package/src/sui/network.ts +28 -0
  86. package/src/sui/sui-plugin.ts +122 -0
  87. package/src/sui/sui-processor.ts +159 -0
  88. package/src/testing/test-processor-server.ts +4 -0
  89. package/lib/core/sui-plugin.d.ts +0 -8
  90. package/lib/core/sui-plugin.js +0 -42
  91. package/lib/core/sui-plugin.js.map +0 -1
  92. package/lib/core/sui-processor.d.ts +0 -25
  93. package/lib/core/sui-processor.js +0 -43
  94. package/lib/core/sui-processor.js.map +0 -1
  95. package/src/aptos/codegen/tsconfig.json +0 -8
  96. package/src/core/sui-plugin.ts +0 -48
  97. package/src/core/sui-processor.ts +0 -58
@@ -4,6 +4,7 @@
4
4
 
5
5
  /* Generated modules for account 0xf6994988bd40261af9431cd6dd3fcf765569719e66322c7a05cc78a89cd366d4 */
6
6
 
7
+ import { CallFilter } from "@sentio/sdk/move";
7
8
  import {
8
9
  MoveCoder,
9
10
  AptosBindOptions,
@@ -12,9 +13,8 @@ import {
12
13
  AptosNetwork,
13
14
  TypedEntryFunctionPayload,
14
15
  AptosContext,
15
- CallFilter,
16
16
  } from "@sentio/sdk/aptos";
17
- import { AptosFetchConfig } from "@sentio/protos";
17
+ import { MoveFetchConfig } from "@sentio/protos";
18
18
  import { Address, MoveModule } from "@sentio/sdk/aptos";
19
19
 
20
20
  import { _0x3 } from "@sentio/sdk/aptos/builtin";
@@ -37,7 +37,7 @@ export class Aggregator extends AptosBaseProcessor {
37
37
  onEntryBatchBuyScriptV1(
38
38
  func: (call: Aggregator.BatchBuyScriptV1Payload, ctx: AptosContext) => void,
39
39
  filter?: CallFilter,
40
- fetchConfig?: AptosFetchConfig
40
+ fetchConfig?: MoveFetchConfig
41
41
  ): Aggregator {
42
42
  this.onEntryFunctionCall(
43
43
  func,
@@ -56,7 +56,7 @@ export class Aggregator extends AptosBaseProcessor {
56
56
  ctx: AptosContext
57
57
  ) => void,
58
58
  filter?: CallFilter,
59
- fetchConfig?: AptosFetchConfig
59
+ fetchConfig?: MoveFetchConfig
60
60
  ): Aggregator {
61
61
  this.onEntryFunctionCall(
62
62
  func,
@@ -75,7 +75,7 @@ export class Aggregator extends AptosBaseProcessor {
75
75
  ctx: AptosContext
76
76
  ) => void,
77
77
  filter?: CallFilter,
78
- fetchConfig?: AptosFetchConfig
78
+ fetchConfig?: MoveFetchConfig
79
79
  ): Aggregator {
80
80
  this.onEntryFunctionCall(
81
81
  func,
@@ -304,7 +304,7 @@ export class token_coin_swap extends AptosBaseProcessor {
304
304
  ctx: AptosContext
305
305
  ) => void,
306
306
  filter?: CallFilter,
307
- fetchConfig?: AptosFetchConfig
307
+ fetchConfig?: MoveFetchConfig
308
308
  ): token_coin_swap {
309
309
  this.onEntryFunctionCall(
310
310
  func,
@@ -322,7 +322,7 @@ export class token_coin_swap extends AptosBaseProcessor {
322
322
  event: token_coin_swap.TokenListingEventInstance,
323
323
  ctx: AptosContext
324
324
  ) => void,
325
- fetchConfig?: AptosFetchConfig
325
+ fetchConfig?: MoveFetchConfig
326
326
  ): token_coin_swap {
327
327
  this.onEvent(
328
328
  func,
@@ -339,7 +339,7 @@ export class token_coin_swap extends AptosBaseProcessor {
339
339
  event: token_coin_swap.TokenSwapEventInstance,
340
340
  ctx: AptosContext
341
341
  ) => void,
342
- fetchConfig?: AptosFetchConfig
342
+ fetchConfig?: MoveFetchConfig
343
343
  ): token_coin_swap {
344
344
  this.onEvent(
345
345
  func,
@@ -467,7 +467,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
467
467
  onEntryAddAcl(
468
468
  func: (call: FixedPriceMarket.AddAclPayload, ctx: AptosContext) => void,
469
469
  filter?: CallFilter,
470
- fetchConfig?: AptosFetchConfig
470
+ fetchConfig?: MoveFetchConfig
471
471
  ): FixedPriceMarket {
472
472
  this.onEntryFunctionCall(
473
473
  func,
@@ -486,7 +486,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
486
486
  ctx: AptosContext
487
487
  ) => void,
488
488
  filter?: CallFilter,
489
- fetchConfig?: AptosFetchConfig
489
+ fetchConfig?: MoveFetchConfig
490
490
  ): FixedPriceMarket {
491
491
  this.onEntryFunctionCall(
492
492
  func,
@@ -505,7 +505,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
505
505
  ctx: AptosContext
506
506
  ) => void,
507
507
  filter?: CallFilter,
508
- fetchConfig?: AptosFetchConfig
508
+ fetchConfig?: MoveFetchConfig
509
509
  ): FixedPriceMarket {
510
510
  this.onEntryFunctionCall(
511
511
  func,
@@ -524,7 +524,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
524
524
  ctx: AptosContext
525
525
  ) => void,
526
526
  filter?: CallFilter,
527
- fetchConfig?: AptosFetchConfig
527
+ fetchConfig?: MoveFetchConfig
528
528
  ): FixedPriceMarket {
529
529
  this.onEntryFunctionCall(
530
530
  func,
@@ -543,7 +543,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
543
543
  ctx: AptosContext
544
544
  ) => void,
545
545
  filter?: CallFilter,
546
- fetchConfig?: AptosFetchConfig
546
+ fetchConfig?: MoveFetchConfig
547
547
  ): FixedPriceMarket {
548
548
  this.onEntryFunctionCall(
549
549
  func,
@@ -559,7 +559,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
559
559
  onEntryBuyScript(
560
560
  func: (call: FixedPriceMarket.BuyScriptPayload, ctx: AptosContext) => void,
561
561
  filter?: CallFilter,
562
- fetchConfig?: AptosFetchConfig
562
+ fetchConfig?: MoveFetchConfig
563
563
  ): FixedPriceMarket {
564
564
  this.onEntryFunctionCall(
565
565
  func,
@@ -578,7 +578,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
578
578
  ctx: AptosContext
579
579
  ) => void,
580
580
  filter?: CallFilter,
581
- fetchConfig?: AptosFetchConfig
581
+ fetchConfig?: MoveFetchConfig
582
582
  ): FixedPriceMarket {
583
583
  this.onEntryFunctionCall(
584
584
  func,
@@ -597,7 +597,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
597
597
  ctx: AptosContext
598
598
  ) => void,
599
599
  filter?: CallFilter,
600
- fetchConfig?: AptosFetchConfig
600
+ fetchConfig?: MoveFetchConfig
601
601
  ): FixedPriceMarket {
602
602
  this.onEntryFunctionCall(
603
603
  func,
@@ -616,7 +616,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
616
616
  ctx: AptosContext
617
617
  ) => void,
618
618
  filter?: CallFilter,
619
- fetchConfig?: AptosFetchConfig
619
+ fetchConfig?: MoveFetchConfig
620
620
  ): FixedPriceMarket {
621
621
  this.onEntryFunctionCall(
622
622
  func,
@@ -632,7 +632,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
632
632
  onEntryListScript(
633
633
  func: (call: FixedPriceMarket.ListScriptPayload, ctx: AptosContext) => void,
634
634
  filter?: CallFilter,
635
- fetchConfig?: AptosFetchConfig
635
+ fetchConfig?: MoveFetchConfig
636
636
  ): FixedPriceMarket {
637
637
  this.onEntryFunctionCall(
638
638
  func,
@@ -651,7 +651,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
651
651
  ctx: AptosContext
652
652
  ) => void,
653
653
  filter?: CallFilter,
654
- fetchConfig?: AptosFetchConfig
654
+ fetchConfig?: MoveFetchConfig
655
655
  ): FixedPriceMarket {
656
656
  this.onEntryFunctionCall(
657
657
  func,
@@ -670,7 +670,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
670
670
  ctx: AptosContext
671
671
  ) => void,
672
672
  filter?: CallFilter,
673
- fetchConfig?: AptosFetchConfig
673
+ fetchConfig?: MoveFetchConfig
674
674
  ): FixedPriceMarket {
675
675
  this.onEntryFunctionCall(
676
676
  func,
@@ -689,7 +689,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
689
689
  ctx: AptosContext
690
690
  ) => void,
691
691
  filter?: CallFilter,
692
- fetchConfig?: AptosFetchConfig
692
+ fetchConfig?: MoveFetchConfig
693
693
  ): FixedPriceMarket {
694
694
  this.onEntryFunctionCall(
695
695
  func,
@@ -707,7 +707,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
707
707
  event: FixedPriceMarket.CreateMarketEventInstance,
708
708
  ctx: AptosContext
709
709
  ) => void,
710
- fetchConfig?: AptosFetchConfig
710
+ fetchConfig?: MoveFetchConfig
711
711
  ): FixedPriceMarket {
712
712
  this.onEvent(
713
713
  func,
@@ -724,7 +724,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
724
724
  event: FixedPriceMarket.ListTokenEventInstance,
725
725
  ctx: AptosContext
726
726
  ) => void,
727
- fetchConfig?: AptosFetchConfig
727
+ fetchConfig?: MoveFetchConfig
728
728
  ): FixedPriceMarket {
729
729
  this.onEvent(
730
730
  func,
@@ -741,7 +741,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
741
741
  event: FixedPriceMarket.CancelListTokenEventInstance,
742
742
  ctx: AptosContext
743
743
  ) => void,
744
- fetchConfig?: AptosFetchConfig
744
+ fetchConfig?: MoveFetchConfig
745
745
  ): FixedPriceMarket {
746
746
  this.onEvent(
747
747
  func,
@@ -758,7 +758,7 @@ export class FixedPriceMarket extends AptosBaseProcessor {
758
758
  event: FixedPriceMarket.BuyTokenEventInstance,
759
759
  ctx: AptosContext
760
760
  ) => void,
761
- fetchConfig?: AptosFetchConfig
761
+ fetchConfig?: MoveFetchConfig
762
762
  ): FixedPriceMarket {
763
763
  this.onEvent(
764
764
  func,
@@ -1135,7 +1135,7 @@ export class FixedPriceMarketScript extends AptosBaseProcessor {
1135
1135
  ctx: AptosContext
1136
1136
  ) => void,
1137
1137
  filter?: CallFilter,
1138
- fetchConfig?: AptosFetchConfig
1138
+ fetchConfig?: MoveFetchConfig
1139
1139
  ): FixedPriceMarketScript {
1140
1140
  this.onEntryFunctionCall(
1141
1141
  func,
@@ -1154,7 +1154,7 @@ export class FixedPriceMarketScript extends AptosBaseProcessor {
1154
1154
  ctx: AptosContext
1155
1155
  ) => void,
1156
1156
  filter?: CallFilter,
1157
- fetchConfig?: AptosFetchConfig
1157
+ fetchConfig?: MoveFetchConfig
1158
1158
  ): FixedPriceMarketScript {
1159
1159
  this.onEntryFunctionCall(
1160
1160
  func,
@@ -1173,7 +1173,7 @@ export class FixedPriceMarketScript extends AptosBaseProcessor {
1173
1173
  ctx: AptosContext
1174
1174
  ) => void,
1175
1175
  filter?: CallFilter,
1176
- fetchConfig?: AptosFetchConfig
1176
+ fetchConfig?: MoveFetchConfig
1177
1177
  ): FixedPriceMarketScript {
1178
1178
  this.onEntryFunctionCall(
1179
1179
  func,
@@ -1192,7 +1192,7 @@ export class FixedPriceMarketScript extends AptosBaseProcessor {
1192
1192
  ctx: AptosContext
1193
1193
  ) => void,
1194
1194
  filter?: CallFilter,
1195
- fetchConfig?: AptosFetchConfig
1195
+ fetchConfig?: MoveFetchConfig
1196
1196
  ): FixedPriceMarketScript {
1197
1197
  this.onEntryFunctionCall(
1198
1198
  func,
@@ -1211,7 +1211,7 @@ export class FixedPriceMarketScript extends AptosBaseProcessor {
1211
1211
  ctx: AptosContext
1212
1212
  ) => void,
1213
1213
  filter?: CallFilter,
1214
- fetchConfig?: AptosFetchConfig
1214
+ fetchConfig?: MoveFetchConfig
1215
1215
  ): FixedPriceMarketScript {
1216
1216
  this.onEntryFunctionCall(
1217
1217
  func,
@@ -1230,7 +1230,7 @@ export class FixedPriceMarketScript extends AptosBaseProcessor {
1230
1230
  ctx: AptosContext
1231
1231
  ) => void,
1232
1232
  filter?: CallFilter,
1233
- fetchConfig?: AptosFetchConfig
1233
+ fetchConfig?: MoveFetchConfig
1234
1234
  ): FixedPriceMarketScript {
1235
1235
  this.onEntryFunctionCall(
1236
1236
  func,
@@ -1249,7 +1249,7 @@ export class FixedPriceMarketScript extends AptosBaseProcessor {
1249
1249
  ctx: AptosContext
1250
1250
  ) => void,
1251
1251
  filter?: CallFilter,
1252
- fetchConfig?: AptosFetchConfig
1252
+ fetchConfig?: MoveFetchConfig
1253
1253
  ): FixedPriceMarketScript {
1254
1254
  this.onEntryFunctionCall(
1255
1255
  func,
@@ -1268,7 +1268,7 @@ export class FixedPriceMarketScript extends AptosBaseProcessor {
1268
1268
  ctx: AptosContext
1269
1269
  ) => void,
1270
1270
  filter?: CallFilter,
1271
- fetchConfig?: AptosFetchConfig
1271
+ fetchConfig?: MoveFetchConfig
1272
1272
  ): FixedPriceMarketScript {
1273
1273
  this.onEntryFunctionCall(
1274
1274
  func,
@@ -1287,7 +1287,7 @@ export class FixedPriceMarketScript extends AptosBaseProcessor {
1287
1287
  ctx: AptosContext
1288
1288
  ) => void,
1289
1289
  filter?: CallFilter,
1290
- fetchConfig?: AptosFetchConfig
1290
+ fetchConfig?: MoveFetchConfig
1291
1291
  ): FixedPriceMarketScript {
1292
1292
  this.onEntryFunctionCall(
1293
1293
  func,
@@ -1306,7 +1306,7 @@ export class FixedPriceMarketScript extends AptosBaseProcessor {
1306
1306
  ctx: AptosContext
1307
1307
  ) => void,
1308
1308
  filter?: CallFilter,
1309
- fetchConfig?: AptosFetchConfig
1309
+ fetchConfig?: MoveFetchConfig
1310
1310
  ): FixedPriceMarketScript {
1311
1311
  this.onEntryFunctionCall(
1312
1312
  func,
@@ -1325,7 +1325,7 @@ export class FixedPriceMarketScript extends AptosBaseProcessor {
1325
1325
  ctx: AptosContext
1326
1326
  ) => void,
1327
1327
  filter?: CallFilter,
1328
- fetchConfig?: AptosFetchConfig
1328
+ fetchConfig?: MoveFetchConfig
1329
1329
  ): FixedPriceMarketScript {
1330
1330
  this.onEntryFunctionCall(
1331
1331
  func,
@@ -4,6 +4,7 @@
4
4
 
5
5
  /* Generated modules for account 0x4188c8694687e844677c2aa87171019e23d61cac60de5082a278a8aa47e9d807 */
6
6
 
7
+ import { CallFilter } from "@sentio/sdk/move";
7
8
  import {
8
9
  MoveCoder,
9
10
  AptosBindOptions,
@@ -12,9 +13,8 @@ import {
12
13
  AptosNetwork,
13
14
  TypedEntryFunctionPayload,
14
15
  AptosContext,
15
- CallFilter,
16
16
  } from "@sentio/sdk/aptos";
17
- import { AptosFetchConfig } from "@sentio/protos";
17
+ import { MoveFetchConfig } from "@sentio/protos";
18
18
  import { Address, MoveModule } from "@sentio/sdk/aptos";
19
19
 
20
20
  import { _0x1 } from "@sentio/sdk/aptos/builtin";
@@ -37,7 +37,7 @@ export class CandyMachine extends AptosBaseProcessor {
37
37
  onEntryAddAcl(
38
38
  func: (call: CandyMachine.AddAclPayload, ctx: AptosContext) => void,
39
39
  filter?: CallFilter,
40
- fetchConfig?: AptosFetchConfig
40
+ fetchConfig?: MoveFetchConfig
41
41
  ): CandyMachine {
42
42
  this.onEntryFunctionCall(
43
43
  func,
@@ -56,7 +56,7 @@ export class CandyMachine extends AptosBaseProcessor {
56
56
  ctx: AptosContext
57
57
  ) => void,
58
58
  filter?: CallFilter,
59
- fetchConfig?: AptosFetchConfig
59
+ fetchConfig?: MoveFetchConfig
60
60
  ): CandyMachine {
61
61
  this.onEntryFunctionCall(
62
62
  func,
@@ -75,7 +75,7 @@ export class CandyMachine extends AptosBaseProcessor {
75
75
  ctx: AptosContext
76
76
  ) => void,
77
77
  filter?: CallFilter,
78
- fetchConfig?: AptosFetchConfig
78
+ fetchConfig?: MoveFetchConfig
79
79
  ): CandyMachine {
80
80
  this.onEntryFunctionCall(
81
81
  func,
@@ -91,7 +91,7 @@ export class CandyMachine extends AptosBaseProcessor {
91
91
  onEntryPullToken(
92
92
  func: (call: CandyMachine.PullTokenPayload, ctx: AptosContext) => void,
93
93
  filter?: CallFilter,
94
- fetchConfig?: AptosFetchConfig
94
+ fetchConfig?: MoveFetchConfig
95
95
  ): CandyMachine {
96
96
  this.onEntryFunctionCall(
97
97
  func,
@@ -110,7 +110,7 @@ export class CandyMachine extends AptosBaseProcessor {
110
110
  ctx: AptosContext
111
111
  ) => void,
112
112
  filter?: CallFilter,
113
- fetchConfig?: AptosFetchConfig
113
+ fetchConfig?: MoveFetchConfig
114
114
  ): CandyMachine {
115
115
  this.onEntryFunctionCall(
116
116
  func,
@@ -290,7 +290,7 @@ export class SouffleChefCampaign extends AptosBaseProcessor {
290
290
  onEntryAddAcl(
291
291
  func: (call: SouffleChefCampaign.AddAclPayload, ctx: AptosContext) => void,
292
292
  filter?: CallFilter,
293
- fetchConfig?: AptosFetchConfig
293
+ fetchConfig?: MoveFetchConfig
294
294
  ): SouffleChefCampaign {
295
295
  this.onEntryFunctionCall(
296
296
  func,
@@ -309,7 +309,7 @@ export class SouffleChefCampaign extends AptosBaseProcessor {
309
309
  ctx: AptosContext
310
310
  ) => void,
311
311
  filter?: CallFilter,
312
- fetchConfig?: AptosFetchConfig
312
+ fetchConfig?: MoveFetchConfig
313
313
  ): SouffleChefCampaign {
314
314
  this.onEntryFunctionCall(
315
315
  func,
@@ -328,7 +328,7 @@ export class SouffleChefCampaign extends AptosBaseProcessor {
328
328
  ctx: AptosContext
329
329
  ) => void,
330
330
  filter?: CallFilter,
331
- fetchConfig?: AptosFetchConfig
331
+ fetchConfig?: MoveFetchConfig
332
332
  ): SouffleChefCampaign {
333
333
  this.onEntryFunctionCall(
334
334
  func,
@@ -347,7 +347,7 @@ export class SouffleChefCampaign extends AptosBaseProcessor {
347
347
  ctx: AptosContext
348
348
  ) => void,
349
349
  filter?: CallFilter,
350
- fetchConfig?: AptosFetchConfig
350
+ fetchConfig?: MoveFetchConfig
351
351
  ): SouffleChefCampaign {
352
352
  this.onEntryFunctionCall(
353
353
  func,
@@ -363,7 +363,7 @@ export class SouffleChefCampaign extends AptosBaseProcessor {
363
363
  onEntryClaim(
364
364
  func: (call: SouffleChefCampaign.ClaimPayload, ctx: AptosContext) => void,
365
365
  filter?: CallFilter,
366
- fetchConfig?: AptosFetchConfig
366
+ fetchConfig?: MoveFetchConfig
367
367
  ): SouffleChefCampaign {
368
368
  this.onEntryFunctionCall(
369
369
  func,
@@ -382,7 +382,7 @@ export class SouffleChefCampaign extends AptosBaseProcessor {
382
382
  ctx: AptosContext
383
383
  ) => void,
384
384
  filter?: CallFilter,
385
- fetchConfig?: AptosFetchConfig
385
+ fetchConfig?: MoveFetchConfig
386
386
  ): SouffleChefCampaign {
387
387
  this.onEntryFunctionCall(
388
388
  func,
@@ -401,7 +401,7 @@ export class SouffleChefCampaign extends AptosBaseProcessor {
401
401
  ctx: AptosContext
402
402
  ) => void,
403
403
  filter?: CallFilter,
404
- fetchConfig?: AptosFetchConfig
404
+ fetchConfig?: MoveFetchConfig
405
405
  ): SouffleChefCampaign {
406
406
  this.onEntryFunctionCall(
407
407
  func,
@@ -420,7 +420,7 @@ export class SouffleChefCampaign extends AptosBaseProcessor {
420
420
  ctx: AptosContext
421
421
  ) => void,
422
422
  filter?: CallFilter,
423
- fetchConfig?: AptosFetchConfig
423
+ fetchConfig?: MoveFetchConfig
424
424
  ): SouffleChefCampaign {
425
425
  this.onEntryFunctionCall(
426
426
  func,
@@ -439,7 +439,7 @@ export class SouffleChefCampaign extends AptosBaseProcessor {
439
439
  ctx: AptosContext
440
440
  ) => void,
441
441
  filter?: CallFilter,
442
- fetchConfig?: AptosFetchConfig
442
+ fetchConfig?: MoveFetchConfig
443
443
  ): SouffleChefCampaign {
444
444
  this.onEntryFunctionCall(
445
445
  func,
@@ -458,7 +458,7 @@ export class SouffleChefCampaign extends AptosBaseProcessor {
458
458
  ctx: AptosContext
459
459
  ) => void,
460
460
  filter?: CallFilter,
461
- fetchConfig?: AptosFetchConfig
461
+ fetchConfig?: MoveFetchConfig
462
462
  ): SouffleChefCampaign {
463
463
  this.onEntryFunctionCall(
464
464
  func,
@@ -477,7 +477,7 @@ export class SouffleChefCampaign extends AptosBaseProcessor {
477
477
  ctx: AptosContext
478
478
  ) => void,
479
479
  filter?: CallFilter,
480
- fetchConfig?: AptosFetchConfig
480
+ fetchConfig?: MoveFetchConfig
481
481
  ): SouffleChefCampaign {
482
482
  this.onEntryFunctionCall(
483
483
  func,
@@ -495,7 +495,7 @@ export class SouffleChefCampaign extends AptosBaseProcessor {
495
495
  event: SouffleChefCampaign.BurnEnjoyEventInstance,
496
496
  ctx: AptosContext
497
497
  ) => void,
498
- fetchConfig?: AptosFetchConfig
498
+ fetchConfig?: MoveFetchConfig
499
499
  ): SouffleChefCampaign {
500
500
  this.onEvent(
501
501
  func,
@@ -512,7 +512,7 @@ export class SouffleChefCampaign extends AptosBaseProcessor {
512
512
  event: SouffleChefCampaign.PullTokenEventInstance,
513
513
  ctx: AptosContext
514
514
  ) => void,
515
- fetchConfig?: AptosFetchConfig
515
+ fetchConfig?: MoveFetchConfig
516
516
  ): SouffleChefCampaign {
517
517
  this.onEvent(
518
518
  func,
package/src/core/chain.ts CHANGED
@@ -85,7 +85,8 @@ export const CHAIN_IDS = {
85
85
  SOLANA_DEVNET: 'sol_devnet',
86
86
  SOLANA_TESTNET: 'sol_testnet',
87
87
  SOLANA_PYTH: 'sol_pyth',
88
- SUI_DEVNET: 'sui_devnet',
88
+ SUI_MAINNET: 'sui_mainnet',
89
+ SUI_TESTNET: 'sui_testnet',
89
90
  APTOS_MAINNET: 'aptos_mainnet',
90
91
  APTOS_TESTNET: 'aptos_testnet',
91
92
  }
@@ -101,8 +102,8 @@ for (const [key, value] of Object.entries(CHAIN_IDS)) {
101
102
  .join(' ')
102
103
  }
103
104
 
104
- export function getChainName(chainId: string | number | bigint | null | undefined): string {
105
- if (typeof chainId === 'number' || typeof chainId === 'bigint') {
105
+ export function getChainName(chainId: string | number | null | undefined): string {
106
+ if (typeof chainId === 'number') {
106
107
  chainId = chainId.toString()
107
108
  }
108
109
  if (chainId) {
package/src/core/index.ts CHANGED
@@ -5,7 +5,4 @@ export { CounterBinding, Meter, type Labels, GaugeBinding, Counter, Gauge, Metri
5
5
  export { Exporter } from './exporter.js'
6
6
  export { type Numberish, toBigInteger, toMetricValue } from './numberish.js'
7
7
 
8
- export { SuiBaseProcessor, SuiBindOptions } from './sui-processor.js'
9
-
10
- export { SuiPlugin } from './sui-plugin.js'
11
8
  export { CorePlugin } from './core-plugin.js'
@@ -175,29 +175,3 @@ export class BoundContractView<TContract extends BaseContract, TContractView ext
175
175
  return this.view.rawContract.filters
176
176
  }
177
177
  }
178
-
179
- export class SuiContext extends BaseContext {
180
- address: string
181
- moduleName: string
182
- blockNumber: bigint
183
-
184
- constructor(address: string, slot: bigint) {
185
- super()
186
- this.address = address
187
- this.blockNumber = slot
188
- }
189
-
190
- getMetaData(name: string, labels: Labels): RecordMetaData {
191
- return {
192
- address: this.address,
193
- contractName: this.moduleName,
194
- blockNumber: this.blockNumber,
195
- transactionIndex: 0,
196
- transactionHash: '', // TODO
197
- logIndex: 0,
198
- chainId: CHAIN_IDS.SUI_DEVNET, // TODO set in context
199
- name: name,
200
- labels: normalizeLabels(labels),
201
- }
202
- }
203
- }
@@ -36,7 +36,7 @@ export class EthPlugin extends Plugin {
36
36
  const chainId = processor.getChainId()
37
37
  // this.processorsByChainId.set(chainId, processor)
38
38
 
39
- const contractConfig: ContractConfig = {
39
+ const contractConfig = ContractConfig.fromPartial({
40
40
  processorType: USER_PROCESSOR,
41
41
  contract: {
42
42
  name: processor.config.name,
@@ -44,19 +44,9 @@ export class EthPlugin extends Plugin {
44
44
  address: processor.config.address,
45
45
  abi: '',
46
46
  },
47
- intervalConfigs: [],
48
- logConfigs: [],
49
- traceConfigs: [],
50
- transactionConfig: [],
51
47
  startBlock: processor.config.startBlock,
52
- endBlock: 0n,
53
- instructionConfig: undefined,
54
- aptosEventConfigs: [],
55
- aptosCallConfigs: [],
56
- }
57
- if (processor.config.endBlock) {
58
- contractConfig.endBlock = processor.config.endBlock
59
- }
48
+ endBlock: processor.config.endBlock,
49
+ })
60
50
 
61
51
  // Step 1. Prepare all the block handlers
62
52
  for (const blockHandler of processor.blockHandlers) {
@@ -0,0 +1,33 @@
1
+ // TODO extends ArgumentsFilter
2
+ import { Data_AptCall, Data_AptEvent, MoveFetchConfig, ProcessResult } from '@sentio/protos'
3
+
4
+ export interface EventFilter {
5
+ type: string
6
+ account?: string
7
+ }
8
+
9
+ export interface FunctionNameAndCallFilter extends CallFilter {
10
+ function: string
11
+ }
12
+
13
+ // TODO extends ArgumentsFilter
14
+ export interface CallFilter {
15
+ includeFailed?: boolean
16
+ typeArguments?: string[]
17
+ }
18
+
19
+ export interface ArgumentsFilter {
20
+ arguments?: string[]
21
+ }
22
+
23
+ export class EventHandler {
24
+ filters: EventFilter[]
25
+ handler: (event: Data_AptEvent) => Promise<ProcessResult>
26
+ fetchConfig: MoveFetchConfig
27
+ }
28
+
29
+ export class CallHandler {
30
+ filters: FunctionNameAndCallFilter[]
31
+ handler: (call: Data_AptCall) => Promise<ProcessResult>
32
+ fetchConfig: MoveFetchConfig
33
+ }
@@ -12,8 +12,7 @@ export class SolanaPlugin extends Plugin {
12
12
  async configure(config: ProcessConfigResponse) {
13
13
  // Part 2, prepare solana constractors
14
14
  for (const solanaProcessor of SolanaProcessorState.INSTANCE.getValues()) {
15
- const contractConfig: ContractConfig = {
16
- transactionConfig: [],
15
+ const contractConfig = ContractConfig.fromPartial({
17
16
  processorType: USER_PROCESSOR,
18
17
  contract: {
19
18
  name: solanaProcessor.contractName,
@@ -21,19 +20,13 @@ export class SolanaPlugin extends Plugin {
21
20
  address: solanaProcessor.address,
22
21
  abi: '',
23
22
  },
24
- logConfigs: [],
25
- traceConfigs: [],
26
- intervalConfigs: [],
27
23
  startBlock: solanaProcessor.config.startSlot,
28
- endBlock: 0n,
29
24
  instructionConfig: {
30
25
  innerInstruction: solanaProcessor.processInnerInstruction,
31
26
  parsedInstruction: solanaProcessor.fromParsedInstruction !== null,
32
27
  rawDataInstruction: solanaProcessor.decodeInstruction !== null,
33
28
  },
34
- aptosEventConfigs: [],
35
- aptosCallConfigs: [],
36
- }
29
+ })
37
30
  config.contractConfigs.push(contractConfig)
38
31
  }
39
32
  }