@sentio/sdk 1.33.0 → 1.33.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 (69) hide show
  1. package/lib/builtin/internal/eacaggregatorproxy_processor.d.ts +0 -23
  2. package/lib/builtin/internal/eacaggregatorproxy_processor.js +0 -69
  3. package/lib/builtin/internal/eacaggregatorproxy_processor.js.map +1 -1
  4. package/lib/builtin/internal/erc1155_processor.d.ts +0 -8
  5. package/lib/builtin/internal/erc1155_processor.js +0 -24
  6. package/lib/builtin/internal/erc1155_processor.js.map +1 -1
  7. package/lib/builtin/internal/erc20_processor.d.ts +0 -18
  8. package/lib/builtin/internal/erc20_processor.js +0 -54
  9. package/lib/builtin/internal/erc20_processor.js.map +1 -1
  10. package/lib/builtin/internal/erc20bytes_processor.d.ts +0 -9
  11. package/lib/builtin/internal/erc20bytes_processor.js +0 -27
  12. package/lib/builtin/internal/erc20bytes_processor.js.map +1 -1
  13. package/lib/builtin/internal/erc721_processor.d.ts +0 -14
  14. package/lib/builtin/internal/erc721_processor.js +0 -42
  15. package/lib/builtin/internal/erc721_processor.js.map +1 -1
  16. package/lib/builtin/internal/factories/EACAggregatorProxy__factory.js +1 -0
  17. package/lib/builtin/internal/factories/EACAggregatorProxy__factory.js.map +1 -1
  18. package/lib/builtin/internal/factories/ERC1155__factory.js +1 -0
  19. package/lib/builtin/internal/factories/ERC1155__factory.js.map +1 -1
  20. package/lib/builtin/internal/factories/ERC20Bytes__factory.js +1 -0
  21. package/lib/builtin/internal/factories/ERC20Bytes__factory.js.map +1 -1
  22. package/lib/builtin/internal/factories/ERC20__factory.js +1 -0
  23. package/lib/builtin/internal/factories/ERC20__factory.js.map +1 -1
  24. package/lib/builtin/internal/factories/ERC721__factory.js +1 -0
  25. package/lib/builtin/internal/factories/ERC721__factory.js.map +1 -1
  26. package/lib/builtin/internal/factories/WETH9__factory.js +1 -0
  27. package/lib/builtin/internal/factories/WETH9__factory.js.map +1 -1
  28. package/lib/builtin/internal/weth9_processor.d.ts +0 -11
  29. package/lib/builtin/internal/weth9_processor.js +0 -33
  30. package/lib/builtin/internal/weth9_processor.js.map +1 -1
  31. package/lib/target-ethers-sentio/event-handler.d.ts +3 -0
  32. package/lib/target-ethers-sentio/event-handler.js +35 -0
  33. package/lib/target-ethers-sentio/event-handler.js.map +1 -0
  34. package/lib/target-ethers-sentio/{codegen.d.ts → file.d.ts} +0 -0
  35. package/lib/target-ethers-sentio/{codegen.js → file.js} +13 -110
  36. package/lib/target-ethers-sentio/file.js.map +1 -0
  37. package/lib/target-ethers-sentio/{functions.d.ts → functions-handler.d.ts} +1 -1
  38. package/lib/target-ethers-sentio/{functions.js → functions-handler.js} +9 -20
  39. package/lib/target-ethers-sentio/functions-handler.js.map +1 -0
  40. package/lib/target-ethers-sentio/index.d.ts +1 -0
  41. package/lib/target-ethers-sentio/index.js +13 -4
  42. package/lib/target-ethers-sentio/index.js.map +1 -1
  43. package/lib/target-ethers-sentio/types.d.ts +4 -0
  44. package/lib/target-ethers-sentio/types.js +46 -0
  45. package/lib/target-ethers-sentio/types.js.map +1 -0
  46. package/lib/target-ethers-sentio/view-function.d.ts +5 -0
  47. package/lib/target-ethers-sentio/view-function.js +74 -0
  48. package/lib/target-ethers-sentio/view-function.js.map +1 -0
  49. package/package.json +1 -1
  50. package/src/builtin/internal/eacaggregatorproxy_processor.ts +0 -189
  51. package/src/builtin/internal/erc1155_processor.ts +0 -46
  52. package/src/builtin/internal/erc20_processor.ts +0 -96
  53. package/src/builtin/internal/erc20bytes_processor.ts +0 -52
  54. package/src/builtin/internal/erc721_processor.ts +0 -82
  55. package/src/builtin/internal/factories/EACAggregatorProxy__factory.ts +1 -0
  56. package/src/builtin/internal/factories/ERC1155__factory.ts +1 -0
  57. package/src/builtin/internal/factories/ERC20Bytes__factory.ts +1 -0
  58. package/src/builtin/internal/factories/ERC20__factory.ts +1 -0
  59. package/src/builtin/internal/factories/ERC721__factory.ts +1 -0
  60. package/src/builtin/internal/factories/WETH9__factory.ts +1 -0
  61. package/src/builtin/internal/weth9_processor.ts +0 -58
  62. package/src/target-ethers-sentio/event-handler.ts +31 -0
  63. package/src/target-ethers-sentio/{codegen.ts → file.ts} +11 -117
  64. package/src/target-ethers-sentio/{functions.ts → functions-handler.ts} +5 -16
  65. package/src/target-ethers-sentio/index.ts +11 -1
  66. package/src/target-ethers-sentio/types.ts +42 -0
  67. package/src/target-ethers-sentio/view-function.ts +79 -0
  68. package/lib/target-ethers-sentio/codegen.js.map +0 -1
  69. package/lib/target-ethers-sentio/functions.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view-function.js","sourceRoot":"","sources":["../../src/target-ethers-sentio/view-function.ts"],"names":[],"mappings":"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"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sentio/sdk",
