@sentio/sdk 2.7.2 → 2.7.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.
@@ -55,7 +55,7 @@ export class AptosBaseProcessor {
55
55
  handler: (transaction: Transaction_UserTransaction, ctx: AptosContext) => void,
56
56
  includedFailed = false,
57
57
  fetchConfig?: MoveFetchConfig
58
- ): AptosBaseProcessor {
58
+ ): this {
59
59
  const _fetchConfig = fetchConfig || MoveFetchConfig.fromPartial({})
60
60
 
61
61
  // const address = this.config.address
@@ -87,7 +87,7 @@ export class AptosBaseProcessor {
87
87
  handler: (event: EventInstance, ctx: AptosContext) => void,
88
88
  filter: EventFilter | EventFilter[],
89
89
  fetchConfig?: MoveFetchConfig
90
- ): AptosBaseProcessor {
90
+ ): this {
91
91
  let _filters: EventFilter[] = []
92
92
  const _fetchConfig = fetchConfig || MoveFetchConfig.fromPartial({})
93
93
 
@@ -140,7 +140,7 @@ export class AptosBaseProcessor {
140
140
  handler: (call: TransactionPayload_EntryFunctionPayload, ctx: AptosContext) => void,
141
141
  filter: FunctionNameAndCallFilter | FunctionNameAndCallFilter[],
142
142
  fetchConfig?: MoveFetchConfig
143
- ): AptosBaseProcessor {
143
+ ): this {
144
144
  let _filters: FunctionNameAndCallFilter[] = []
145
145
  const _fetchConfig = fetchConfig || MoveFetchConfig.fromPartial({})
146
146
 
@@ -225,7 +225,7 @@ export class AptosAccountProcessor {
225
225
  timeInterval: HandleInterval | undefined,
226
226
  versionInterval: HandleInterval | undefined,
227
227
  type: string | undefined
228
- ) {
228
+ ): this {
229
229
  const processor = this
230
230
  this.resourcesHandlers.push({
231
231
  handler: async function (data) {
@@ -255,7 +255,7 @@ export class AptosAccountProcessor {
255
255
  timeIntervalInMinutes = 60,
256
256
  backfillTimeIntervalInMinutes = 240,
257
257
  type?: string
258
- ) {
258
+ ): this {
259
259
  return this.onInterval(
260
260
  handler,
261
261
  {
@@ -272,7 +272,7 @@ export class AptosAccountProcessor {
272
272
  versionInterval = 100000,
273
273
  backfillVersionInterval = 400000,
274
274
  typePrefix?: string
275
- ) {
275
+ ): this {
276
276
  return this.onInterval(
277
277
  handler,
278
278
  undefined,
@@ -81,7 +81,7 @@ export abstract class BaseProcessor<
81
81
  handler: (event: EthEvent, ctx: ContractContext<TContract, TBoundContractView>) => PromiseOrVoid,
82
82
  filter: DeferredTopicFilter | DeferredTopicFilter[],
83
83
  fetchConfig?: Partial<EthFetchConfig>
84
- ) {
84
+ ): this {
85
85
  const chainId = this.getChainId()
86
86
  let _filters: DeferredTopicFilter[] = []
87
87
 
@@ -133,7 +133,7 @@ export abstract class BaseProcessor<
133
133
  handler: (block: BlockParams, ctx: ContractContext<TContract, TBoundContractView>) => PromiseOrVoid,
134
134
  blockInterval = 250,
135
135
  backfillBlockInterval = 1000
136
- ) {
136
+ ): this {
137
137
  return this.onInterval(handler, undefined, {
138
138
  recentInterval: blockInterval,
139
139
  backfillInterval: backfillBlockInterval,
@@ -144,7 +144,7 @@ export abstract class BaseProcessor<
144
144
  handler: (block: BlockParams, ctx: ContractContext<TContract, TBoundContractView>) => PromiseOrVoid,
145
145
  timeIntervalInMinutes = 60,
146
146
  backfillTimeIntervalInMinutes = 240
147
- ) {
147
+ ): this {
148
148
  return this.onInterval(
149
149
  handler,
150
150
  { recentInterval: timeIntervalInMinutes, backfillInterval: backfillTimeIntervalInMinutes },
@@ -156,7 +156,7 @@ export abstract class BaseProcessor<
156
156
  handler: (block: BlockParams, ctx: ContractContext<TContract, TBoundContractView>) => PromiseOrVoid,
157
157
  timeInterval: HandleInterval | undefined,
158
158
  blockInterval: HandleInterval | undefined
159
- ) {
159
+ ): this {
160
160
  const chainId = this.getChainId()
161
161
  const processor = this
162
162
  const contractName = this.config.name
@@ -189,7 +189,9 @@ export abstract class BaseProcessor<
189
189
  return this
190
190
  }
191
191
 
192
- public onAllEvents(handler: (event: EthEvent, ctx: ContractContext<TContract, TBoundContractView>) => PromiseOrVoid) {
192
+ public onAllEvents(
193
+ handler: (event: EthEvent, ctx: ContractContext<TContract, TBoundContractView>) => PromiseOrVoid
194
+ ): this {
193
195
  const _filters: DeferredTopicFilter[] = []
194
196
  const tmpContract = this.CreateBoundContractView()
195
197
 
@@ -208,7 +210,7 @@ export abstract class BaseProcessor<
208
210
  signature: string,
209
211
  handler: (trace: Trace, ctx: ContractContext<TContract, TBoundContractView>) => PromiseOrVoid,
210
212
  fetchConfig?: Partial<EthFetchConfig>
211
- ) {
213
+ ): this {
212
214
  const chainId = this.getChainId()
213
215
  const contractName = this.config.name
214
216
  const processor = this
@@ -668,7 +668,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
668
668
  ) => void,
669
669
  filter?: AnswerUpdatedEventFilter | AnswerUpdatedEventFilter[],
670
670
  fetchConfig?: Partial<EthFetchConfig>
671
- ) {
671
+ ): this {
672
672
  if (!filter) {
673
673
  filter = templateContract.filters[
674
674
  "AnswerUpdated(int256,uint256,uint256)"
@@ -681,7 +681,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
681
681
  handler: (event: NewRoundEvent, ctx: EACAggregatorProxyContext) => void,
682
682
  filter?: NewRoundEventFilter | NewRoundEventFilter[],
683
683
  fetchConfig?: Partial<EthFetchConfig>
684
- ) {
684
+ ): this {
685
685
  if (!filter) {
686
686
  filter = templateContract.filters["NewRound(uint256,address,uint256)"](
687
687
  null,
@@ -701,7 +701,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
701
701
  | OwnershipTransferRequestedEventFilter
702
702
  | OwnershipTransferRequestedEventFilter[],
703
703
  fetchConfig?: Partial<EthFetchConfig>
704
- ) {
704
+ ): this {
705
705
  if (!filter) {
706
706
  filter = templateContract.filters[
707
707
  "OwnershipTransferRequested(address,address)"
@@ -719,7 +719,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
719
719
  | OwnershipTransferredEventFilter
720
720
  | OwnershipTransferredEventFilter[],
721
721
  fetchConfig?: Partial<EthFetchConfig>
722
- ) {
722
+ ): this {
723
723
  if (!filter) {
724
724
  filter = templateContract.filters[
725
725
  "OwnershipTransferred(address,address)"
@@ -734,7 +734,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
734
734
  ctx: EACAggregatorProxyContext
735
735
  ) => void,
736
736
  fetchConfig?: Partial<EthFetchConfig>
737
- ) {
737
+ ): this {
738
738
  return super.onTrace("0x79ba5097", handler, fetchConfig);
739
739
  }
740
740
 
@@ -744,7 +744,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
744
744
  ctx: EACAggregatorProxyContext
745
745
  ) => void,
746
746
  fetchConfig?: Partial<EthFetchConfig>
747
- ) {
747
+ ): this {
748
748
  return super.onTrace("0xbc43cbaf", handler, fetchConfig);
749
749
  }
750
750
 
@@ -754,7 +754,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
754
754
  ctx: EACAggregatorProxyContext
755
755
  ) => void,
756
756
  fetchConfig?: Partial<EthFetchConfig>
757
- ) {
757
+ ): this {
758
758
  return super.onTrace("0x245a7bfc", handler, fetchConfig);
759
759
  }
760
760
 
@@ -764,14 +764,14 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
764
764
  ctx: EACAggregatorProxyContext
765
765
  ) => void,
766
766
  fetchConfig?: Partial<EthFetchConfig>
767
- ) {
767
+ ): this {
768
768
  return super.onTrace("0xa928c096", handler, fetchConfig);
769
769
  }
770
770
 
771
771
  onCallDecimals(
772
772
  handler: (call: DecimalsCallTrace, ctx: EACAggregatorProxyContext) => void,
773
773
  fetchConfig?: Partial<EthFetchConfig>
774
- ) {
774
+ ): this {
775
775
  return super.onTrace("0x313ce567", handler, fetchConfig);
776
776
  }
777
777
 
@@ -781,14 +781,14 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
781
781
  ctx: EACAggregatorProxyContext
782
782
  ) => void,
783
783
  fetchConfig?: Partial<EthFetchConfig>
784
- ) {
784
+ ): this {
785
785
  return super.onTrace("0x7284e416", handler, fetchConfig);
786
786
  }
787
787
 
788
788
  onCallGetAnswer(
789
789
  handler: (call: GetAnswerCallTrace, ctx: EACAggregatorProxyContext) => void,
790
790
  fetchConfig?: Partial<EthFetchConfig>
791
- ) {
791
+ ): this {
792
792
  return super.onTrace("0xb5ab58dc", handler, fetchConfig);
793
793
  }
794
794
 
@@ -798,7 +798,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
798
798
  ctx: EACAggregatorProxyContext
799
799
  ) => void,
800
800
  fetchConfig?: Partial<EthFetchConfig>
801
- ) {
801
+ ): this {
802
802
  return super.onTrace("0x9a6fc8f5", handler, fetchConfig);
803
803
  }
804
804
 
@@ -808,7 +808,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
808
808
  ctx: EACAggregatorProxyContext
809
809
  ) => void,
810
810
  fetchConfig?: Partial<EthFetchConfig>
811
- ) {
811
+ ): this {
812
812
  return super.onTrace("0xb633620c", handler, fetchConfig);
813
813
  }
814
814
 
@@ -818,7 +818,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
818
818
  ctx: EACAggregatorProxyContext
819
819
  ) => void,
820
820
  fetchConfig?: Partial<EthFetchConfig>
821
- ) {
821
+ ): this {
822
822
  return super.onTrace("0x50d25bcd", handler, fetchConfig);
823
823
  }
824
824
 
@@ -828,7 +828,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
828
828
  ctx: EACAggregatorProxyContext
829
829
  ) => void,
830
830
  fetchConfig?: Partial<EthFetchConfig>
831
- ) {
831
+ ): this {
832
832
  return super.onTrace("0x668a0f02", handler, fetchConfig);
833
833
  }
834
834
 
@@ -838,7 +838,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
838
838
  ctx: EACAggregatorProxyContext
839
839
  ) => void,
840
840
  fetchConfig?: Partial<EthFetchConfig>
841
- ) {
841
+ ): this {
842
842
  return super.onTrace("0xfeaf968c", handler, fetchConfig);
843
843
  }
844
844
 
@@ -848,14 +848,14 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
848
848
  ctx: EACAggregatorProxyContext
849
849
  ) => void,
850
850
  fetchConfig?: Partial<EthFetchConfig>
851
- ) {
851
+ ): this {
852
852
  return super.onTrace("0x8205bf6a", handler, fetchConfig);
853
853
  }
854
854
 
855
855
  onCallOwner(
856
856
  handler: (call: OwnerCallTrace, ctx: EACAggregatorProxyContext) => void,
857
857
  fetchConfig?: Partial<EthFetchConfig>
858
- ) {
858
+ ): this {
859
859
  return super.onTrace("0x8da5cb5b", handler, fetchConfig);
860
860
  }
861
861
 
@@ -865,14 +865,14 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
865
865
  ctx: EACAggregatorProxyContext
866
866
  ) => void,
