@sentio/sdk 2.7.3-rc.1 → 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.
- package/lib/aptos/aptos-processor.d.ts +3 -3
- package/lib/aptos/aptos-processor.js.map +1 -1
- package/lib/eth/base-processor.js.map +1 -1
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
- package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
- package/lib/eth/codegen/event-handler.js +1 -1
- package/lib/eth/codegen/event-handler.js.map +1 -1
- package/lib/eth/codegen/functions-handler.js +1 -1
- package/lib/eth/codegen/functions-handler.js.map +1 -1
- package/package.json +4 -4
- package/src/aptos/aptos-processor.ts +6 -6
- package/src/eth/base-processor.ts +8 -6
- package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +31 -31
- package/src/eth/builtin/internal/erc1155-processor.ts +16 -16
- package/src/eth/builtin/internal/erc20-processor.ts +24 -24
- package/src/eth/builtin/internal/erc20bytes-processor.ts +13 -13
- package/src/eth/builtin/internal/erc721-processor.ts +20 -20
- package/src/eth/builtin/internal/weth9-processor.ts +19 -19
- package/src/eth/codegen/event-handler.ts +1 -1
- package/src/eth/codegen/functions-handler.ts +1 -1
@@ -347,7 +347,7 @@ export class ERC20Processor extends BaseProcessor<
|
|
347
347
|
handler: (event: ApprovalEvent, ctx: ERC20Context) => void,
|
348
348
|
filter?: ApprovalEventFilter | ApprovalEventFilter[],
|
349
349
|
fetchConfig?: Partial<EthFetchConfig>
|
350
|
-
) {
|
350
|
+
): this {
|
351
351
|
if (!filter) {
|
352
352
|
filter = templateContract.filters["Approval(address,address,uint256)"](
|
353
353
|
null,
|
@@ -364,7 +364,7 @@ export class ERC20Processor extends BaseProcessor<
|
|
364
364
|
| OwnershipTransferredEventFilter
|
365
365
|
| OwnershipTransferredEventFilter[],
|
366
366
|
fetchConfig?: Partial<EthFetchConfig>
|
367
|
-
) {
|
367
|
+
): this {
|
368
368
|
if (!filter) {
|
369
369
|
filter = templateContract.filters[
|
370
370
|
"OwnershipTransferred(address,address)"
|
@@ -377,7 +377,7 @@ export class ERC20Processor extends BaseProcessor<
|
|
377
377
|
handler: (event: TransferEvent, ctx: ERC20Context) => void,
|
378
378
|
filter?: TransferEventFilter | TransferEventFilter[],
|
379
379
|
fetchConfig?: Partial<EthFetchConfig>
|
380
|
-
) {
|
380
|
+
): this {
|
381
381
|
if (!filter) {
|
382
382
|
filter = templateContract.filters["Transfer(address,address,uint256)"](
|
383
383
|
null,
|
@@ -391,126 +391,126 @@ export class ERC20Processor extends BaseProcessor<
|
|
391
391
|
onCallAllowance(
|
392
392
|
handler: (call: AllowanceCallTrace, ctx: ERC20Context) => void,
|
393
393
|
fetchConfig?: Partial<EthFetchConfig>
|
394
|
-
) {
|
394
|
+
): this {
|
395
395
|
return super.onTrace("0xdd62ed3e", handler, fetchConfig);
|
396
396
|
}
|
397
397
|
|
398
398
|
onCallApprove(
|
399
399
|
handler: (call: ApproveCallTrace, ctx: ERC20Context) => void,
|
400
400
|
fetchConfig?: Partial<EthFetchConfig>
|
401
|
-
) {
|
401
|
+
): this {
|
402
402
|
return super.onTrace("0x095ea7b3", handler, fetchConfig);
|
403
403
|
}
|
404
404
|
|
405
405
|
onCallBalanceOf(
|
406
406
|
handler: (call: BalanceOfCallTrace, ctx: ERC20Context) => void,
|
407
407
|
fetchConfig?: Partial<EthFetchConfig>
|
408
|
-
) {
|
408
|
+
): this {
|
409
409
|
return super.onTrace("0x70a08231", handler, fetchConfig);
|
410
410
|
}
|
411
411
|
|
412
412
|
onCallBurn(
|
413
413
|
handler: (call: BurnCallTrace, ctx: ERC20Context) => void,
|
414
414
|
fetchConfig?: Partial<EthFetchConfig>
|
415
|
-
) {
|
415
|
+
): this {
|
416
416
|
return super.onTrace("0x42966c68", handler, fetchConfig);
|
417
417
|
}
|
418
418
|
|
419
419
|
onCallBurnFrom(
|
420
420
|
handler: (call: BurnFromCallTrace, ctx: ERC20Context) => void,
|
421
421
|
fetchConfig?: Partial<EthFetchConfig>
|
422
|
-
) {
|
422
|
+
): this {
|
423
423
|
return super.onTrace("0x79cc6790", handler, fetchConfig);
|
424
424
|
}
|
425
425
|
|
426
426
|
onCallDecimals(
|
427
427
|
handler: (call: DecimalsCallTrace, ctx: ERC20Context) => void,
|
428
428
|
fetchConfig?: Partial<EthFetchConfig>
|
429
|
-
) {
|
429
|
+
): this {
|
430
430
|
return super.onTrace("0x313ce567", handler, fetchConfig);
|
431
431
|
}
|
432
432
|
|
433
433
|
onCallDecreaseAllowance(
|
434
434
|
handler: (call: DecreaseAllowanceCallTrace, ctx: ERC20Context) => void,
|
435
435
|
fetchConfig?: Partial<EthFetchConfig>
|
436
|
-
) {
|
436
|
+
): this {
|
437
437
|
return super.onTrace("0xa457c2d7", handler, fetchConfig);
|
438
438
|
}
|
439
439
|
|
440
440
|
onCallIncreaseAllowance(
|
441
441
|
handler: (call: IncreaseAllowanceCallTrace, ctx: ERC20Context) => void,
|
442
442
|
fetchConfig?: Partial<EthFetchConfig>
|
443
|
-
) {
|
443
|
+
): this {
|
444
444
|
return super.onTrace("0x39509351", handler, fetchConfig);
|
445
445
|
}
|
446
446
|
|
447
447
|
onCallLocker(
|
448
448
|
handler: (call: LockerCallTrace, ctx: ERC20Context) => void,
|
449
449
|
fetchConfig?: Partial<EthFetchConfig>
|
450
|
-
) {
|
450
|
+
): this {
|
451
451
|
return super.onTrace("0xd7b96d4e", handler, fetchConfig);
|
452
452
|
}
|
453
453
|
|
454
454
|
onCallName(
|
455
455
|
handler: (call: NameCallTrace, ctx: ERC20Context) => void,
|
456
456
|
fetchConfig?: Partial<EthFetchConfig>
|
457
|
-
) {
|
457
|
+
): this {
|
458
458
|
return super.onTrace("0x06fdde03", handler, fetchConfig);
|
459
459
|
}
|
460
460
|
|
461
461
|
onCallOwner(
|
462
462
|
handler: (call: OwnerCallTrace, ctx: ERC20Context) => void,
|
463
463
|
fetchConfig?: Partial<EthFetchConfig>
|
464
|
-
) {
|
464
|
+
): this {
|
465
465
|
return super.onTrace("0x8da5cb5b", handler, fetchConfig);
|
466
466
|
}
|
467
467
|
|
468
468
|
onCallRenounceOwnership(
|
469
469
|
handler: (call: RenounceOwnershipCallTrace, ctx: ERC20Context) => void,
|
470
470
|
fetchConfig?: Partial<EthFetchConfig>
|
471
|
-
) {
|
471
|
+
): this {
|
472
472
|
return super.onTrace("0x715018a6", handler, fetchConfig);
|
473
473
|
}
|
474
474
|
|
475
475
|
onCallSetLocker(
|
476
476
|
handler: (call: SetLockerCallTrace, ctx: ERC20Context) => void,
|
477
477
|
fetchConfig?: Partial<EthFetchConfig>
|
478
|
-
) {
|
478
|
+
): this {
|
479
479
|
return super.onTrace("0x171060ec", handler, fetchConfig);
|
480
480
|
}
|
481
481
|
|
482
482
|
onCallSymbol(
|
483
483
|
handler: (call: SymbolCallTrace, ctx: ERC20Context) => void,
|
484
484
|
fetchConfig?: Partial<EthFetchConfig>
|
485
|
-
) {
|
485
|
+
): this {
|
486
486
|
return super.onTrace("0x95d89b41", handler, fetchConfig);
|
487
487
|
}
|
488
488
|
|
489
489
|
onCallTotalSupply(
|
490
490
|
handler: (call: TotalSupplyCallTrace, ctx: ERC20Context) => void,
|
491
491
|
fetchConfig?: Partial<EthFetchConfig>
|
492
|
-
) {
|
492
|
+
): this {
|
493
493
|
return super.onTrace("0x18160ddd", handler, fetchConfig);
|
494
494
|
}
|
495
495
|
|
496
496
|
onCallTransfer(
|
497
497
|
handler: (call: TransferCallTrace, ctx: ERC20Context) => void,
|
498
498
|
fetchConfig?: Partial<EthFetchConfig>
|
499
|
-
) {
|
499
|
+
): this {
|
500
500
|
return super.onTrace("0xa9059cbb", handler, fetchConfig);
|
501
501
|
}
|
502
502
|
|
503
503
|
onCallTransferFrom(
|
504
504
|
handler: (call: TransferFromCallTrace, ctx: ERC20Context) => void,
|
505
505
|
fetchConfig?: Partial<EthFetchConfig>
|
506
|
-
) {
|
506
|
+
): this {
|
507
507
|
return super.onTrace("0x23b872dd", handler, fetchConfig);
|
508
508
|
}
|
509
509
|
|
510
510
|
onCallTransferOwnership(
|
511
511
|
handler: (call: TransferOwnershipCallTrace, ctx: ERC20Context) => void,
|
512
512
|
fetchConfig?: Partial<EthFetchConfig>
|
513
|
-
) {
|
513
|
+
): this {
|
514
514
|
return super.onTrace("0xf2fde38b", handler, fetchConfig);
|
515
515
|
}
|
516
516
|
|
@@ -578,7 +578,7 @@ export class ERC20ProcessorTemplate extends BaseProcessorTemplate<
|
|
578
578
|
handler: (event: ApprovalEvent, ctx: ERC20Context) => void,
|
579
579
|
filter?: ApprovalEventFilter | ApprovalEventFilter[],
|
580
580
|
fetchConfig?: Partial<EthFetchConfig>
|
581
|
-
) {
|
581
|
+
): this {
|
582
582
|
if (!filter) {
|
583
583
|
filter = templateContract.filters["Approval(address,address,uint256)"](
|
584
584
|
null,
|
@@ -595,7 +595,7 @@ export class ERC20ProcessorTemplate extends BaseProcessorTemplate<
|
|
595
595
|
| OwnershipTransferredEventFilter
|
596
596
|
| OwnershipTransferredEventFilter[],
|
597
597
|
fetchConfig?: Partial<EthFetchConfig>
|
598
|
-
) {
|
598
|
+
): this {
|
599
599
|
if (!filter) {
|
600
600
|
filter = templateContract.filters[
|
601
601
|
"OwnershipTransferred(address,address)"
|
@@ -608,7 +608,7 @@ export class ERC20ProcessorTemplate extends BaseProcessorTemplate<
|
|
608
608
|
handler: (event: TransferEvent, ctx: ERC20Context) => void,
|
609
609
|
filter?: TransferEventFilter | TransferEventFilter[],
|
610
610
|
fetchConfig?: Partial<EthFetchConfig>
|
611
|
-
) {
|
611
|
+
): this {
|
612
612
|
if (!filter) {
|
613
613
|
filter = templateContract.filters["Transfer(address,address,uint256)"](
|
614
614
|
null,
|
@@ -242,7 +242,7 @@ export class ERC20BytesProcessor extends BaseProcessor<
|
|
242
242
|
handler: (event: ApprovalEvent, ctx: ERC20BytesContext) => void,
|
243
243
|
filter?: ApprovalEventFilter | ApprovalEventFilter[],
|
244
244
|
fetchConfig?: Partial<EthFetchConfig>
|
245
|
-
) {
|
245
|
+
): this {
|
246
246
|
if (!filter) {
|
247
247
|
filter = templateContract.filters["Approval(address,address,uint256)"](
|
248
248
|
null,
|
@@ -257,7 +257,7 @@ export class ERC20BytesProcessor extends BaseProcessor<
|
|
257
257
|
handler: (event: TransferEvent, ctx: ERC20BytesContext) => void,
|
258
258
|
filter?: TransferEventFilter | TransferEventFilter[],
|
259
259
|
fetchConfig?: Partial<EthFetchConfig>
|
260
|
-
) {
|
260
|
+
): this {
|
261
261
|
if (!filter) {
|
262
262
|
filter = templateContract.filters["Transfer(address,address,uint256)"](
|
263
263
|
null,
|
@@ -271,63 +271,63 @@ export class ERC20BytesProcessor extends BaseProcessor<
|
|
271
271
|
onCallName(
|
272
272
|
handler: (call: NameCallTrace, ctx: ERC20BytesContext) => void,
|
273
273
|
fetchConfig?: Partial<EthFetchConfig>
|
274
|
-
) {
|
274
|
+
): this {
|
275
275
|
return super.onTrace("0x06fdde03", handler, fetchConfig);
|
276
276
|
}
|
277
277
|
|
278
278
|
onCallApprove(
|
279
279
|
handler: (call: ApproveCallTrace, ctx: ERC20BytesContext) => void,
|
280
280
|
fetchConfig?: Partial<EthFetchConfig>
|
281
|
-
) {
|
281
|
+
): this {
|
282
282
|
return super.onTrace("0x095ea7b3", handler, fetchConfig);
|
283
283
|
}
|
284
284
|
|
285
285
|
onCallTotalSupply(
|
286
286
|
handler: (call: TotalSupplyCallTrace, ctx: ERC20BytesContext) => void,
|
287
287
|
fetchConfig?: Partial<EthFetchConfig>
|
288
|
-
) {
|
288
|
+
): this {
|
289
289
|
return super.onTrace("0x18160ddd", handler, fetchConfig);
|
290
290
|
}
|
291
291
|
|
292
292
|
onCallTransferFrom(
|
293
293
|
handler: (call: TransferFromCallTrace, ctx: ERC20BytesContext) => void,
|
294
294
|
fetchConfig?: Partial<EthFetchConfig>
|
295
|
-
) {
|
295
|
+
): this {
|
296
296
|
return super.onTrace("0x23b872dd", handler, fetchConfig);
|
297
297
|
}
|
298
298
|
|
299
299
|
onCallDecimals(
|
300
300
|
handler: (call: DecimalsCallTrace, ctx: ERC20BytesContext) => void,
|
301
301
|
fetchConfig?: Partial<EthFetchConfig>
|
302
|
-
) {
|
302
|
+
): this {
|
303
303
|
return super.onTrace("0x313ce567", handler, fetchConfig);
|
304
304
|
}
|
305
305
|
|
306
306
|
onCallBalanceOf(
|
307
307
|
handler: (call: BalanceOfCallTrace, ctx: ERC20BytesContext) => void,
|
308
308
|
fetchConfig?: Partial<EthFetchConfig>
|
309
|
-
) {
|
309
|
+
): this {
|
310
310
|
return super.onTrace("0x70a08231", handler, fetchConfig);
|
311
311
|
}
|
312
312
|
|
313
313
|
onCallSymbol(
|
314
314
|
handler: (call: SymbolCallTrace, ctx: ERC20BytesContext) => void,
|
315
315
|
fetchConfig?: Partial<EthFetchConfig>
|
316
|
-
) {
|
316
|
+
): this {
|
317
317
|
return super.onTrace("0x95d89b41", handler, fetchConfig);
|
318
318
|
}
|
319
319
|
|
320
320
|
onCallTransfer(
|
321
321
|
handler: (call: TransferCallTrace, ctx: ERC20BytesContext) => void,
|
322
322
|
fetchConfig?: Partial<EthFetchConfig>
|
323
|
-
) {
|
323
|
+
): this {
|
324
324
|
return super.onTrace("0xa9059cbb", handler, fetchConfig);
|
325
325
|
}
|
326
326
|
|
327
327
|
onCallAllowance(
|
328
328
|
handler: (call: AllowanceCallTrace, ctx: ERC20BytesContext) => void,
|
329
329
|
fetchConfig?: Partial<EthFetchConfig>
|
330
|
-
) {
|
330
|
+
): this {
|
331
331
|
return super.onTrace("0xdd62ed3e", handler, fetchConfig);
|
332
332
|
}
|
333
333
|
|
@@ -389,7 +389,7 @@ export class ERC20BytesProcessorTemplate extends BaseProcessorTemplate<
|
|
389
389
|
handler: (event: ApprovalEvent, ctx: ERC20BytesContext) => void,
|
390
390
|
filter?: ApprovalEventFilter | ApprovalEventFilter[],
|
391
391
|
fetchConfig?: Partial<EthFetchConfig>
|
392
|
-
) {
|
392
|
+
): this {
|
393
393
|
if (!filter) {
|
394
394
|
filter = templateContract.filters["Approval(address,address,uint256)"](
|
395
395
|
null,
|
@@ -404,7 +404,7 @@ export class ERC20BytesProcessorTemplate extends BaseProcessorTemplate<
|
|
404
404
|
handler: (event: TransferEvent, ctx: ERC20BytesContext) => void,
|
405
405
|
filter?: TransferEventFilter | TransferEventFilter[],
|
406
406
|
fetchConfig?: Partial<EthFetchConfig>
|
407
|
-
) {
|
407
|
+
): this {
|
408
408
|
if (!filter) {
|
409
409
|
filter = templateContract.filters["Transfer(address,address,uint256)"](
|
410
410
|
null,
|
@@ -376,7 +376,7 @@ export class ERC721Processor extends BaseProcessor<
|
|
376
376
|
handler: (event: ApprovalEvent, ctx: ERC721Context) => void,
|
377
377
|
filter?: ApprovalEventFilter | ApprovalEventFilter[],
|
378
378
|
fetchConfig?: Partial<EthFetchConfig>
|
379
|
-
) {
|
379
|
+
): this {
|
380
380
|
if (!filter) {
|
381
381
|
filter = templateContract.filters["Approval(address,address,uint256)"](
|
382
382
|
null,
|
@@ -391,7 +391,7 @@ export class ERC721Processor extends BaseProcessor<
|
|
391
391
|
handler: (event: ApprovalForAllEvent, ctx: ERC721Context) => void,
|
392
392
|
filter?: ApprovalForAllEventFilter | ApprovalForAllEventFilter[],
|
393
393
|
fetchConfig?: Partial<EthFetchConfig>
|
394
|
-
) {
|
394
|
+
): this {
|
395
395
|
if (!filter) {
|
396
396
|
filter = templateContract.filters["ApprovalForAll(address,address,bool)"](
|
397
397
|
null,
|
@@ -406,7 +406,7 @@ export class ERC721Processor extends BaseProcessor<
|
|
406
406
|
handler: (event: TransferEvent, ctx: ERC721Context) => void,
|
407
407
|
filter?: TransferEventFilter | TransferEventFilter[],
|
408
408
|
fetchConfig?: Partial<EthFetchConfig>
|
409
|
-
) {
|
409
|
+
): this {
|
410
410
|
if (!filter) {
|
411
411
|
filter = templateContract.filters["Transfer(address,address,uint256)"](
|
412
412
|
null,
|
@@ -420,49 +420,49 @@ export class ERC721Processor extends BaseProcessor<
|
|
420
420
|
onCallApprove(
|
421
421
|
handler: (call: ApproveCallTrace, ctx: ERC721Context) => void,
|
422
422
|
fetchConfig?: Partial<EthFetchConfig>
|
423
|
-
) {
|
423
|
+
): this {
|
424
424
|
return super.onTrace("0x095ea7b3", handler, fetchConfig);
|
425
425
|
}
|
426
426
|
|
427
427
|
onCallTotalSupply(
|
428
428
|
handler: (call: TotalSupplyCallTrace, ctx: ERC721Context) => void,
|
429
429
|
fetchConfig?: Partial<EthFetchConfig>
|
430
|
-
) {
|
430
|
+
): this {
|
431
431
|
return super.onTrace("0x18160ddd", handler, fetchConfig);
|
432
432
|
}
|
433
433
|
|
434
434
|
onCallBalanceOf(
|
435
435
|
handler: (call: BalanceOfCallTrace, ctx: ERC721Context) => void,
|
436
436
|
fetchConfig?: Partial<EthFetchConfig>
|
437
|
-
) {
|
437
|
+
): this {
|
438
438
|
return super.onTrace("0x70a08231", handler, fetchConfig);
|
439
439
|
}
|
440
440
|
|
441
441
|
onCallGetApproved(
|
442
442
|
handler: (call: GetApprovedCallTrace, ctx: ERC721Context) => void,
|
443
443
|
fetchConfig?: Partial<EthFetchConfig>
|
444
|
-
) {
|
444
|
+
): this {
|
445
445
|
return super.onTrace("0x081812fc", handler, fetchConfig);
|
446
446
|
}
|
447
447
|
|
448
448
|
onCallIsApprovedForAll(
|
449
449
|
handler: (call: IsApprovedForAllCallTrace, ctx: ERC721Context) => void,
|
450
450
|
fetchConfig?: Partial<EthFetchConfig>
|
451
|
-
) {
|
451
|
+
): this {
|
452
452
|
return super.onTrace("0xe985e9c5", handler, fetchConfig);
|
453
453
|
}
|
454
454
|
|
455
455
|
onCallName(
|
456
456
|
handler: (call: NameCallTrace, ctx: ERC721Context) => void,
|
457
457
|
fetchConfig?: Partial<EthFetchConfig>
|
458
|
-
) {
|
458
|
+
): this {
|
459
459
|
return super.onTrace("0x06fdde03", handler, fetchConfig);
|
460
460
|
}
|
461
461
|
|
462
462
|
onCallOwnerOf(
|
463
463
|
handler: (call: OwnerOfCallTrace, ctx: ERC721Context) => void,
|
464
464
|
fetchConfig?: Partial<EthFetchConfig>
|
465
|
-
) {
|
465
|
+
): this {
|
466
466
|
return super.onTrace("0x6352211e", handler, fetchConfig);
|
467
467
|
}
|
468
468
|
|
@@ -472,7 +472,7 @@ export class ERC721Processor extends BaseProcessor<
|
|
472
472
|
ctx: ERC721Context
|
473
473
|
) => void,
|
474
474
|
fetchConfig?: Partial<EthFetchConfig>
|
475
|
-
) {
|
475
|
+
): this {
|
476
476
|
return super.onTrace("0x42842e0e", handler, fetchConfig);
|
477
477
|
}
|
478
478
|
|
@@ -482,42 +482,42 @@ export class ERC721Processor extends BaseProcessor<
|
|
482
482
|
ctx: ERC721Context
|
483
483
|
) => void,
|
484
484
|
fetchConfig?: Partial<EthFetchConfig>
|
485
|
-
) {
|
485
|
+
): this {
|
486
486
|
return super.onTrace("0xb88d4fde", handler, fetchConfig);
|
487
487
|
}
|
488
488
|
|
489
489
|
onCallSetApprovalForAll(
|
490
490
|
handler: (call: SetApprovalForAllCallTrace, ctx: ERC721Context) => void,
|
491
491
|
fetchConfig?: Partial<EthFetchConfig>
|
492
|
-
) {
|
492
|
+
): this {
|
493
493
|
return super.onTrace("0xa22cb465", handler, fetchConfig);
|
494
494
|
}
|
495
495
|
|
496
496
|
onCallSupportsInterface(
|
497
497
|
handler: (call: SupportsInterfaceCallTrace, ctx: ERC721Context) => void,
|
498
498
|
fetchConfig?: Partial<EthFetchConfig>
|
499
|
-
) {
|
499
|
+
): this {
|
500
500
|
return super.onTrace("0x01ffc9a7", handler, fetchConfig);
|
501
501
|
}
|
502
502
|
|
503
503
|
onCallSymbol(
|
504
504
|
handler: (call: SymbolCallTrace, ctx: ERC721Context) => void,
|
505
505
|
fetchConfig?: Partial<EthFetchConfig>
|
506
|
-
) {
|
506
|
+
): this {
|
507
507
|
return super.onTrace("0x95d89b41", handler, fetchConfig);
|
508
508
|
}
|
509
509
|
|
510
510
|
onCallTokenURI(
|
511
511
|
handler: (call: TokenURICallTrace, ctx: ERC721Context) => void,
|
512
512
|
fetchConfig?: Partial<EthFetchConfig>
|
513
|
-
) {
|
513
|
+
): this {
|
514
514
|
return super.onTrace("0xc87b56dd", handler, fetchConfig);
|
515
515
|
}
|
516
516
|
|
517
517
|
onCallTransferFrom(
|
518
518
|
handler: (call: TransferFromCallTrace, ctx: ERC721Context) => void,
|
519
519
|
fetchConfig?: Partial<EthFetchConfig>
|
520
|
-
) {
|
520
|
+
): this {
|
521
521
|
return super.onTrace("0x23b872dd", handler, fetchConfig);
|
522
522
|
}
|
523
523
|
|
@@ -595,7 +595,7 @@ export class ERC721ProcessorTemplate extends BaseProcessorTemplate<
|
|
595
595
|
handler: (event: ApprovalEvent, ctx: ERC721Context) => void,
|
596
596
|
filter?: ApprovalEventFilter | ApprovalEventFilter[],
|
597
597
|
fetchConfig?: Partial<EthFetchConfig>
|
598
|
-
) {
|
598
|
+
): this {
|
599
599
|
if (!filter) {
|
600
600
|
filter = templateContract.filters["Approval(address,address,uint256)"](
|
601
601
|
null,
|
@@ -610,7 +610,7 @@ export class ERC721ProcessorTemplate extends BaseProcessorTemplate<
|
|
610
610
|
handler: (event: ApprovalForAllEvent, ctx: ERC721Context) => void,
|
611
611
|
filter?: ApprovalForAllEventFilter | ApprovalForAllEventFilter[],
|
612
612
|
fetchConfig?: Partial<EthFetchConfig>
|
613
|
-
) {
|
613
|
+
): this {
|
614
614
|
if (!filter) {
|
615
615
|
filter = templateContract.filters["ApprovalForAll(address,address,bool)"](
|
616
616
|
null,
|
@@ -625,7 +625,7 @@ export class ERC721ProcessorTemplate extends BaseProcessorTemplate<
|
|
625
625
|
handler: (event: TransferEvent, ctx: ERC721Context) => void,
|
626
626
|
filter?: TransferEventFilter | TransferEventFilter[],
|
627
627
|
fetchConfig?: Partial<EthFetchConfig>
|
628
|
-
) {
|
628
|
+
): this {
|
629
629
|
if (!filter) {
|
630
630
|
filter = templateContract.filters["Transfer(address,address,uint256)"](
|
631
631
|
null,
|
@@ -249,7 +249,7 @@ export class WETH9Processor extends BaseProcessor<
|
|
249
249
|
handler: (event: ApprovalEvent, ctx: WETH9Context) => void,
|
250
250
|
filter?: ApprovalEventFilter | ApprovalEventFilter[],
|
251
251
|
fetchConfig?: Partial<EthFetchConfig>
|
252
|
-
) {
|
252
|
+
): this {
|
253
253
|
if (!filter) {
|
254
254
|
filter = templateContract.filters["Approval(address,address,uint256)"](
|
255
255
|
null,
|
@@ -264,7 +264,7 @@ export class WETH9Processor extends BaseProcessor<
|
|
264
264
|
handler: (event: TransferEvent, ctx: WETH9Context) => void,
|
265
265
|
filter?: TransferEventFilter | TransferEventFilter[],
|
266
266
|
fetchConfig?: Partial<EthFetchConfig>
|
267
|
-
) {
|
267
|
+
): this {
|
268
268
|
if (!filter) {
|
269
269
|
filter = templateContract.filters["Transfer(address,address,uint256)"](
|
270
270
|
null,
|
@@ -279,7 +279,7 @@ export class WETH9Processor extends BaseProcessor<
|
|
279
279
|
handler: (event: DepositEvent, ctx: WETH9Context) => void,
|
280
280
|
filter?: DepositEventFilter | DepositEventFilter[],
|
281
281
|
fetchConfig?: Partial<EthFetchConfig>
|
282
|
-
) {
|
282
|
+
): this {
|
283
283
|
if (!filter) {
|
284
284
|
filter = templateContract.filters["Deposit(address,uint256)"](null, null);
|
285
285
|
}
|
@@ -290,7 +290,7 @@ export class WETH9Processor extends BaseProcessor<
|
|
290
290
|
handler: (event: WithdrawalEvent, ctx: WETH9Context) => void,
|
291
291
|
filter?: WithdrawalEventFilter | WithdrawalEventFilter[],
|
292
292
|
fetchConfig?: Partial<EthFetchConfig>
|
293
|
-
) {
|
293
|
+
): this {
|
294
294
|
if (!filter) {
|
295
295
|
filter = templateContract.filters["Withdrawal(address,uint256)"](
|
296
296
|
null,
|
@@ -303,77 +303,77 @@ export class WETH9Processor extends BaseProcessor<
|
|
303
303
|
onCallName(
|
304
304
|
handler: (call: NameCallTrace, ctx: WETH9Context) => void,
|
305
305
|
fetchConfig?: Partial<EthFetchConfig>
|
306
|
-
) {
|
306
|
+
): this {
|
307
307
|
return super.onTrace("0x06fdde03", handler, fetchConfig);
|
308
308
|
}
|
309
309
|
|
310
310
|
onCallApprove(
|
311
311
|
handler: (call: ApproveCallTrace, ctx: WETH9Context) => void,
|
312
312
|
fetchConfig?: Partial<EthFetchConfig>
|
313
|
-
) {
|
313
|
+
): this {
|
314
314
|
return super.onTrace("0x095ea7b3", handler, fetchConfig);
|
315
315
|
}
|
316
316
|
|
317
317
|
onCallTotalSupply(
|
318
318
|
handler: (call: TotalSupplyCallTrace, ctx: WETH9Context) => void,
|
319
319
|
fetchConfig?: Partial<EthFetchConfig>
|
320
|
-
) {
|
320
|
+
): this {
|
321
321
|
return super.onTrace("0x18160ddd", handler, fetchConfig);
|
322
322
|
}
|
323
323
|
|
324
324
|
onCallTransferFrom(
|
325
325
|
handler: (call: TransferFromCallTrace, ctx: WETH9Context) => void,
|
326
326
|
fetchConfig?: Partial<EthFetchConfig>
|
327
|
-
) {
|
327
|
+
): this {
|
328
328
|
return super.onTrace("0x23b872dd", handler, fetchConfig);
|
329
329
|
}
|
330
330
|
|
331
331
|
onCallWithdraw(
|
332
332
|
handler: (call: WithdrawCallTrace, ctx: WETH9Context) => void,
|
333
333
|
fetchConfig?: Partial<EthFetchConfig>
|
334
|
-
) {
|
334
|
+
): this {
|
335
335
|
return super.onTrace("0x2e1a7d4d", handler, fetchConfig);
|
336
336
|
}
|
337
337
|
|
338
338
|
onCallDecimals(
|
339
339
|
handler: (call: DecimalsCallTrace, ctx: WETH9Context) => void,
|
340
340
|
fetchConfig?: Partial<EthFetchConfig>
|
341
|
-
) {
|
341
|
+
): this {
|
342
342
|
return super.onTrace("0x313ce567", handler, fetchConfig);
|
343
343
|
}
|
344
344
|
|
345
345
|
onCallBalanceOf(
|
346
346
|
handler: (call: BalanceOfCallTrace, ctx: WETH9Context) => void,
|
347
347
|
fetchConfig?: Partial<EthFetchConfig>
|
348
|
-
) {
|
348
|
+
): this {
|
349
349
|
return super.onTrace("0x70a08231", handler, fetchConfig);
|
350
350
|
}
|
351
351
|
|
352
352
|
onCallSymbol(
|
353
353
|
handler: (call: SymbolCallTrace, ctx: WETH9Context) => void,
|
354
354
|
fetchConfig?: Partial<EthFetchConfig>
|
355
|
-
) {
|
355
|
+
): this {
|
356
356
|
return super.onTrace("0x95d89b41", handler, fetchConfig);
|
357
357
|
}
|
358
358
|
|
359
359
|
onCallTransfer(
|
360
360
|
handler: (call: TransferCallTrace, ctx: WETH9Context) => void,
|
361
361
|
fetchConfig?: Partial<EthFetchConfig>
|
362
|
-
) {
|
362
|
+
): this {
|
363
363
|
return super.onTrace("0xa9059cbb", handler, fetchConfig);
|
364
364
|
}
|
365
365
|
|
366
366
|
onCallDeposit(
|
367
367
|
handler: (call: DepositCallTrace, ctx: WETH9Context) => void,
|
368
368
|
fetchConfig?: Partial<EthFetchConfig>
|
369
|
-
) {
|
369
|
+
): this {
|
370
370
|
return super.onTrace("0xd0e30db0", handler, fetchConfig);
|
371
371
|
}
|
372
372
|
|
373
373
|
onCallAllowance(
|
374
374
|
handler: (call: AllowanceCallTrace, ctx: WETH9Context) => void,
|
375
375
|
fetchConfig?: Partial<EthFetchConfig>
|
376
|
-
) {
|
376
|
+
): this {
|
377
377
|
return super.onTrace("0xdd62ed3e", handler, fetchConfig);
|
378
378
|
}
|
379
379
|
|
@@ -438,7 +438,7 @@ export class WETH9ProcessorTemplate extends BaseProcessorTemplate<
|
|
438
438
|
handler: (event: ApprovalEvent, ctx: WETH9Context) => void,
|
439
439
|
filter?: ApprovalEventFilter | ApprovalEventFilter[],
|
440
440
|
fetchConfig?: Partial<EthFetchConfig>
|
441
|
-
) {
|
441
|
+
): this {
|
442
442
|
if (!filter) {
|
443
443
|
filter = templateContract.filters["Approval(address,address,uint256)"](
|
444
444
|
null,
|
@@ -453,7 +453,7 @@ export class WETH9ProcessorTemplate extends BaseProcessorTemplate<
|
|
453
453
|
handler: (event: TransferEvent, ctx: WETH9Context) => void,
|
454
454
|
filter?: TransferEventFilter | TransferEventFilter[],
|
455
455
|
fetchConfig?: Partial<EthFetchConfig>
|
456
|
-
) {
|
456
|
+
): this {
|
457
457
|
if (!filter) {
|
458
458
|
filter = templateContract.filters["Transfer(address,address,uint256)"](
|
459
459
|
null,
|
@@ -468,7 +468,7 @@ export class WETH9ProcessorTemplate extends BaseProcessorTemplate<
|
|
468
468
|
handler: (event: DepositEvent, ctx: WETH9Context) => void,
|
469
469
|
filter?: DepositEventFilter | DepositEventFilter[],
|
470
470
|
fetchConfig?: Partial<EthFetchConfig>
|
471
|
-
) {
|
471
|
+
): this {
|
472
472
|
if (!filter) {
|
473
473
|
filter = templateContract.filters["Deposit(address,uint256)"](null, null);
|
474
474
|
}
|
@@ -479,7 +479,7 @@ export class WETH9ProcessorTemplate extends BaseProcessorTemplate<
|
|
479
479
|
handler: (event: WithdrawalEvent, ctx: WETH9Context) => void,
|
480
480
|
filter?: WithdrawalEventFilter | WithdrawalEventFilter[],
|
481
481
|
fetchConfig?: Partial<EthFetchConfig>
|
482
|
-
) {
|
482
|
+
): this {
|
483
483
|
if (!filter) {
|
484
484
|
filter = templateContract.filters["Withdrawal(address,uint256)"](
|
485
485
|
null,
|
@@ -12,7 +12,7 @@ export function generateEventHandler(event: EventDeclaration, contractName: stri
|
|
12
12
|
handler: (event: ${eventNamePrefix}Event, ctx: ${contractName}Context) => void,
|
13
13
|
filter?: ${eventNamePrefix}EventFilter | ${eventNamePrefix}EventFilter[],
|
14
14
|
fetchConfig?: Partial<EthFetchConfig>
|
15
|
-
) {
|
15
|
+
): this {
|
16
16
|
if (!filter) {
|
17
17
|
filter = templateContract.filters['${filterName}'](${event.inputs.map(() => 'null').join(',')})
|
18
18
|
}
|
@@ -48,7 +48,7 @@ function generateCallHandler(fn: FunctionDeclaration, contractName: string, over
|
|
48
48
|
onCall${upperFirst(overloadedName ?? fn.name)}(
|
49
49
|
handler: (call: ${upperFirst(overloadedName ?? fn.name)}CallTrace, ctx: ${contractName}Context) => void,
|
50
50
|
fetchConfig?: Partial<EthFetchConfig>
|
51
|
-
) {
|
51
|
+
): this {
|
52
52
|
return super.onTrace("${sighash}", handler, fetchConfig);
|
53
53
|
}
|
54
54
|
`
|