3
3
  "license": "Apache-2.0",
4
- "version": "1.33.0",
4
+ "version": "1.33.1",
5
5
  "scripts": {
6
6
  "compile_target": "yarn tsc -b src/target-ethers-sentio/tsconfig.json",
7
7
  "compile": "tsc -p . && cp src/cli/webpack.config.js lib/cli && cp src/utils/*.csv lib/utils",
@@ -913,195 +913,6 @@ export class EACAggregatorProxyProcessorTemplate extends BaseProcessorTemplate<
913
913
  }
914
914
  return super.onEvent(handler, filter!);
915
915
  }
916
-
917
- onCallAcceptOwnership(
918
- handler: (
919
- call: AcceptOwnershipCallTrace,
920
- ctx: EACAggregatorProxyContext
921
- ) => void
922
- ) {
923
- return super.onTrace("0x79ba5097", handler);
924
- }
925
-
926
- onCallAccessController(
927
- handler: (
928
- call: AccessControllerCallTrace,
929
- ctx: EACAggregatorProxyContext
930
- ) => void
931
- ) {
932
- return super.onTrace("0xbc43cbaf", handler);
933
- }
934
-
935
- onCallAggregator(
936
- handler: (call: AggregatorCallTrace, ctx: EACAggregatorProxyContext) => void
937
- ) {
938
- return super.onTrace("0x245a7bfc", handler);
939
- }
940
-
941
- onCallConfirmAggregator(
942
- handler: (
943
- call: ConfirmAggregatorCallTrace,
944
- ctx: EACAggregatorProxyContext
945
- ) => void
946
- ) {
947
- return super.onTrace("0xa928c096", handler);
948
- }
949
-
950
- onCallDecimals(
951
- handler: (call: DecimalsCallTrace, ctx: EACAggregatorProxyContext) => void
952
- ) {
953
- return super.onTrace("0x313ce567", handler);
954
- }
955
-
956
- onCallDescription(
957
- handler: (
958
- call: DescriptionCallTrace,
959
- ctx: EACAggregatorProxyContext
960
- ) => void
961
- ) {
962
- return super.onTrace("0x7284e416", handler);
963
- }
964
-
965
- onCallGetAnswer(
966
- handler: (call: GetAnswerCallTrace, ctx: EACAggregatorProxyContext) => void
967
- ) {
968
- return super.onTrace("0xb5ab58dc", handler);
969
- }
970
-
971
- onCallGetRoundData(
972
- handler: (
973
- call: GetRoundDataCallTrace,
974
- ctx: EACAggregatorProxyContext
975
- ) => void
976
- ) {
977
- return super.onTrace("0x9a6fc8f5", handler);
978
- }
979
-
980
- onCallGetTimestamp(
981
- handler: (
982
- call: GetTimestampCallTrace,
983
- ctx: EACAggregatorProxyContext
984
- ) => void
985
- ) {
986
- return super.onTrace("0xb633620c", handler);
987
- }
988
-
989
- onCallLatestAnswer(
990
- handler: (
991
- call: LatestAnswerCallTrace,
992
- ctx: EACAggregatorProxyContext
993
- ) => void
994
- ) {
995
- return super.onTrace("0x50d25bcd", handler);
996
- }
997
-
998
- onCallLatestRound(
999
- handler: (
1000
- call: LatestRoundCallTrace,
1001
- ctx: EACAggregatorProxyContext
1002
- ) => void
1003
- ) {
1004
- return super.onTrace("0x668a0f02", handler);
1005
- }
1006
-
1007
- onCallLatestRoundData(
1008
- handler: (
1009
- call: LatestRoundDataCallTrace,
1010
- ctx: EACAggregatorProxyContext
1011
- ) => void
1012
- ) {
1013
- return super.onTrace("0xfeaf968c", handler);
1014
- }
1015
-
1016
- onCallLatestTimestamp(
1017
- handler: (
1018
- call: LatestTimestampCallTrace,
1019
- ctx: EACAggregatorProxyContext
1020
- ) => void
1021
- ) {
1022
- return super.onTrace("0x8205bf6a", handler);
1023
- }
1024
-
1025
- onCallOwner(
1026
- handler: (call: OwnerCallTrace, ctx: EACAggregatorProxyContext) => void
1027
- ) {
1028
- return super.onTrace("0x8da5cb5b", handler);
1029
- }
1030
-
1031
- onCallPhaseAggregators(
1032
- handler: (
1033
- call: PhaseAggregatorsCallTrace,
1034
- ctx: EACAggregatorProxyContext
1035
- ) => void
1036
- ) {
1037
- return super.onTrace("0xc1597304", handler);
1038
- }
1039
-
1040
- onCallPhaseId(
1041
- handler: (call: PhaseIdCallTrace, ctx: EACAggregatorProxyContext) => void
1042
- ) {
1043
- return super.onTrace("0x58303b10", handler);
1044
- }
1045
-
1046
- onCallProposeAggregator(
1047
- handler: (
1048
- call: ProposeAggregatorCallTrace,
1049
- ctx: EACAggregatorProxyContext
1050
- ) => void
1051
- ) {
1052
- return super.onTrace("0xf8a2abd3", handler);
1053
- }
1054
-
1055
- onCallProposedAggregator(
1056
- handler: (
1057
- call: ProposedAggregatorCallTrace,
1058
- ctx: EACAggregatorProxyContext
1059
- ) => void
1060
- ) {
1061
- return super.onTrace("0xe8c4be30", handler);
1062
- }
1063
-
1064
- onCallProposedGetRoundData(
1065
- handler: (
1066
- call: ProposedGetRoundDataCallTrace,
1067
- ctx: EACAggregatorProxyContext
1068
- ) => void
1069
- ) {
1070
- return super.onTrace("0x6001ac53", handler);
1071
- }
1072
-
1073
- onCallProposedLatestRoundData(
1074
- handler: (
1075
- call: ProposedLatestRoundDataCallTrace,
1076
- ctx: EACAggregatorProxyContext
1077
- ) => void
1078
- ) {
1079
- return super.onTrace("0x8f6b4d91", handler);
1080
- }
1081
-
1082
- onCallSetController(
1083
- handler: (
1084
- call: SetControllerCallTrace,
1085
- ctx: EACAggregatorProxyContext
1086
- ) => void
1087
- ) {
1088
- return super.onTrace("0x92eefe9b", handler);
1089
- }
1090
-
1091
- onCallTransferOwnership(
1092
- handler: (
1093
- call: TransferOwnershipCallTrace,
1094
- ctx: EACAggregatorProxyContext
1095
- ) => void
1096
- ) {
1097
- return super.onTrace("0xf2fde38b", handler);
1098
- }
1099
-
1100
- onCallVersion(
1101
- handler: (call: VersionCallTrace, ctx: EACAggregatorProxyContext) => void
1102
- ) {
1103
- return super.onTrace("0x54fd4d50", handler);
1104
- }
1105
916
  }