867
867
  fetchConfig?: Partial<EthFetchConfig>
868
- ) {
868
+ ): this {
869
869
  return super.onTrace("0xc1597304", handler, fetchConfig);
870
870
  }
871
871
 
872
872
  onCallPhaseId(
873
873
  handler: (call: PhaseIdCallTrace, ctx: EACAggregatorProxyContext) => void,
874
874
  fetchConfig?: Partial<EthFetchConfig>
875
- ) {
875
+ ): this {
876
876
  return super.onTrace("0x58303b10", handler, fetchConfig);
877
877
  }
878
878
 
@@ -882,7 +882,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
882
882
  ctx: EACAggregatorProxyContext
883
883
  ) => void,
884
884
  fetchConfig?: Partial<EthFetchConfig>
885
- ) {
885
+ ): this {
886
886
  return super.onTrace("0xf8a2abd3", handler, fetchConfig);
887
887
  }
888
888
 
@@ -892,7 +892,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
892
892
  ctx: EACAggregatorProxyContext
893
893
  ) => void,
894
894
  fetchConfig?: Partial<EthFetchConfig>
895
- ) {
895
+ ): this {
896
896
  return super.onTrace("0xe8c4be30", handler, fetchConfig);
897
897
  }
898
898
 
@@ -902,7 +902,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
902
902
  ctx: EACAggregatorProxyContext
