@sentio/sdk 2.59.0-rc.8 → 2.59.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/api.d.ts +1 -0
- package/lib/aptos/api.d.ts.map +1 -1
- package/lib/aptos/api.js +13 -1
- package/lib/aptos/api.js.map +1 -1
- package/lib/aptos/aptos-plugin.d.ts +8 -4
- package/lib/aptos/aptos-plugin.d.ts.map +1 -1
- package/lib/aptos/aptos-plugin.js +40 -3
- package/lib/aptos/aptos-plugin.js.map +1 -1
- package/lib/aptos/aptos-processor.d.ts +20 -19
- package/lib/aptos/aptos-processor.d.ts.map +1 -1
- package/lib/aptos/aptos-processor.js +101 -50
- package/lib/aptos/aptos-processor.js.map +1 -1
- package/lib/aptos/aptos-resource-processor-template.d.ts +5 -4
- package/lib/aptos/aptos-resource-processor-template.d.ts.map +1 -1
- package/lib/aptos/aptos-resource-processor-template.js +8 -8
- package/lib/aptos/aptos-resource-processor-template.js.map +1 -1
- package/lib/aptos/builtin/0x1.d.ts +333 -332
- package/lib/aptos/builtin/0x1.d.ts.map +1 -1
- package/lib/aptos/builtin/0x1.js +664 -664
- package/lib/aptos/builtin/0x1.js.map +1 -1
- package/lib/aptos/builtin/0x3.d.ts +66 -65
- package/lib/aptos/builtin/0x3.d.ts.map +1 -1
- package/lib/aptos/builtin/0x3.js +130 -130
- package/lib/aptos/builtin/0x3.js.map +1 -1
- package/lib/aptos/builtin/0x4.d.ts +29 -28
- package/lib/aptos/builtin/0x4.d.ts.map +1 -1
- package/lib/aptos/builtin/0x4.js +56 -56
- package/lib/aptos/builtin/0x4.js.map +1 -1
- package/lib/aptos/codegen/codegen.js +27 -0
- package/lib/aptos/codegen/codegen.js.map +1 -1
- package/lib/aptos/data.d.ts +45 -0
- package/lib/aptos/data.d.ts.map +1 -0
- package/lib/aptos/data.js +99 -0
- package/lib/aptos/data.js.map +1 -0
- package/lib/aptos/index.d.ts +1 -0
- package/lib/aptos/index.d.ts.map +1 -1
- package/lib/aptos/index.js.map +1 -1
- package/lib/aptos/models.d.ts +1 -0
- package/lib/aptos/models.d.ts.map +1 -1
- package/lib/aptos/move-coder.d.ts +8 -2
- package/lib/aptos/move-coder.d.ts.map +1 -1
- package/lib/aptos/move-coder.js +84 -1
- package/lib/aptos/move-coder.js.map +1 -1
- package/lib/btc/btc-plugin.d.ts +4 -1
- package/lib/btc/btc-plugin.d.ts.map +1 -1
- package/lib/btc/btc-plugin.js +27 -0
- package/lib/btc/btc-plugin.js.map +1 -1
- package/lib/btc/btc-processor.d.ts +6 -5
- package/lib/btc/btc-processor.d.ts.map +1 -1
- package/lib/btc/btc-processor.js +35 -9
- package/lib/btc/btc-processor.js.map +1 -1
- package/lib/btc/types.d.ts +2 -1
- package/lib/btc/types.d.ts.map +1 -1
- package/lib/core/base-context.d.ts +4 -2
- package/lib/core/base-context.d.ts.map +1 -1
- package/lib/core/base-context.js +10 -5
- package/lib/core/base-context.js.map +1 -1
- package/lib/core/event-logger.d.ts +5 -0
- package/lib/core/event-logger.d.ts.map +1 -1
- package/lib/core/event-logger.js +36 -1
- package/lib/core/event-logger.js.map +1 -1
- package/lib/core/handler-options.d.ts +25 -0
- package/lib/core/handler-options.d.ts.map +1 -0
- package/lib/core/handler-options.js +21 -0
- package/lib/core/handler-options.js.map +1 -0
- package/lib/core/index.d.ts +3 -1
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +3 -1
- package/lib/core/index.js.map +1 -1
- package/lib/core/meter.d.ts +45 -2
- package/lib/core/meter.d.ts.map +1 -1
- package/lib/core/meter.js +124 -2
- package/lib/core/meter.js.map +1 -1
- package/lib/core/numberish.d.ts +2 -1
- package/lib/core/numberish.d.ts.map +1 -1
- package/lib/core/numberish.js +35 -1
- package/lib/core/numberish.js.map +1 -1
- package/lib/core/partition-handler-manager.d.ts +44 -0
- package/lib/core/partition-handler-manager.d.ts.map +1 -0
- package/lib/core/partition-handler-manager.js +76 -0
- package/lib/core/partition-handler-manager.js.map +1 -0
- package/lib/cosmos/cosmos-processor.d.ts +3 -2
- package/lib/cosmos/cosmos-processor.d.ts.map +1 -1
- package/lib/cosmos/cosmos-processor.js +11 -1
- 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 +21 -16
- package/lib/eth/base-processor.d.ts.map +1 -1
- package/lib/eth/base-processor.js +173 -34
- package/lib/eth/base-processor.js.map +1 -1
- package/lib/eth/bind-options.d.ts +6 -0
- package/lib/eth/bind-options.d.ts.map +1 -1
- package/lib/eth/bind-options.js +2 -0
- package/lib/eth/bind-options.js.map +1 -1
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.d.ts +32 -31
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js +62 -62
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc1155-processor.d.ts +17 -16
- package/lib/eth/builtin/internal/erc1155-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc1155-processor.js +32 -32
- package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20-processor.d.ts +25 -24
- package/lib/eth/builtin/internal/erc20-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc20-processor.js +48 -48
- package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20bytes-processor.d.ts +14 -13
- package/lib/eth/builtin/internal/erc20bytes-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc20bytes-processor.js +26 -26
- package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc721-processor.d.ts +21 -20
- package/lib/eth/builtin/internal/erc721-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc721-processor.js +40 -40
- package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
- package/lib/eth/builtin/internal/weth9-processor.d.ts +20 -19
- package/lib/eth/builtin/internal/weth9-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/weth9-processor.js +38 -38
- package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
- package/lib/eth/codegen/event-handler.js +2 -2
- package/lib/eth/codegen/event-handler.js.map +1 -1
- package/lib/eth/codegen/file.d.ts.map +1 -1
- package/lib/eth/codegen/file.js +1 -0
- package/lib/eth/codegen/file.js.map +1 -1
- package/lib/eth/codegen/functions-handler.js +2 -2
- package/lib/eth/codegen/functions-handler.js.map +1 -1
- package/lib/eth/eth-plugin.d.ts +4 -1
- package/lib/eth/eth-plugin.d.ts.map +1 -1
- package/lib/eth/eth-plugin.js +53 -5
- package/lib/eth/eth-plugin.js.map +1 -1
- package/lib/eth/eth.d.ts +2 -7
- package/lib/eth/eth.d.ts.map +1 -1
- package/lib/eth/eth.js +8 -1
- package/lib/eth/eth.js.map +1 -1
- package/lib/fuel/codegen/codegen.js +5 -5
- package/lib/fuel/codegen/codegen.js.map +1 -1
- package/lib/fuel/fuel-plugin.d.ts +4 -1
- package/lib/fuel/fuel-plugin.d.ts.map +1 -1
- package/lib/fuel/fuel-plugin.js +41 -0
- package/lib/fuel/fuel-plugin.js.map +1 -1
- package/lib/fuel/fuel-processor-template.d.ts +7 -4
- package/lib/fuel/fuel-processor-template.d.ts.map +1 -1
- package/lib/fuel/fuel-processor-template.js +11 -9
- package/lib/fuel/fuel-processor-template.js.map +1 -1
- package/lib/fuel/fuel-processor.d.ts +7 -7
- package/lib/fuel/fuel-processor.d.ts.map +1 -1
- package/lib/fuel/fuel-processor.js +91 -28
- package/lib/fuel/fuel-processor.js.map +1 -1
- package/lib/fuel/types.d.ts +3 -0
- package/lib/fuel/types.d.ts.map +1 -1
- package/lib/move/filter.d.ts +5 -0
- package/lib/move/filter.d.ts.map +1 -1
- package/lib/move/filter.js +5 -0
- package/lib/move/filter.js.map +1 -1
- package/lib/move/shared-network-codegen.d.ts.map +1 -1
- package/lib/move/shared-network-codegen.js +5 -4
- package/lib/move/shared-network-codegen.js.map +1 -1
- package/lib/solana/solana-processor.d.ts +10 -4
- package/lib/solana/solana-processor.d.ts.map +1 -1
- package/lib/solana/solana-processor.js +13 -4
- package/lib/solana/solana-processor.js.map +1 -1
- package/lib/stark/starknet-processor.d.ts +3 -1
- package/lib/stark/starknet-processor.d.ts.map +1 -1
- package/lib/stark/starknet-processor.js +32 -14
- package/lib/stark/starknet-processor.js.map +1 -1
- package/lib/store/codegen.d.ts.map +1 -1
- package/lib/store/codegen.js +36 -2
- package/lib/store/codegen.js.map +1 -1
- package/lib/store/schema.d.ts.map +1 -1
- package/lib/store/schema.js +3 -1
- package/lib/store/schema.js.map +1 -1
- package/lib/store/store.d.ts +4 -3
- package/lib/store/store.d.ts.map +1 -1
- package/lib/store/store.js +41 -1
- package/lib/store/store.js.map +1 -1
- package/lib/store/types.d.ts +20 -1
- package/lib/store/types.d.ts.map +1 -1
- package/lib/store/types.js +22 -0
- package/lib/store/types.js.map +1 -1
- package/lib/sui/builtin/0x1.d.ts +7 -6
- package/lib/sui/builtin/0x1.d.ts.map +1 -1
- package/lib/sui/builtin/0x1.js +12 -12
- package/lib/sui/builtin/0x1.js.map +1 -1
- package/lib/sui/builtin/0x2.d.ts +61 -60
- package/lib/sui/builtin/0x2.d.ts.map +1 -1
- package/lib/sui/builtin/0x2.js +120 -120
- package/lib/sui/builtin/0x2.js.map +1 -1
- package/lib/sui/builtin/0x3.d.ts +49 -48
- package/lib/sui/builtin/0x3.d.ts.map +1 -1
- package/lib/sui/builtin/0x3.js +96 -96
- package/lib/sui/builtin/0x3.js.map +1 -1
- package/lib/sui/models.d.ts +1 -0
- package/lib/sui/models.d.ts.map +1 -1
- package/lib/sui/sui-plugin.d.ts +6 -3
- package/lib/sui/sui-plugin.d.ts.map +1 -1
- package/lib/sui/sui-plugin.js +59 -20
- package/lib/sui/sui-plugin.js.map +1 -1
- package/lib/sui/sui-processor.d.ts +5 -4
- package/lib/sui/sui-processor.d.ts.map +1 -1
- package/lib/sui/sui-processor.js +47 -11
- package/lib/sui/sui-processor.js.map +1 -1
- package/lib/utils/block.d.ts +2 -0
- package/lib/utils/block.d.ts.map +1 -1
- package/lib/utils/block.js +13 -0
- package/lib/utils/block.js.map +1 -1
- package/package.json +4 -4
- package/src/aptos/api.ts +13 -1
- package/src/aptos/aptos-plugin.ts +51 -8
- package/src/aptos/aptos-processor.ts +112 -74
- package/src/aptos/aptos-resource-processor-template.ts +9 -8
- package/src/aptos/builtin/0x1.ts +1565 -664
- package/src/aptos/builtin/0x3.ts +302 -130
- package/src/aptos/builtin/0x4.ts +123 -56
- package/src/aptos/codegen/codegen.ts +34 -1
- package/src/aptos/data.ts +123 -0
- package/src/aptos/index.ts +2 -0
- package/src/aptos/models.ts +2 -0
- package/src/aptos/move-coder.ts +96 -3
- package/src/btc/btc-plugin.ts +38 -0
- package/src/btc/btc-processor.ts +35 -10
- package/src/btc/types.ts +2 -1
- package/src/core/base-context.ts +10 -5
- package/src/core/event-logger.ts +45 -1
- package/src/core/handler-options.ts +40 -0
- package/src/core/index.ts +17 -1
- package/src/core/meter.ts +159 -4
- package/src/core/numberish.ts +34 -1
- package/src/core/partition-handler-manager.ts +94 -0
- package/src/cosmos/cosmos-processor.ts +12 -1
- package/src/cosmos/types.ts +1 -0
- package/src/eth/base-processor.ts +162 -37
- package/src/eth/bind-options.ts +7 -0
- package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +118 -62
- package/src/eth/builtin/internal/erc1155-processor.ts +76 -32
- package/src/eth/builtin/internal/erc20-processor.ts +79 -48
- package/src/eth/builtin/internal/erc20bytes-processor.ts +47 -26
- package/src/eth/builtin/internal/erc721-processor.ts +77 -40
- package/src/eth/builtin/internal/weth9-processor.ts +79 -38
- package/src/eth/codegen/event-handler.ts +2 -2
- package/src/eth/codegen/file.ts +1 -0
- package/src/eth/codegen/functions-handler.ts +2 -2
- package/src/eth/eth-plugin.ts +74 -5
- package/src/eth/eth.ts +12 -1
- package/src/fuel/codegen/codegen.ts +5 -5
- package/src/fuel/fuel-plugin.ts +56 -0
- package/src/fuel/fuel-processor-template.ts +17 -10
- package/src/fuel/fuel-processor.ts +90 -22
- package/src/fuel/types.ts +3 -0
- package/src/move/filter.ts +5 -0
- package/src/move/shared-network-codegen.ts +5 -4
- package/src/solana/solana-processor.ts +28 -6
- package/src/stark/starknet-processor.ts +31 -13
- package/src/store/codegen.ts +50 -2
- package/src/store/schema.ts +3 -1
- package/src/store/store.ts +57 -4
- package/src/store/types.ts +30 -1
- package/src/sui/builtin/0x1.ts +22 -12
- package/src/sui/builtin/0x2.ts +220 -120
- package/src/sui/builtin/0x3.ts +241 -96
- package/src/sui/models.ts +2 -0
- package/src/sui/sui-plugin.ts +68 -22
- package/src/sui/sui-processor.ts +48 -11
- package/src/utils/block.ts +15 -0
package/src/aptos/builtin/0x4.ts
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
/* Generated types for 0x4, original address 0x4 */
|
6
6
|
|
7
7
|
import { CallFilter, MoveFetchConfig, EventFilter } from "@sentio/sdk/move";
|
8
|
+
import { HandlerOptions } from "@sentio/sdk";
|
8
9
|
import {
|
9
10
|
AptosBindOptions,
|
10
11
|
AptosBaseProcessor,
|
@@ -45,26 +46,29 @@ export class token extends AptosBaseProcessor {
|
|
45
46
|
|
46
47
|
onEventMutation(
|
47
48
|
func: (event: token.MutationInstance, ctx: AptosContext) => void,
|
48
|
-
|
49
|
+
handlerOptions?: HandlerOptions<MoveFetchConfig, token.MutationInstance>,
|
49
50
|
eventFilter?: Omit<EventFilter, "type" | "account">,
|
50
51
|
): token {
|
51
52
|
this.onMoveEvent(
|
52
53
|
func,
|
53
54
|
{ ...(eventFilter ?? {}), type: "token::Mutation" },
|
54
|
-
|
55
|
+
handlerOptions,
|
55
56
|
);
|
56
57
|
return this;
|
57
58
|
}
|
58
59
|
|
59
60
|
onEventMutationEvent(
|
60
61
|
func: (event: token.MutationEventInstance, ctx: AptosContext) => void,
|
61
|
-
|
62
|
+
handlerOptions?: HandlerOptions<
|
63
|
+
MoveFetchConfig,
|
64
|
+
token.MutationEventInstance
|
65
|
+
>,
|
62
66
|
eventFilter?: Omit<EventFilter, "type" | "account">,
|
63
67
|
): token {
|
64
68
|
this.onMoveEvent(
|
65
69
|
func,
|
66
70
|
{ ...(eventFilter ?? {}), type: "token::MutationEvent" },
|
67
|
-
|
71
|
+
handlerOptions,
|
68
72
|
);
|
69
73
|
return this;
|
70
74
|
}
|
@@ -446,26 +450,29 @@ export class collection extends AptosBaseProcessor {
|
|
446
450
|
|
447
451
|
onEventBurn(
|
448
452
|
func: (event: collection.BurnInstance, ctx: AptosContext) => void,
|
449
|
-
|
453
|
+
handlerOptions?: HandlerOptions<MoveFetchConfig, collection.BurnInstance>,
|
450
454
|
eventFilter?: Omit<EventFilter, "type" | "account">,
|
451
455
|
): collection {
|
452
456
|
this.onMoveEvent(
|
453
457
|
func,
|
454
458
|
{ ...(eventFilter ?? {}), type: "collection::Burn" },
|
455
|
-
|
459
|
+
handlerOptions,
|
456
460
|
);
|
457
461
|
return this;
|
458
462
|
}
|
459
463
|
|
460
464
|
onEventBurnEvent(
|
461
465
|
func: (event: collection.BurnEventInstance, ctx: AptosContext) => void,
|
462
|
-
|
466
|
+
handlerOptions?: HandlerOptions<
|
467
|
+
MoveFetchConfig,
|
468
|
+
collection.BurnEventInstance
|
469
|
+
>,
|
463
470
|
eventFilter?: Omit<EventFilter, "type" | "account">,
|
464
471
|
): collection {
|
465
472
|
this.onMoveEvent(
|
466
473
|
func,
|
467
474
|
{ ...(eventFilter ?? {}), type: "collection::BurnEvent" },
|
468
|
-
|
475
|
+
handlerOptions,
|
469
476
|
);
|
470
477
|
return this;
|
471
478
|
}
|
@@ -475,13 +482,16 @@ export class collection extends AptosBaseProcessor {
|
|
475
482
|
event: collection.ConcurrentBurnEventInstance,
|
476
483
|
ctx: AptosContext,
|
477
484
|
) => void,
|
478
|
-
|
485
|
+
handlerOptions?: HandlerOptions<
|
486
|
+
MoveFetchConfig,
|
487
|
+
collection.ConcurrentBurnEventInstance
|
488
|
+
>,
|
479
489
|
eventFilter?: Omit<EventFilter, "type" | "account">,
|
480
490
|
): collection {
|
481
491
|
this.onMoveEvent(
|
482
492
|
func,
|
483
493
|
{ ...(eventFilter ?? {}), type: "collection::ConcurrentBurnEvent" },
|
484
|
-
|
494
|
+
handlerOptions,
|
485
495
|
);
|
486
496
|
return this;
|
487
497
|
}
|
@@ -491,78 +501,93 @@ export class collection extends AptosBaseProcessor {
|
|
491
501
|
event: collection.ConcurrentMintEventInstance,
|
492
502
|
ctx: AptosContext,
|
493
503
|
) => void,
|
494
|
-
|
504
|
+
handlerOptions?: HandlerOptions<
|
505
|
+
MoveFetchConfig,
|
506
|
+
collection.ConcurrentMintEventInstance
|
507
|
+
>,
|
495
508
|
eventFilter?: Omit<EventFilter, "type" | "account">,
|
496
509
|
): collection {
|
497
510
|
this.onMoveEvent(
|
498
511
|
func,
|
499
512
|
{ ...(eventFilter ?? {}), type: "collection::ConcurrentMintEvent" },
|
500
|
-
|
513
|
+
handlerOptions,
|
501
514
|
);
|
502
515
|
return this;
|
503
516
|
}
|
504
517
|
|
505
518
|
onEventMint(
|
506
519
|
func: (event: collection.MintInstance, ctx: AptosContext) => void,
|
507
|
-
|
520
|
+
handlerOptions?: HandlerOptions<MoveFetchConfig, collection.MintInstance>,
|
508
521
|
eventFilter?: Omit<EventFilter, "type" | "account">,
|
509
522
|
): collection {
|
510
523
|
this.onMoveEvent(
|
511
524
|
func,
|
512
525
|
{ ...(eventFilter ?? {}), type: "collection::Mint" },
|
513
|
-
|
526
|
+
handlerOptions,
|
514
527
|
);
|
515
528
|
return this;
|
516
529
|
}
|
517
530
|
|
518
531
|
onEventMintEvent(
|
519
532
|
func: (event: collection.MintEventInstance, ctx: AptosContext) => void,
|
520
|
-
|
533
|
+
handlerOptions?: HandlerOptions<
|
534
|
+
MoveFetchConfig,
|
535
|
+
collection.MintEventInstance
|
536
|
+
>,
|
521
537
|
eventFilter?: Omit<EventFilter, "type" | "account">,
|
522
538
|
): collection {
|
523
539
|
this.onMoveEvent(
|
524
540
|
func,
|
525
541
|
{ ...(eventFilter ?? {}), type: "collection::MintEvent" },
|
526
|
-
|
542
|
+
handlerOptions,
|
527
543
|
);
|
528
544
|
return this;
|
529
545
|
}
|
530
546
|
|
531
547
|
onEventMutation(
|
532
548
|
func: (event: collection.MutationInstance, ctx: AptosContext) => void,
|
533
|
-
|
549
|
+
handlerOptions?: HandlerOptions<
|
550
|
+
MoveFetchConfig,
|
551
|
+
collection.MutationInstance
|
552
|
+
>,
|
534
553
|
eventFilter?: Omit<EventFilter, "type" | "account">,
|
535
554
|
): collection {
|
536
555
|
this.onMoveEvent(
|
537
556
|
func,
|
538
557
|
{ ...(eventFilter ?? {}), type: "collection::Mutation" },
|
539
|
-
|
558
|
+
handlerOptions,
|
540
559
|
);
|
541
560
|
return this;
|
542
561
|
}
|
543
562
|
|
544
563
|
onEventMutationEvent(
|
545
564
|
func: (event: collection.MutationEventInstance, ctx: AptosContext) => void,
|
546
|
-
|
565
|
+
handlerOptions?: HandlerOptions<
|
566
|
+
MoveFetchConfig,
|
567
|
+
collection.MutationEventInstance
|
568
|
+
>,
|
547
569
|
eventFilter?: Omit<EventFilter, "type" | "account">,
|
548
570
|
): collection {
|
549
571
|
this.onMoveEvent(
|
550
572
|
func,
|
551
573
|
{ ...(eventFilter ?? {}), type: "collection::MutationEvent" },
|
552
|
-
|
574
|
+
handlerOptions,
|
553
575
|
);
|
554
576
|
return this;
|
555
577
|
}
|
556
578
|
|
557
579
|
onEventSetMaxSupply(
|
558
580
|
func: (event: collection.SetMaxSupplyInstance, ctx: AptosContext) => void,
|
559
|
-
|
581
|
+
handlerOptions?: HandlerOptions<
|
582
|
+
MoveFetchConfig,
|
583
|
+
collection.SetMaxSupplyInstance
|
584
|
+
>,
|
560
585
|
eventFilter?: Omit<EventFilter, "type" | "account">,
|
561
586
|
): collection {
|
562
587
|
this.onMoveEvent(
|
563
588
|
func,
|
564
589
|
{ ...(eventFilter ?? {}), type: "collection::SetMaxSupply" },
|
565
|
-
|
590
|
+
handlerOptions,
|
566
591
|
);
|
567
592
|
return this;
|
568
593
|
}
|
@@ -975,7 +1000,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
975
1000
|
onEntryBurn(
|
976
1001
|
func: (call: aptos_token.BurnPayload, ctx: AptosContext) => void,
|
977
1002
|
filter?: CallFilter,
|
978
|
-
|
1003
|
+
handlerOptions?: HandlerOptions<MoveFetchConfig, aptos_token.BurnPayload>,
|
979
1004
|
): aptos_token {
|
980
1005
|
this.onEntryFunctionCall(
|
981
1006
|
func,
|
@@ -983,7 +1008,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
983
1008
|
...filter,
|
984
1009
|
function: "aptos_token::burn",
|
985
1010
|
},
|
986
|
-
|
1011
|
+
handlerOptions,
|
987
1012
|
);
|
988
1013
|
return this;
|
989
1014
|
}
|
@@ -991,7 +1016,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
991
1016
|
onEntryMint(
|
992
1017
|
func: (call: aptos_token.MintPayload, ctx: AptosContext) => void,
|
993
1018
|
filter?: CallFilter,
|
994
|
-
|
1019
|
+
handlerOptions?: HandlerOptions<MoveFetchConfig, aptos_token.MintPayload>,
|
995
1020
|
): aptos_token {
|
996
1021
|
this.onEntryFunctionCall(
|
997
1022
|
func,
|
@@ -999,7 +1024,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
999
1024
|
...filter,
|
1000
1025
|
function: "aptos_token::mint",
|
1001
1026
|
},
|
1002
|
-
|
1027
|
+
handlerOptions,
|
1003
1028
|
);
|
1004
1029
|
return this;
|
1005
1030
|
}
|
@@ -1007,7 +1032,10 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1007
1032
|
onEntrySetDescription(
|
1008
1033
|
func: (call: aptos_token.SetDescriptionPayload, ctx: AptosContext) => void,
|
1009
1034
|
filter?: CallFilter,
|
1010
|
-
|
1035
|
+
handlerOptions?: HandlerOptions<
|
1036
|
+
MoveFetchConfig,
|
1037
|
+
aptos_token.SetDescriptionPayload
|
1038
|
+
>,
|
1011
1039
|
): aptos_token {
|
1012
1040
|
this.onEntryFunctionCall(
|
1013
1041
|
func,
|
@@ -1015,7 +1043,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1015
1043
|
...filter,
|
1016
1044
|
function: "aptos_token::set_description",
|
1017
1045
|
},
|
1018
|
-
|
1046
|
+
handlerOptions,
|
1019
1047
|
);
|
1020
1048
|
return this;
|
1021
1049
|
}
|
@@ -1023,7 +1051,10 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1023
1051
|
onEntrySetName(
|
1024
1052
|
func: (call: aptos_token.SetNamePayload, ctx: AptosContext) => void,
|
1025
1053
|
filter?: CallFilter,
|
1026
|
-
|
1054
|
+
handlerOptions?: HandlerOptions<
|
1055
|
+
MoveFetchConfig,
|
1056
|
+
aptos_token.SetNamePayload
|
1057
|
+
>,
|
1027
1058
|
): aptos_token {
|
1028
1059
|
this.onEntryFunctionCall(
|
1029
1060
|
func,
|
@@ -1031,7 +1062,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1031
1062
|
...filter,
|
1032
1063
|
function: "aptos_token::set_name",
|
1033
1064
|
},
|
1034
|
-
|
1065
|
+
handlerOptions,
|
1035
1066
|
);
|
1036
1067
|
return this;
|
1037
1068
|
}
|
@@ -1039,7 +1070,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1039
1070
|
onEntrySetUri(
|
1040
1071
|
func: (call: aptos_token.SetUriPayload, ctx: AptosContext) => void,
|
1041
1072
|
filter?: CallFilter,
|
1042
|
-
|
1073
|
+
handlerOptions?: HandlerOptions<MoveFetchConfig, aptos_token.SetUriPayload>,
|
1043
1074
|
): aptos_token {
|
1044
1075
|
this.onEntryFunctionCall(
|
1045
1076
|
func,
|
@@ -1047,7 +1078,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1047
1078
|
...filter,
|
1048
1079
|
function: "aptos_token::set_uri",
|
1049
1080
|
},
|
1050
|
-
|
1081
|
+
handlerOptions,
|
1051
1082
|
);
|
1052
1083
|
return this;
|
1053
1084
|
}
|
@@ -1055,7 +1086,10 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1055
1086
|
onEntryAddProperty(
|
1056
1087
|
func: (call: aptos_token.AddPropertyPayload, ctx: AptosContext) => void,
|
1057
1088
|
filter?: CallFilter,
|
1058
|
-
|
1089
|
+
handlerOptions?: HandlerOptions<
|
1090
|
+
MoveFetchConfig,
|
1091
|
+
aptos_token.AddPropertyPayload
|
1092
|
+
>,
|
1059
1093
|
): aptos_token {
|
1060
1094
|
this.onEntryFunctionCall(
|
1061
1095
|
func,
|
@@ -1063,7 +1097,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1063
1097
|
...filter,
|
1064
1098
|
function: "aptos_token::add_property",
|
1065
1099
|
},
|
1066
|
-
|
1100
|
+
handlerOptions,
|
1067
1101
|
);
|
1068
1102
|
return this;
|
1069
1103
|
}
|
@@ -1074,7 +1108,10 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1074
1108
|
ctx: AptosContext,
|
1075
1109
|
) => void,
|
1076
1110
|
filter?: CallFilter,
|
1077
|
-
|
1111
|
+
handlerOptions?: HandlerOptions<
|
1112
|
+
MoveFetchConfig,
|
1113
|
+
aptos_token.AddTypedPropertyPayload
|
1114
|
+
>,
|
1078
1115
|
): aptos_token {
|
1079
1116
|
this.onEntryFunctionCall(
|
1080
1117
|
func,
|
@@ -1082,7 +1119,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1082
1119
|
...filter,
|
1083
1120
|
function: "aptos_token::add_typed_property",
|
1084
1121
|
},
|
1085
|
-
|
1122
|
+
handlerOptions,
|
1086
1123
|
);
|
1087
1124
|
return this;
|
1088
1125
|
}
|
@@ -1093,7 +1130,10 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1093
1130
|
ctx: AptosContext,
|
1094
1131
|
) => void,
|
1095
1132
|
filter?: CallFilter,
|
1096
|
-
|
1133
|
+
handlerOptions?: HandlerOptions<
|
1134
|
+
MoveFetchConfig,
|
1135
|
+
aptos_token.CreateCollectionPayload
|
1136
|
+
>,
|
1097
1137
|
): aptos_token {
|
1098
1138
|
this.onEntryFunctionCall(
|
1099
1139
|
func,
|
@@ -1101,7 +1141,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1101
1141
|
...filter,
|
1102
1142
|
function: "aptos_token::create_collection",
|
1103
1143
|
},
|
1104
|
-
|
1144
|
+
handlerOptions,
|
1105
1145
|
);
|
1106
1146
|
return this;
|
1107
1147
|
}
|
@@ -1109,7 +1149,10 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1109
1149
|
onEntryFreezeTransfer(
|
1110
1150
|
func: (call: aptos_token.FreezeTransferPayload, ctx: AptosContext) => void,
|
1111
1151
|
filter?: CallFilter,
|
1112
|
-
|
1152
|
+
handlerOptions?: HandlerOptions<
|
1153
|
+
MoveFetchConfig,
|
1154
|
+
aptos_token.FreezeTransferPayload
|
1155
|
+
>,
|
1113
1156
|
): aptos_token {
|
1114
1157
|
this.onEntryFunctionCall(
|
1115
1158
|
func,
|
@@ -1117,7 +1160,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1117
1160
|
...filter,
|
1118
1161
|
function: "aptos_token::freeze_transfer",
|
1119
1162
|
},
|
1120
|
-
|
1163
|
+
handlerOptions,
|
1121
1164
|
);
|
1122
1165
|
return this;
|
1123
1166
|
}
|
@@ -1125,7 +1168,10 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1125
1168
|
onEntryMintSoulBound(
|
1126
1169
|
func: (call: aptos_token.MintSoulBoundPayload, ctx: AptosContext) => void,
|
1127
1170
|
filter?: CallFilter,
|
1128
|
-
|
1171
|
+
handlerOptions?: HandlerOptions<
|
1172
|
+
MoveFetchConfig,
|
1173
|
+
aptos_token.MintSoulBoundPayload
|
1174
|
+
>,
|
1129
1175
|
): aptos_token {
|
1130
1176
|
this.onEntryFunctionCall(
|
1131
1177
|
func,
|
@@ -1133,7 +1179,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1133
1179
|
...filter,
|
1134
1180
|
function: "aptos_token::mint_soul_bound",
|
1135
1181
|
},
|
1136
|
-
|
1182
|
+
handlerOptions,
|
1137
1183
|
);
|
1138
1184
|
return this;
|
1139
1185
|
}
|
@@ -1141,7 +1187,10 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1141
1187
|
onEntryRemoveProperty(
|
1142
1188
|
func: (call: aptos_token.RemovePropertyPayload, ctx: AptosContext) => void,
|
1143
1189
|
filter?: CallFilter,
|
1144
|
-
|
1190
|
+
handlerOptions?: HandlerOptions<
|
1191
|
+
MoveFetchConfig,
|
1192
|
+
aptos_token.RemovePropertyPayload
|
1193
|
+
>,
|
1145
1194
|
): aptos_token {
|
1146
1195
|
this.onEntryFunctionCall(
|
1147
1196
|
func,
|
@@ -1149,7 +1198,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1149
1198
|
...filter,
|
1150
1199
|
function: "aptos_token::remove_property",
|
1151
1200
|
},
|
1152
|
-
|
1201
|
+
handlerOptions,
|
1153
1202
|
);
|
1154
1203
|
return this;
|
1155
1204
|
}
|
@@ -1160,7 +1209,10 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1160
1209
|
ctx: AptosContext,
|
1161
1210
|
) => void,
|
1162
1211
|
filter?: CallFilter,
|
1163
|
-
|
1212
|
+
handlerOptions?: HandlerOptions<
|
1213
|
+
MoveFetchConfig,
|
1214
|
+
aptos_token.SetCollectionDescriptionPayload
|
1215
|
+
>,
|
1164
1216
|
): aptos_token {
|
1165
1217
|
this.onEntryFunctionCall(
|
1166
1218
|
func,
|
@@ -1168,7 +1220,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1168
1220
|
...filter,
|
1169
1221
|
function: "aptos_token::set_collection_description",
|
1170
1222
|
},
|
1171
|
-
|
1223
|
+
handlerOptions,
|
1172
1224
|
);
|
1173
1225
|
return this;
|
1174
1226
|
}
|
@@ -1179,7 +1231,10 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1179
1231
|
ctx: AptosContext,
|
1180
1232
|
) => void,
|
1181
1233
|
filter?: CallFilter,
|
1182
|
-
|
1234
|
+
handlerOptions?: HandlerOptions<
|
1235
|
+
MoveFetchConfig,
|
1236
|
+
aptos_token.SetCollectionRoyaltiesCallPayload
|
1237
|
+
>,
|
1183
1238
|
): aptos_token {
|
1184
1239
|
this.onEntryFunctionCall(
|
1185
1240
|
func,
|
@@ -1187,7 +1242,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1187
1242
|
...filter,
|
1188
1243
|
function: "aptos_token::set_collection_royalties_call",
|
1189
1244
|
},
|
1190
|
-
|
1245
|
+
handlerOptions,
|
1191
1246
|
);
|
1192
1247
|
return this;
|
1193
1248
|
}
|
@@ -1198,7 +1253,10 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1198
1253
|
ctx: AptosContext,
|
1199
1254
|
) => void,
|
1200
1255
|
filter?: CallFilter,
|
1201
|
-
|
1256
|
+
handlerOptions?: HandlerOptions<
|
1257
|
+
MoveFetchConfig,
|
1258
|
+
aptos_token.SetCollectionUriPayload
|
1259
|
+
>,
|
1202
1260
|
): aptos_token {
|
1203
1261
|
this.onEntryFunctionCall(
|
1204
1262
|
func,
|
@@ -1206,7 +1264,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1206
1264
|
...filter,
|
1207
1265
|
function: "aptos_token::set_collection_uri",
|
1208
1266
|
},
|
1209
|
-
|
1267
|
+
handlerOptions,
|
1210
1268
|
);
|
1211
1269
|
return this;
|
1212
1270
|
}
|
@@ -1217,7 +1275,10 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1217
1275
|
ctx: AptosContext,
|
1218
1276
|
) => void,
|
1219
1277
|
filter?: CallFilter,
|
1220
|
-
|
1278
|
+
handlerOptions?: HandlerOptions<
|
1279
|
+
MoveFetchConfig,
|
1280
|
+
aptos_token.UnfreezeTransferPayload
|
1281
|
+
>,
|
1221
1282
|
): aptos_token {
|
1222
1283
|
this.onEntryFunctionCall(
|
1223
1284
|
func,
|
@@ -1225,7 +1286,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1225
1286
|
...filter,
|
1226
1287
|
function: "aptos_token::unfreeze_transfer",
|
1227
1288
|
},
|
1228
|
-
|
1289
|
+
handlerOptions,
|
1229
1290
|
);
|
1230
1291
|
return this;
|
1231
1292
|
}
|
@@ -1233,7 +1294,10 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1233
1294
|
onEntryUpdateProperty(
|
1234
1295
|
func: (call: aptos_token.UpdatePropertyPayload, ctx: AptosContext) => void,
|
1235
1296
|
filter?: CallFilter,
|
1236
|
-
|
1297
|
+
handlerOptions?: HandlerOptions<
|
1298
|
+
MoveFetchConfig,
|
1299
|
+
aptos_token.UpdatePropertyPayload
|
1300
|
+
>,
|
1237
1301
|
): aptos_token {
|
1238
1302
|
this.onEntryFunctionCall(
|
1239
1303
|
func,
|
@@ -1241,7 +1305,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1241
1305
|
...filter,
|
1242
1306
|
function: "aptos_token::update_property",
|
1243
1307
|
},
|
1244
|
-
|
1308
|
+
handlerOptions,
|
1245
1309
|
);
|
1246
1310
|
return this;
|
1247
1311
|
}
|
@@ -1252,7 +1316,10 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1252
1316
|
ctx: AptosContext,
|
1253
1317
|
) => void,
|
1254
1318
|
filter?: CallFilter,
|
1255
|
-
|
1319
|
+
handlerOptions?: HandlerOptions<
|
1320
|
+
MoveFetchConfig,
|
1321
|
+
aptos_token.UpdateTypedPropertyPayload
|
1322
|
+
>,
|
1256
1323
|
): aptos_token {
|
1257
1324
|
this.onEntryFunctionCall(
|
1258
1325
|
func,
|
@@ -1260,7 +1327,7 @@ export class aptos_token extends AptosBaseProcessor {
|
|
1260
1327
|
...filter,
|
1261
1328
|
function: "aptos_token::update_typed_property",
|
1262
1329
|
},
|
1263
|
-
|
1330
|
+
handlerOptions,
|
1264
1331
|
);
|
1265
1332
|
return this;
|
1266
1333
|
}
|
@@ -2,7 +2,7 @@ import * as fs from 'fs'
|
|
2
2
|
import chalk from 'chalk'
|
3
3
|
import path, { join } from 'path'
|
4
4
|
import { AptosCodegen as BaseAptosCodegen } from '@typemove/aptos/codegen'
|
5
|
-
import { InternalMoveModule, InternalMoveStruct } from '@typemove/move'
|
5
|
+
import { InternalMoveModule, InternalMoveStruct, normalizeToJSName, camel, upperFirst } from '@typemove/move'
|
6
6
|
import { AptosNetwork, getRpcEndpoint } from '../network.js'
|
7
7
|
import { Event, MoveModuleBytecode, MoveResource } from '@aptos-labs/ts-sdk'
|
8
8
|
import { SharedNetworkCodegen } from '../../move/shared-network-codegen.js'
|
@@ -48,6 +48,39 @@ class AptosNetworkCodegen extends BaseAptosCodegen {
|
|
48
48
|
generateStructs(module: InternalMoveModule, struct: InternalMoveStruct, events: Set<string>) {
|
49
49
|
return generator.generateStructs(module, struct, events)
|
50
50
|
}
|
51
|
+
|
52
|
+
generateForOnEvents(module: InternalMoveModule, struct: InternalMoveStruct): string {
|
53
|
+
const moduleName = normalizeToJSName(module.name)
|
54
|
+
const source = `
|
55
|
+
onEvent${struct.name}(func: (event: ${moduleName}.${normalizeToJSName(struct.name)}Instance, ctx: ${
|
56
|
+
this.PREFIX
|
57
|
+
}Context) => void, handlerOptions?: HandlerOptions<MoveFetchConfig, ${moduleName}.${normalizeToJSName(struct.name)}Instance>, eventFilter?: Omit<EventFilter, "type"|"account">): ${moduleName} {
|
58
|
+
this.onMoveEvent(func, {...eventFilter ?? {}, type: '${module.name}::${struct.name}' }, handlerOptions)
|
59
|
+
return this
|
60
|
+
}`
|
61
|
+
return source
|
62
|
+
}
|
63
|
+
|
64
|
+
generateForEntryFunctions(module: InternalMoveModule, func: any): string {
|
65
|
+
if (!func.isEntry) {
|
66
|
+
return ''
|
67
|
+
}
|
68
|
+
|
69
|
+
const moduleName = normalizeToJSName(module.name)
|
70
|
+
const camelFuncName = upperFirst(camel(func.name))
|
71
|
+
|
72
|
+
const source = `
|
73
|
+
onEntry${camelFuncName}(func: (call: ${moduleName}.${camelFuncName}Payload, ctx: ${this.PREFIX}Context) => void, filter?: CallFilter, handlerOptions?: HandlerOptions<MoveFetchConfig, ${moduleName}.${camelFuncName}Payload>): ${moduleName} {
|
74
|
+
this.onEntryFunctionCall(func, {
|
75
|
+
...filter,
|
76
|
+
function: '${module.name}::${func.name}'
|
77
|
+
},
|
78
|
+
handlerOptions)
|
79
|
+
return this
|
80
|
+
}`
|
81
|
+
|
82
|
+
return source
|
83
|
+
}
|
51
84
|
})(network, this.chainAdapter)
|
52
85
|
}
|
53
86
|
|