1106
917
 
1107
918
  export class EACAggregatorProxyProcessor extends BaseProcessor<
@@ -388,52 +388,6 @@ export class ERC1155ProcessorTemplate extends BaseProcessorTemplate<
388
388
  }
389
389
  return super.onEvent(handler, filter!);
390
390
  }
391
-
392
- onCallBalanceOf(
393
- handler: (call: BalanceOfCallTrace, ctx: ERC1155Context) => void
394
- ) {
395
- return super.onTrace("0x00fdd58e", handler);
396
- }
397
-
398
- onCallBalanceOfBatch(
399
- handler: (call: BalanceOfBatchCallTrace, ctx: ERC1155Context) => void
400
- ) {
401
- return super.onTrace("0x4e1273f4", handler);
402
- }
403
-
404
- onCallIsApprovedForAll(
405
- handler: (call: IsApprovedForAllCallTrace, ctx: ERC1155Context) => void
406
- ) {
407
- return super.onTrace("0xe985e9c5", handler);
408
- }
409
-
410
- onCallSafeBatchTransferFrom(
411
- handler: (call: SafeBatchTransferFromCallTrace, ctx: ERC1155Context) => void
412
- ) {
413
- return super.onTrace("0x2eb2c2d6", handler);
414
- }
415
-
416
- onCallSafeTransferFrom(
417
- handler: (call: SafeTransferFromCallTrace, ctx: ERC1155Context) => void
418
- ) {
419
- return super.onTrace("0xf242432a", handler);
420
- }
421
-
422
- onCallSetApprovalForAll(
423
- handler: (call: SetApprovalForAllCallTrace, ctx: ERC1155Context) => void
424
- ) {
425
- return super.onTrace("0xa22cb465", handler);
426
- }
427
-
428
- onCallSupportsInterface(
429
- handler: (call: SupportsInterfaceCallTrace, ctx: ERC1155Context) => void
430
- ) {
431
- return super.onTrace("0x01ffc9a7", handler);
432
- }
433
-
434
- onCallUri(handler: (call: UriCallTrace, ctx: ERC1155Context) => void) {
435
- return super.onTrace("0x0e89341c", handler);
436
- }
437
391
  }