903
903
  ) => void,
904
904
  fetchConfig?: Partial<EthFetchConfig>
905
- ) {
905
+ ): this {
906
906
  return super.onTrace("0x6001ac53", handler, fetchConfig);
907
907
  }
908
908
 
@@ -912,7 +912,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
912
912
  ctx: EACAggregatorProxyContext
913
913
  ) => void,
914
914
  fetchConfig?: Partial<EthFetchConfig>
915
- ) {
915
+ ): this {
916
916
  return super.onTrace("0x8f6b4d91", handler, fetchConfig);
917
917
  }
918
918
 
@@ -922,7 +922,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
922
922
  ctx: EACAggregatorProxyContext
923
923
  ) => void,
924
924
  fetchConfig?: Partial<EthFetchConfig>
925
- ) {
925
+ ): this {
926
926
  return super.onTrace("0x92eefe9b", handler, fetchConfig);
927
927
  }
928
928
 
@@ -932,14 +932,14 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
932
932
  ctx: EACAggregatorProxyContext
933
933
  ) => void,
934
934
  fetchConfig?: Partial<EthFetchConfig>
935
- ) {
935
+ ): this {
936
936
  return super.onTrace("0xf2fde38b", handler, fetchConfig);
937
937
  }
938
938
 
939
939
  onCallVersion(
940
940
  handler: (call: VersionCallTrace, ctx: EACAggregatorProxyContext) => void,
941
941
  fetchConfig?: Partial<EthFetchConfig>
942
- ) {
942
+ ): this {
943
943
  return super.onTrace("0x54fd4d50", handler, fetchConfig);
944
944
  }