438
392
 
439
393
  export class ERC1155Processor extends BaseProcessor<
@@ -481,102 +481,6 @@ export class ERC20ProcessorTemplate extends BaseProcessorTemplate<
481
481
  }
482
482
  return super.onEvent(handler, filter!);
483
483
  }
484
-
485
- onCallAllowance(
486
- handler: (call: AllowanceCallTrace, ctx: ERC20Context) => void
487
- ) {
488
- return super.onTrace("0xdd62ed3e", handler);
489
- }
490
-
491
- onCallApprove(handler: (call: ApproveCallTrace, ctx: ERC20Context) => void) {
492
- return super.onTrace("0x095ea7b3", handler);
493
- }
494
-
495
- onCallBalanceOf(
496
- handler: (call: BalanceOfCallTrace, ctx: ERC20Context) => void
497
- ) {
498
- return super.onTrace("0x70a08231", handler);
499
- }
500
-
501
- onCallBurn(handler: (call: BurnCallTrace, ctx: ERC20Context) => void) {
502
- return super.onTrace("0x42966c68", handler);
503
- }
504
-
505
- onCallBurnFrom(
506
- handler: (call: BurnFromCallTrace, ctx: ERC20Context) => void
507
- ) {
508
- return super.onTrace("0x79cc6790", handler);
509
- }
510
-
511
- onCallDecimals(
512
- handler: (call: DecimalsCallTrace, ctx: ERC20Context) => void
513
- ) {
514
- return super.onTrace("0x313ce567", handler);
515
- }
516
-
517
- onCallDecreaseAllowance(
518
- handler: (call: DecreaseAllowanceCallTrace, ctx: ERC20Context) => void
519
- ) {
520
- return super.onTrace("0xa457c2d7", handler);
521
- }
522
-
523
- onCallIncreaseAllowance(
524
- handler: (call: IncreaseAllowanceCallTrace, ctx: ERC20Context) => void
525
- ) {
526
- return super.onTrace("0x39509351", handler);
527
- }
528
-
529
- onCallLocker(handler: (call: LockerCallTrace, ctx: ERC20Context) => void) {
530
- return super.onTrace("0xd7b96d4e", handler);
531
- }
532
-
533
- onCallName(handler: (call: NameCallTrace, ctx: ERC20Context) => void) {
534
- return super.onTrace("0x06fdde03", handler);
535
- }
536
-
537
- onCallOwner(handler: (call: OwnerCallTrace, ctx: ERC20Context) => void) {
538
- return super.onTrace("0x8da5cb5b", handler);
539
- }
540
-
541
- onCallRenounceOwnership(
542
- handler: (call: RenounceOwnershipCallTrace, ctx: ERC20Context) => void
543
- ) {
544
- return super.onTrace("0x715018a6", handler);
545
- }
546
-
547
- onCallSetLocker(
548
- handler: (call: SetLockerCallTrace, ctx: ERC20Context) => void
549
- ) {
550
- return super.onTrace("0x171060ec", handler);
551
- }
552
-
553
- onCallSymbol(handler: (call: SymbolCallTrace, ctx: ERC20Context) => void) {
554
- return super.onTrace("0x95d89b41", handler);
555
- }
556
-
557
- onCallTotalSupply(
558
- handler: (call: TotalSupplyCallTrace, ctx: ERC20Context) => void
559
- ) {
560
- return super.onTrace("0x18160ddd", handler);
561
- }
562
-
563
- onCallTransfer(
564
- handler: (call: TransferCallTrace, ctx: ERC20Context) => void
565
- ) {
566
- return super.onTrace("0xa9059cbb", handler);
567
- }
568
-
569
- onCallTransferFrom(
570
- handler: (call: TransferFromCallTrace, ctx: ERC20Context) => void
571
- ) {
572
- return super.onTrace("0x23b872dd", handler);
573
- }
574
-
575
- onCallTransferOwnership(
576
- handler: (call: TransferOwnershipCallTrace, ctx: ERC20Context) => void
577
- ) {
578
- return super.onTrace("0xf2fde38b", handler);
579
- }
580
484
  }
581
485
 
582
486
  export class ERC20Processor extends BaseProcessor<
@@ -344,58 +344,6 @@ export class ERC20BytesProcessorTemplate extends BaseProcessorTemplate<
344
344
  }
345
345
  return super.onEvent(handler, filter!);
346
346
  }
347
-
348
- onCallName(handler: (call: NameCallTrace, ctx: ERC20BytesContext) => void) {
349
- return super.onTrace("0x06fdde03", handler);
350
- }
351
-
352
- onCallApprove(
353
- handler: (call: ApproveCallTrace, ctx: ERC20BytesContext) => void
354
- ) {
355
- return super.onTrace("0x095ea7b3", handler);
356
- }
357
-
358
- onCallTotalSupply(
359
- handler: (call: TotalSupplyCallTrace, ctx: ERC20BytesContext) => void
360
- ) {
361
- return super.onTrace("0x18160ddd", handler);
362
- }
363
-
364
- onCallTransferFrom(
365
- handler: (call: TransferFromCallTrace, ctx: ERC20BytesContext) => void
366
- ) {
367
- return super.onTrace("0x23b872dd", handler);
368
- }
369
-
370
- onCallDecimals(
371
- handler: (call: DecimalsCallTrace, ctx: ERC20BytesContext) => void
372
- ) {
373
- return super.onTrace("0x313ce567", handler);
374
- }
375
-
376
- onCallBalanceOf(
377
- handler: (call: BalanceOfCallTrace, ctx: ERC20BytesContext) => void
378
- ) {
379
- return super.onTrace("0x70a08231", handler);
380
- }
381
-
382
- onCallSymbol(
383
- handler: (call: SymbolCallTrace, ctx: ERC20BytesContext) => void
384
- ) {
385
- return super.onTrace("0x95d89b41", handler);
386
- }
387
-
388
- onCallTransfer(
389
- handler: (call: TransferCallTrace, ctx: ERC20BytesContext) => void
390
- ) {
391
- return super.onTrace("0xa9059cbb", handler);
392
- }
393
-
394
- onCallAllowance(
395
- handler: (call: AllowanceCallTrace, ctx: ERC20BytesContext) => void
396
- ) {
397
- return super.onTrace("0xdd62ed3e", handler);
398
- }
399
347
  }
400
348
 
401
349
  export class ERC20BytesProcessor extends BaseProcessor<
@@ -518,88 +518,6 @@ export class ERC721ProcessorTemplate extends BaseProcessorTemplate<
518
518
  }
519
519
  return super.onEvent(handler, filter!);
520
520
  }