945
945
 
@@ -1023,7 +1023,7 @@ export class EACAggregatorProxyProcessorTemplate extends BaseProcessorTemplate<
1023
1023
  ) => void,
1024
1024
  filter?: AnswerUpdatedEventFilter | AnswerUpdatedEventFilter[],
1025
1025
  fetchConfig?: Partial<EthFetchConfig>
1026
- ) {
1026
+ ): this {
1027
1027
  if (!filter) {
1028
1028
  filter = templateContract.filters[
1029
1029
  "AnswerUpdated(int256,uint256,uint256)"
@@ -1036,7 +1036,7 @@ export class EACAggregatorProxyProcessorTemplate extends BaseProcessorTemplate<
1036
1036
  handler: (event: NewRoundEvent, ctx: EACAggregatorProxyContext) => void,
1037
1037
  filter?: NewRoundEventFilter | NewRoundEventFilter[],
1038
1038
  fetchConfig?: Partial<EthFetchConfig>
1039
- ) {
1039
+ ): this {
1040
1040
  if (!filter) {
1041
1041
  filter = templateContract.filters["NewRound(uint256,address,uint256)"](
1042
1042
  null,
@@ -1056,7 +1056,7 @@ export class EACAggregatorProxyProcessorTemplate extends BaseProcessorTemplate<
1056
1056
  | OwnershipTransferRequestedEventFilter
1057
1057
  | OwnershipTransferRequestedEventFilter[],
1058
1058
  fetchConfig?: Partial<EthFetchConfig>
1059
- ) {
1059
+ ): this {
1060
1060
  if (!filter) {
1061
1061
  filter = templateContract.filters[
1062
1062
  "OwnershipTransferRequested(address,address)"
@@ -1074,7 +1074,7 @@ export class EACAggregatorProxyProcessorTemplate extends BaseProcessorTemplate<
1074
1074
  | OwnershipTransferredEventFilter
1075
1075
  | OwnershipTransferredEventFilter[],
1076
1076
  fetchConfig?: Partial<EthFetchConfig>
1077
- ) {
1077
+ ): this {
1078
1078
  if (!filter) {
1079
1079
  filter = templateContract.filters[
1080
1080
  "OwnershipTransferred(address,address)"
@@ -274,7 +274,7 @@ export class ERC1155Processor extends BaseProcessor<
274
274
  handler: (event: ApprovalForAllEvent, ctx: ERC1155Context) => void,
275
275
  filter?: ApprovalForAllEventFilter | ApprovalForAllEventFilter[],
276
276
  fetchConfig?: Partial<EthFetchConfig>
277
- ) {
277
+ ): this {
278
278
  if (!filter) {
279
279
  filter = templateContract.filters["ApprovalForAll(address,address,bool)"](
280
280
  null,
@@ -289,7 +289,7 @@ export class ERC1155Processor extends BaseProcessor<
289
289
  handler: (event: TransferBatchEvent, ctx: ERC1155Context) => void,
290
290
  filter?: TransferBatchEventFilter | TransferBatchEventFilter[],
291
291
  fetchConfig?: Partial<EthFetchConfig>
292
- ) {
292
+ ): this {
293
293
  if (!filter) {
294
294
  filter = templateContract.filters[
295
295
  "TransferBatch(address,address,address,uint256[],uint256[])"
@@ -302,7 +302,7 @@ export class ERC1155Processor extends BaseProcessor<
302
302
  handler: (event: TransferSingleEvent, ctx: ERC1155Context) => void,
303
303
  filter?: TransferSingleEventFilter | TransferSingleEventFilter[],
304
304
  fetchConfig?: Partial<EthFetchConfig>
305
- ) {
305
+ ): this {
306
306
  if (!filter) {
307
307
  filter = templateContract.filters[
308
308
  "TransferSingle(address,address,address,uint256,uint256)"
@@ -315,7 +315,7 @@ export class ERC1155Processor extends BaseProcessor<
315
315
  handler: (event: URIEvent, ctx: ERC1155Context) => void,
316
316
  filter?: URIEventFilter | URIEventFilter[],
317
317
  fetchConfig?: Partial<EthFetchConfig>
318
- ) {
318
+ ): this {
319
319
  if (!filter) {
320
320
  filter = templateContract.filters["URI(string,uint256)"](null, null);
321
321
  }
@@ -325,21 +325,21 @@ export class ERC1155Processor extends BaseProcessor<
325
325
  onCallBalanceOf(
326
326
  handler: (call: BalanceOfCallTrace, ctx: ERC1155Context) => void,
327
327
  fetchConfig?: Partial<EthFetchConfig>
328
- ) {
328
+ ): this {
329
329
  return super.onTrace("0x00fdd58e", handler, fetchConfig);
330
330
  }
331
331
 
332
332
  onCallBalanceOfBatch(
333
333
  handler: (call: BalanceOfBatchCallTrace, ctx: ERC1155Context) => void,
334
334
  fetchConfig?: Partial<EthFetchConfig>
335
- ) {
335
+ ): this {
336
336
  return super.onTrace("0x4e1273f4", handler, fetchConfig);
337
337
  }
338
338
 
339
339
  onCallIsApprovedForAll(
340
340
  handler: (call: IsApprovedForAllCallTrace, ctx: ERC1155Context) => void,
341
341
  fetchConfig?: Partial<EthFetchConfig>
342
- ) {
342
+ ): this {
343
343
  return super.onTrace("0xe985e9c5", handler, fetchConfig);
344
344
  }
345
345
 
@@ -349,35 +349,35 @@ export class ERC1155Processor extends BaseProcessor<
349
349
  ctx: ERC1155Context
350
350
  ) => void,
351
351
  fetchConfig?: Partial<EthFetchConfig>
352
- ) {
352
+ ): this {
353
353
  return super.onTrace("0x2eb2c2d6", handler, fetchConfig);
354
354
  }
355
355
 
356
356
  onCallSafeTransferFrom(
357
357
  handler: (call: SafeTransferFromCallTrace, ctx: ERC1155Context) => void,
358
358
  fetchConfig?: Partial<EthFetchConfig>
359
- ) {
359
+ ): this {
360
360
  return super.onTrace("0xf242432a", handler, fetchConfig);
361
361
  }
362
362
 
363
363
  onCallSetApprovalForAll(
364
364
  handler: (call: SetApprovalForAllCallTrace, ctx: ERC1155Context) => void,
365
365
  fetchConfig?: Partial<EthFetchConfig>
366
- ) {
366
+ ): this {
367
367
  return super.onTrace("0xa22cb465", handler, fetchConfig);
368
368
  }
369
369
 
370
370
  onCallSupportsInterface(
371
371
  handler: (call: SupportsInterfaceCallTrace, ctx: ERC1155Context) => void,
372
372
  fetchConfig?: Partial<EthFetchConfig>
373
- ) {
373
+ ): this {
374
374
  return super.onTrace("0x01ffc9a7", handler, fetchConfig);
375
375
  }
376
376
 
377
377
  onCallUri(
378
378
  handler: (call: UriCallTrace, ctx: ERC1155Context) => void,
379
379
  fetchConfig?: Partial<EthFetchConfig>
380
- ) {
380
+ ): this {
381
381
  return super.onTrace("0x0e89341c", handler, fetchConfig);
382
382
  }
383
383
 
@@ -458,7 +458,7 @@ export class ERC1155ProcessorTemplate extends BaseProcessorTemplate<
458
458
  handler: (event: ApprovalForAllEvent, ctx: ERC1155Context) => void,
459
459
  filter?: ApprovalForAllEventFilter | ApprovalForAllEventFilter[],
460
460
  fetchConfig?: Partial<EthFetchConfig>
461
- ) {
461
+ ): this {
462
462
  if (!filter) {
463
463
  filter = templateContract.filters["ApprovalForAll(address,address,bool)"](
464
464
  null,
@@ -473,7 +473,7 @@ export class ERC1155ProcessorTemplate extends BaseProcessorTemplate<
473
473
  handler: (event: TransferBatchEvent, ctx: ERC1155Context) => void,
474
474
  filter?: TransferBatchEventFilter | TransferBatchEventFilter[],
475
475
  fetchConfig?: Partial<EthFetchConfig>
476
- ) {
476
+ ): this {
477
477
  if (!filter) {
478
478
  filter = templateContract.filters[
479
479
  "TransferBatch(address,address,address,uint256[],uint256[])"
@@ -486,7 +486,7 @@ export class ERC1155ProcessorTemplate extends BaseProcessorTemplate<
486
486
  handler: (event: TransferSingleEvent, ctx: ERC1155Context) => void,
487
487
  filter?: TransferSingleEventFilter | TransferSingleEventFilter[],
488
488
  fetchConfig?: Partial<EthFetchConfig>
489
- ) {
489
+ ): this {
490
490
  if (!filter) {
491
491
  filter = templateContract.filters[
492
492
  "TransferSingle(address,address,address,uint256,uint256)"
@@ -499,7 +499,7 @@ export class ERC1155ProcessorTemplate extends BaseProcessorTemplate<
499
499
  handler: (event: URIEvent, ctx: ERC1155Context) => void,
500
500
  filter?: URIEventFilter | URIEventFilter[],
501
501
  fetchConfig?: Partial<EthFetchConfig>
502
- ) {
502
+ ): this {
503
503
  if (!filter) {
504
504
  filter = templateContract.filters["URI(string,uint256)"](null, null);
505
505
  }