521
-
522
- onCallApprove(handler: (call: ApproveCallTrace, ctx: ERC721Context) => void) {
523
- return super.onTrace("0x095ea7b3", handler);
524
- }
525
-
526
- onCallTotalSupply(
527
- handler: (call: TotalSupplyCallTrace, ctx: ERC721Context) => void
528
- ) {
529
- return super.onTrace("0x18160ddd", handler);
530
- }
531
-
532
- onCallBalanceOf(
533
- handler: (call: BalanceOfCallTrace, ctx: ERC721Context) => void
534
- ) {
535
- return super.onTrace("0x70a08231", handler);
536
- }
537
-
538
- onCallGetApproved(
539
- handler: (call: GetApprovedCallTrace, ctx: ERC721Context) => void
540
- ) {
541
- return super.onTrace("0x081812fc", handler);
542
- }
543
-
544
- onCallIsApprovedForAll(
545
- handler: (call: IsApprovedForAllCallTrace, ctx: ERC721Context) => void
546
- ) {
547
- return super.onTrace("0xe985e9c5", handler);
548
- }
549
-
550
- onCallName(handler: (call: NameCallTrace, ctx: ERC721Context) => void) {
551
- return super.onTrace("0x06fdde03", handler);
552
- }
553
-
554
- onCallOwnerOf(handler: (call: OwnerOfCallTrace, ctx: ERC721Context) => void) {
555
- return super.onTrace("0x6352211e", handler);
556
- }
557
-
558
- onCallSafeTransferFrom_address_address_uint256(
559
- handler: (
560
- call: SafeTransferFrom_address_address_uint256CallTrace,
561
- ctx: ERC721Context
562
- ) => void
563
- ) {
564
- return super.onTrace("0x42842e0e", handler);
565
- }
566
-
567
- onCallSafeTransferFrom_address_address_uint256_bytes(
568
- handler: (
569
- call: SafeTransferFrom_address_address_uint256_bytesCallTrace,
570
- ctx: ERC721Context
571
- ) => void
572
- ) {
573
- return super.onTrace("0xb88d4fde", handler);
574
- }
575
-
576
- onCallSetApprovalForAll(
577
- handler: (call: SetApprovalForAllCallTrace, ctx: ERC721Context) => void
578
- ) {
579
- return super.onTrace("0xa22cb465", handler);
580
- }
581
-
582
- onCallSupportsInterface(
583
- handler: (call: SupportsInterfaceCallTrace, ctx: ERC721Context) => void
584
- ) {
585
- return super.onTrace("0x01ffc9a7", handler);
586
- }
587
-
588
- onCallSymbol(handler: (call: SymbolCallTrace, ctx: ERC721Context) => void) {
589
- return super.onTrace("0x95d89b41", handler);
590
- }
591
-
592
- onCallTokenURI(
593
- handler: (call: TokenURICallTrace, ctx: ERC721Context) => void
594
- ) {
595
- return super.onTrace("0xc87b56dd", handler);
596
- }
597
-
598
- onCallTransferFrom(
599
- handler: (call: TransferFromCallTrace, ctx: ERC721Context) => void
600
- ) {
601
- return super.onTrace("0x23b872dd", handler);
602
- }
603
521
  }
604
522
 
605
523
  export class ERC721Processor extends BaseProcessor<
@@ -1,6 +1,7 @@
1
1
  /* Autogenerated file. Do not edit manually. */
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
+ // @ts-nocheck
4
5
 
5
6
  import { Contract, Signer, utils } from "ethers";
6
7
  import type { Provider } from "@ethersproject/providers";
@@ -1,6 +1,7 @@
1
1
  /* Autogenerated file. Do not edit manually. */
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
+ // @ts-nocheck
4
5
 
5
6
  import { Contract, Signer, utils } from "ethers";
6
7
  import type { Provider } from "@ethersproject/providers";
@@ -1,6 +1,7 @@
1
1
  /* Autogenerated file. Do not edit manually. */
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
+ // @ts-nocheck
4
5
 
5
6
  import { Contract, Signer, utils } from "ethers";
6
7
  import type { Provider } from "@ethersproject/providers";
@@ -1,6 +1,7 @@
1
1
  /* Autogenerated file. Do not edit manually. */
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
+ // @ts-nocheck
4
5
 
5
6
  import { Contract, Signer, utils } from "ethers";
6
7
  import type { Provider } from "@ethersproject/providers";
@@ -1,6 +1,7 @@
1
1
  /* Autogenerated file. Do not edit manually. */
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
+ // @ts-nocheck
4
5
 
5
6
  import { Contract, Signer, utils } from "ethers";
6
7
  import type { Provider } from "@ethersproject/providers";
@@ -1,6 +1,7 @@
1
1
  /* Autogenerated file. Do not edit manually. */
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
+ // @ts-nocheck
4
5
 
5
6
  import { Contract, Signer, utils } from "ethers";
6
7
  import type { Provider } from "@ethersproject/providers";
@@ -378,64 +378,6 @@ export class WETH9ProcessorTemplate extends BaseProcessorTemplate<
378
378
  }
379
379
  return super.onEvent(handler, filter!);
380
380
  }
381
-
382
- onCallName(handler: (call: NameCallTrace, ctx: WETH9Context) => void) {
383
- return super.onTrace("0x06fdde03", handler);
384
- }
385
-
386
- onCallApprove(handler: (call: ApproveCallTrace, ctx: WETH9Context) => void) {
387
- return super.onTrace("0x095ea7b3", handler);
388
- }
389
-
390
- onCallTotalSupply(
391
- handler: (call: TotalSupplyCallTrace, ctx: WETH9Context) => void
392
- ) {
393
- return super.onTrace("0x18160ddd", handler);
394
- }
395
-
396
- onCallTransferFrom(
397
- handler: (call: TransferFromCallTrace, ctx: WETH9Context) => void
398
- ) {
399
- return super.onTrace("0x23b872dd", handler);
400
- }
401
-
402
- onCallWithdraw(
403
- handler: (call: WithdrawCallTrace, ctx: WETH9Context) => void
404
- ) {
405
- return super.onTrace("0x2e1a7d4d", handler);
406
- }
407
-
408
- onCallDecimals(
409
- handler: (call: DecimalsCallTrace, ctx: WETH9Context) => void
410
- ) {
411
- return super.onTrace("0x313ce567", handler);
412
- }
413
-
414
- onCallBalanceOf(
415
- handler: (call: BalanceOfCallTrace, ctx: WETH9Context) => void
416
- ) {
417
- return super.onTrace("0x70a08231", handler);
418
- }
419
-
420
- onCallSymbol(handler: (call: SymbolCallTrace, ctx: WETH9Context) => void) {
421
- return super.onTrace("0x95d89b41", handler);
422
- }
423
-
424
- onCallTransfer(
425
- handler: (call: TransferCallTrace, ctx: WETH9Context) => void
426
- ) {
427
- return super.onTrace("0xa9059cbb", handler);
428
- }
429
-
430
- onCallDeposit(handler: (call: DepositCallTrace, ctx: WETH9Context) => void) {
431
- return super.onTrace("0xd0e30db0", handler);
432
- }
433
-
434
- onCallAllowance(
435
- handler: (call: AllowanceCallTrace, ctx: WETH9Context) => void
436
- ) {
437
- return super.onTrace("0xdd62ed3e", handler);
438
- }
439
381
  }
440
382
 
441
383
  export class WETH9Processor extends BaseProcessor<
@@ -0,0 +1,31 @@
1
+ import { EventDeclaration, getFullSignatureAsSymbolForEvent } from 'typechain'
2
+ import { getFullSignatureForEventPatched } from './types'
3
+
4
+ export function generateEventHandler(event: EventDeclaration, contractName: string, includeArgTypes: boolean): string {
5
+ const eventName = includeArgTypes ? getFullSignatureAsSymbolForEvent(event) : event.name
6
+ const eventNamePrefix = includeArgTypes ? eventName + '_' : eventName
7
+
8
+ const filterName = getFullSignatureForEventPatched(event)
9
+ return `
10
+ onEvent${eventName}(
11
+ handler: (event: ${eventNamePrefix}Event, ctx: ${contractName}Context) => void,
12
+ filter?: ${eventNamePrefix}EventFilter | ${eventNamePrefix}EventFilter[]
13
+ ) {
14
+ if (!filter) {
15
+ // @ts-ignore
16
+ filter = ${contractName}Processor.filters[
17
+ // @ts-ignore
18
+ '${filterName}'](${event.inputs.map(() => 'null').join(',')})
19
+ }
20
+ return super.onEvent(handler, filter!)
21
+ }
22
+ `
23
+ }
24
+
25
+ export function generateEventHandlers(events: EventDeclaration[], contractName: string): string {
26
+ if (events.length === 1) {
27
+ return generateEventHandler(events[0], contractName, false)
28
+ } else {
29
+ return events.map((e) => generateEventHandler(e, contractName, true)).join('\n')
30
+ }
31
+ }