@sentio/sdk 2.16.1 → 2.16.2-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.
Files changed (48) hide show
  1. package/lib/aptos/aptos-processor.d.ts +3 -2
  2. package/lib/aptos/aptos-processor.js +22 -23
  3. package/lib/aptos/aptos-processor.js.map +1 -1
  4. package/lib/eth/base-processor-template.d.ts +1 -1
  5. package/lib/eth/base-processor-template.js +5 -3
  6. package/lib/eth/base-processor-template.js.map +1 -1
  7. package/lib/eth/base-processor.d.ts +4 -4
  8. package/lib/eth/base-processor.js +17 -17
  9. package/lib/eth/base-processor.js.map +1 -1
  10. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js +31 -31
  11. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
  12. package/lib/eth/builtin/internal/erc1155-processor.js +16 -16
  13. package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
  14. package/lib/eth/builtin/internal/erc20-processor.js +24 -24
  15. package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
  16. package/lib/eth/builtin/internal/erc20bytes-processor.js +13 -13
  17. package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
  18. package/lib/eth/builtin/internal/erc721-processor.js +20 -20
  19. package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
  20. package/lib/eth/builtin/internal/weth9-processor.js +19 -19
  21. package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
  22. package/lib/eth/codegen/ethers-sentio.js +11 -11
  23. package/lib/eth/codegen/ethers-sentio.js.map +1 -1
  24. package/lib/eth/codegen/event-handler.js +1 -1
  25. package/lib/eth/codegen/event-handler.js.map +1 -1
  26. package/lib/eth/codegen/functions-handler.js +1 -1
  27. package/lib/eth/codegen/functions-handler.js.map +1 -1
  28. package/lib/eth/generic-processor.test.js.map +1 -1
  29. package/lib/sui/sui-plugin.js +1 -1
  30. package/lib/sui/sui-plugin.js.map +1 -1
  31. package/lib/sui/sui-processor.d.ts +5 -3
  32. package/lib/sui/sui-processor.js +24 -2
  33. package/lib/sui/sui-processor.js.map +1 -1
  34. package/package.json +3 -3
  35. package/src/aptos/aptos-processor.ts +38 -51
  36. package/src/eth/base-processor-template.ts +5 -3
  37. package/src/eth/base-processor.ts +25 -25
  38. package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +31 -31
  39. package/src/eth/builtin/internal/erc1155-processor.ts +16 -16
  40. package/src/eth/builtin/internal/erc20-processor.ts +24 -24
  41. package/src/eth/builtin/internal/erc20bytes-processor.ts +13 -13
  42. package/src/eth/builtin/internal/erc721-processor.ts +20 -20
  43. package/src/eth/builtin/internal/weth9-processor.ts +19 -19
  44. package/src/eth/codegen/ethers-sentio.ts +11 -11
  45. package/src/eth/codegen/event-handler.ts +1 -1
  46. package/src/eth/codegen/functions-handler.ts +1 -1
  47. package/src/sui/sui-plugin.ts +1 -1
  48. package/src/sui/sui-processor.ts +44 -4
@@ -328,7 +328,7 @@ export class ERC20Processor extends BaseProcessor<
328
328
  null
329
329
  );
330
330
  }
331
- return super.onEvent(handler, filter!, fetchConfig);
331
+ return super.onEthEvent(handler, filter!, fetchConfig);
332
332
  }
333
333
 
334
334
  onEventOwnershipTransferred(
@@ -343,7 +343,7 @@ export class ERC20Processor extends BaseProcessor<
343
343
  "OwnershipTransferred(address,address)"
344
344
  ](null, null);
345
345
  }
346
- return super.onEvent(handler, filter!, fetchConfig);
346
+ return super.onEthEvent(handler, filter!, fetchConfig);
347
347
  }
348
348
 
349
349
  onEventTransfer(
@@ -358,133 +358,133 @@ export class ERC20Processor extends BaseProcessor<
358
358
  null
359
359
  );
360
360
  }
361
- return super.onEvent(handler, filter!, fetchConfig);
361
+ return super.onEthEvent(handler, filter!, fetchConfig);
362
362
  }
363
363
 
364
364
  onCallAllowance(
365
365
  handler: (call: AllowanceCallTrace, ctx: ERC20Context) => void,
366
366
  fetchConfig?: Partial<EthFetchConfig>
367
367
  ): this {
368
- return super.onTrace("0xdd62ed3e", handler as any, fetchConfig);
368
+ return super.onEthTrace("0xdd62ed3e", handler as any, fetchConfig);
369
369
  }
370
370
 
371
371
  onCallApprove(
372
372
  handler: (call: ApproveCallTrace, ctx: ERC20Context) => void,
373
373
  fetchConfig?: Partial<EthFetchConfig>
374
374
  ): this {
375
- return super.onTrace("0x095ea7b3", handler as any, fetchConfig);
375
+ return super.onEthTrace("0x095ea7b3", handler as any, fetchConfig);
376
376
  }
377
377
 
378
378
  onCallBalanceOf(
379
379
  handler: (call: BalanceOfCallTrace, ctx: ERC20Context) => void,
380
380
  fetchConfig?: Partial<EthFetchConfig>
381
381
  ): this {
382
- return super.onTrace("0x70a08231", handler as any, fetchConfig);
382
+ return super.onEthTrace("0x70a08231", handler as any, fetchConfig);
383
383
  }
384
384
 
385
385
  onCallBurn(
386
386
  handler: (call: BurnCallTrace, ctx: ERC20Context) => void,
387
387
  fetchConfig?: Partial<EthFetchConfig>
388
388
  ): this {
389
- return super.onTrace("0x42966c68", handler as any, fetchConfig);
389
+ return super.onEthTrace("0x42966c68", handler as any, fetchConfig);
390
390
  }
391
391
 
392
392
  onCallBurnFrom(
393
393
  handler: (call: BurnFromCallTrace, ctx: ERC20Context) => void,
394
394
  fetchConfig?: Partial<EthFetchConfig>
395
395
  ): this {
396
- return super.onTrace("0x79cc6790", handler as any, fetchConfig);
396
+ return super.onEthTrace("0x79cc6790", handler as any, fetchConfig);
397
397
  }
398
398
 
399
399
  onCallDecimals(
400
400
  handler: (call: DecimalsCallTrace, ctx: ERC20Context) => void,
401
401
  fetchConfig?: Partial<EthFetchConfig>
402
402
  ): this {
403
- return super.onTrace("0x313ce567", handler as any, fetchConfig);
403
+ return super.onEthTrace("0x313ce567", handler as any, fetchConfig);
404
404
  }
405
405
 
406
406
  onCallDecreaseAllowance(
407
407
  handler: (call: DecreaseAllowanceCallTrace, ctx: ERC20Context) => void,
408
408
  fetchConfig?: Partial<EthFetchConfig>
409
409
  ): this {
410
- return super.onTrace("0xa457c2d7", handler as any, fetchConfig);
410
+ return super.onEthTrace("0xa457c2d7", handler as any, fetchConfig);
411
411
  }
412
412
 
413
413
  onCallIncreaseAllowance(
414
414
  handler: (call: IncreaseAllowanceCallTrace, ctx: ERC20Context) => void,
415
415
  fetchConfig?: Partial<EthFetchConfig>
416
416
  ): this {
417
- return super.onTrace("0x39509351", handler as any, fetchConfig);
417
+ return super.onEthTrace("0x39509351", handler as any, fetchConfig);
418
418
  }
419
419
 
420
420
  onCallLocker(
421
421
  handler: (call: LockerCallTrace, ctx: ERC20Context) => void,
422
422
  fetchConfig?: Partial<EthFetchConfig>
423
423
  ): this {
424
- return super.onTrace("0xd7b96d4e", handler as any, fetchConfig);
424
+ return super.onEthTrace("0xd7b96d4e", handler as any, fetchConfig);
425
425
  }
426
426
 
427
427
  onCallName(
428
428
  handler: (call: NameCallTrace, ctx: ERC20Context) => void,
429
429
  fetchConfig?: Partial<EthFetchConfig>
430
430
  ): this {
431
- return super.onTrace("0x06fdde03", handler as any, fetchConfig);
431
+ return super.onEthTrace("0x06fdde03", handler as any, fetchConfig);
432
432
  }
433
433
 
434
434
  onCallOwner(
435
435
  handler: (call: OwnerCallTrace, ctx: ERC20Context) => void,
436
436
  fetchConfig?: Partial<EthFetchConfig>
437
437
  ): this {
438
- return super.onTrace("0x8da5cb5b", handler as any, fetchConfig);
438
+ return super.onEthTrace("0x8da5cb5b", handler as any, fetchConfig);
439
439
  }
440
440
 
441
441
  onCallRenounceOwnership(
442
442
  handler: (call: RenounceOwnershipCallTrace, ctx: ERC20Context) => void,
443
443
  fetchConfig?: Partial<EthFetchConfig>
444
444
  ): this {
445
- return super.onTrace("0x715018a6", handler as any, fetchConfig);
445
+ return super.onEthTrace("0x715018a6", handler as any, fetchConfig);
446
446
  }
447
447
 
448
448
  onCallSetLocker(
449
449
  handler: (call: SetLockerCallTrace, ctx: ERC20Context) => void,
450
450
  fetchConfig?: Partial<EthFetchConfig>
451
451
  ): this {
452
- return super.onTrace("0x171060ec", handler as any, fetchConfig);
452
+ return super.onEthTrace("0x171060ec", handler as any, fetchConfig);
453
453
  }
454
454
 
455
455
  onCallSymbol(
456
456
  handler: (call: SymbolCallTrace, ctx: ERC20Context) => void,
457
457
  fetchConfig?: Partial<EthFetchConfig>
458
458
  ): this {
459
- return super.onTrace("0x95d89b41", handler as any, fetchConfig);
459
+ return super.onEthTrace("0x95d89b41", handler as any, fetchConfig);
460
460
  }
461
461
 
462
462
  onCallTotalSupply(
463
463
  handler: (call: TotalSupplyCallTrace, ctx: ERC20Context) => void,
464
464
  fetchConfig?: Partial<EthFetchConfig>
465
465
  ): this {
466
- return super.onTrace("0x18160ddd", handler as any, fetchConfig);
466
+ return super.onEthTrace("0x18160ddd", handler as any, fetchConfig);
467
467
  }
468
468
 
469
469
  onCallTransfer(
470
470
  handler: (call: TransferCallTrace, ctx: ERC20Context) => void,
471
471
  fetchConfig?: Partial<EthFetchConfig>
472
472
  ): this {
473
- return super.onTrace("0xa9059cbb", handler as any, fetchConfig);
473
+ return super.onEthTrace("0xa9059cbb", handler as any, fetchConfig);
474
474
  }
475
475
 
476
476
  onCallTransferFrom(
477
477
  handler: (call: TransferFromCallTrace, ctx: ERC20Context) => void,
478
478
  fetchConfig?: Partial<EthFetchConfig>
479
479
  ): this {
480
- return super.onTrace("0x23b872dd", handler as any, fetchConfig);
480
+ return super.onEthTrace("0x23b872dd", handler as any, fetchConfig);
481
481
  }
482
482
 
483
483
  onCallTransferOwnership(
484
484
  handler: (call: TransferOwnershipCallTrace, ctx: ERC20Context) => void,
485
485
  fetchConfig?: Partial<EthFetchConfig>
486
486
  ): this {
487
- return super.onTrace("0xf2fde38b", handler as any, fetchConfig);
487
+ return super.onEthTrace("0xf2fde38b", handler as any, fetchConfig);
488
488
  }
489
489
 
490
490
  public static filters = {
@@ -559,7 +559,7 @@ export class ERC20ProcessorTemplate extends BaseProcessorTemplate<
559
559
  null
560
560
  );
561
561
  }
562
- return super.onEvent(handler, filter!, fetchConfig);
562
+ return super.onEthEvent(handler, filter!, fetchConfig);
563
563
  }
564
564
 
565
565
  onEventOwnershipTransferred(
@@ -574,7 +574,7 @@ export class ERC20ProcessorTemplate extends BaseProcessorTemplate<
574
574
  "OwnershipTransferred(address,address)"
575
575
  ](null, null);
576
576
  }
577
- return super.onEvent(handler, filter!, fetchConfig);
577
+ return super.onEthEvent(handler, filter!, fetchConfig);
578
578
  }
579
579
 
580
580
  onEventTransfer(
@@ -589,7 +589,7 @@ export class ERC20ProcessorTemplate extends BaseProcessorTemplate<
589
589
  null
590
590
  );
591
591
  }
592
- return super.onEvent(handler, filter!, fetchConfig);
592
+ return super.onEthEvent(handler, filter!, fetchConfig);
593
593
  }
594
594
  }
595
595
 
@@ -233,7 +233,7 @@ export class ERC20BytesProcessor extends BaseProcessor<
233
233
  null
234
234
  );
235
235
  }
236
- return super.onEvent(handler, filter!, fetchConfig);
236
+ return super.onEthEvent(handler, filter!, fetchConfig);
237
237
  }
238
238
 
239
239
  onEventTransfer(
@@ -248,70 +248,70 @@ export class ERC20BytesProcessor extends BaseProcessor<
248
248
  null
249
249
  );
250
250
  }
251
- return super.onEvent(handler, filter!, fetchConfig);
251
+ return super.onEthEvent(handler, filter!, fetchConfig);
252
252
  }
253
253
 
254
254
  onCallName(
255
255
  handler: (call: NameCallTrace, ctx: ERC20BytesContext) => void,
256
256
  fetchConfig?: Partial<EthFetchConfig>
257
257
  ): this {
258
- return super.onTrace("0x06fdde03", handler as any, fetchConfig);
258
+ return super.onEthTrace("0x06fdde03", handler as any, fetchConfig);
259
259
  }
260
260
 
261
261
  onCallApprove(
262
262
  handler: (call: ApproveCallTrace, ctx: ERC20BytesContext) => void,
263
263
  fetchConfig?: Partial<EthFetchConfig>
264
264
  ): this {
265
- return super.onTrace("0x095ea7b3", handler as any, fetchConfig);
265
+ return super.onEthTrace("0x095ea7b3", handler as any, fetchConfig);
266
266
  }
267
267
 
268
268
  onCallTotalSupply(
269
269
  handler: (call: TotalSupplyCallTrace, ctx: ERC20BytesContext) => void,
270
270
  fetchConfig?: Partial<EthFetchConfig>
271
271
  ): this {
272
- return super.onTrace("0x18160ddd", handler as any, fetchConfig);
272
+ return super.onEthTrace("0x18160ddd", handler as any, fetchConfig);
273
273
  }
274
274
 
275
275
  onCallTransferFrom(
276
276
  handler: (call: TransferFromCallTrace, ctx: ERC20BytesContext) => void,
277
277
  fetchConfig?: Partial<EthFetchConfig>
278
278
  ): this {
279
- return super.onTrace("0x23b872dd", handler as any, fetchConfig);
279
+ return super.onEthTrace("0x23b872dd", handler as any, fetchConfig);
280
280
  }
281
281
 
282
282
  onCallDecimals(
283
283
  handler: (call: DecimalsCallTrace, ctx: ERC20BytesContext) => void,
284
284
  fetchConfig?: Partial<EthFetchConfig>
285
285
  ): this {
286
- return super.onTrace("0x313ce567", handler as any, fetchConfig);
286
+ return super.onEthTrace("0x313ce567", handler as any, fetchConfig);
287
287
  }
288
288
 
289
289
  onCallBalanceOf(
290
290
  handler: (call: BalanceOfCallTrace, ctx: ERC20BytesContext) => void,
291
291
  fetchConfig?: Partial<EthFetchConfig>
292
292
  ): this {
293
- return super.onTrace("0x70a08231", handler as any, fetchConfig);
293
+ return super.onEthTrace("0x70a08231", handler as any, fetchConfig);
294
294
  }
295
295
 
296
296
  onCallSymbol(
297
297
  handler: (call: SymbolCallTrace, ctx: ERC20BytesContext) => void,
298
298
  fetchConfig?: Partial<EthFetchConfig>
299
299
  ): this {
300
- return super.onTrace("0x95d89b41", handler as any, fetchConfig);
300
+ return super.onEthTrace("0x95d89b41", handler as any, fetchConfig);
301
301
  }
302
302
 
303
303
  onCallTransfer(
304
304
  handler: (call: TransferCallTrace, ctx: ERC20BytesContext) => void,
305
305
  fetchConfig?: Partial<EthFetchConfig>
306
306
  ): this {
307
- return super.onTrace("0xa9059cbb", handler as any, fetchConfig);
307
+ return super.onEthTrace("0xa9059cbb", handler as any, fetchConfig);
308
308
  }
309
309
 
310
310
  onCallAllowance(
311
311
  handler: (call: AllowanceCallTrace, ctx: ERC20BytesContext) => void,
312
312
  fetchConfig?: Partial<EthFetchConfig>
313
313
  ): this {
314
- return super.onTrace("0xdd62ed3e", handler as any, fetchConfig);
314
+ return super.onEthTrace("0xdd62ed3e", handler as any, fetchConfig);
315
315
  }
316
316
 
317
317
  public static filters = {
@@ -380,7 +380,7 @@ export class ERC20BytesProcessorTemplate extends BaseProcessorTemplate<
380
380
  null
381
381
  );
382
382
  }
383
- return super.onEvent(handler, filter!, fetchConfig);
383
+ return super.onEthEvent(handler, filter!, fetchConfig);
384
384
  }
385
385
 
386
386
  onEventTransfer(
@@ -395,7 +395,7 @@ export class ERC20BytesProcessorTemplate extends BaseProcessorTemplate<
395
395
  null
396
396
  );
397
397
  }
398
- return super.onEvent(handler, filter!, fetchConfig);
398
+ return super.onEthEvent(handler, filter!, fetchConfig);
399
399
  }
400
400
  }
401
401
 
@@ -355,7 +355,7 @@ export class ERC721Processor extends BaseProcessor<
355
355
  null
356
356
  );
357
357
  }
358
- return super.onEvent(handler, filter!, fetchConfig);
358
+ return super.onEthEvent(handler, filter!, fetchConfig);
359
359
  }
360
360
 
361
361
  onEventApprovalForAll(
@@ -370,7 +370,7 @@ export class ERC721Processor extends BaseProcessor<
370
370
  null
371
371
  );
372
372
  }
373
- return super.onEvent(handler, filter!, fetchConfig);
373
+ return super.onEthEvent(handler, filter!, fetchConfig);
374
374
  }
375
375
 
376
376
  onEventTransfer(
@@ -385,56 +385,56 @@ export class ERC721Processor extends BaseProcessor<
385
385
  null
386
386
  );
387
387
  }
388
- return super.onEvent(handler, filter!, fetchConfig);
388
+ return super.onEthEvent(handler, filter!, fetchConfig);
389
389
  }
390
390
 
391
391
  onCallApprove(
392
392
  handler: (call: ApproveCallTrace, ctx: ERC721Context) => void,
393
393
  fetchConfig?: Partial<EthFetchConfig>
394
394
  ): this {
395
- return super.onTrace("0x095ea7b3", handler as any, fetchConfig);
395
+ return super.onEthTrace("0x095ea7b3", handler as any, fetchConfig);
396
396
  }
397
397
 
398
398
  onCallTotalSupply(
399
399
  handler: (call: TotalSupplyCallTrace, ctx: ERC721Context) => void,
400
400
  fetchConfig?: Partial<EthFetchConfig>
401
401
  ): this {
402
- return super.onTrace("0x18160ddd", handler as any, fetchConfig);
402
+ return super.onEthTrace("0x18160ddd", handler as any, fetchConfig);
403
403
  }
404
404
 
405
405
  onCallBalanceOf(
406
406
  handler: (call: BalanceOfCallTrace, ctx: ERC721Context) => void,
407
407
  fetchConfig?: Partial<EthFetchConfig>
408
408
  ): this {
409
- return super.onTrace("0x70a08231", handler as any, fetchConfig);
409
+ return super.onEthTrace("0x70a08231", handler as any, fetchConfig);
410
410
  }
411
411
 
412
412
  onCallGetApproved(
413
413
  handler: (call: GetApprovedCallTrace, ctx: ERC721Context) => void,
414
414
  fetchConfig?: Partial<EthFetchConfig>
415
415
  ): this {
416
- return super.onTrace("0x081812fc", handler as any, fetchConfig);
416
+ return super.onEthTrace("0x081812fc", handler as any, fetchConfig);
417
417
  }
418
418
 
419
419
  onCallIsApprovedForAll(
420
420
  handler: (call: IsApprovedForAllCallTrace, ctx: ERC721Context) => void,
421
421
  fetchConfig?: Partial<EthFetchConfig>
422
422
  ): this {
423
- return super.onTrace("0xe985e9c5", handler as any, fetchConfig);
423
+ return super.onEthTrace("0xe985e9c5", handler as any, fetchConfig);
424
424
  }
425
425
 
426
426
  onCallName(
427
427
  handler: (call: NameCallTrace, ctx: ERC721Context) => void,
428
428
  fetchConfig?: Partial<EthFetchConfig>
429
429
  ): this {
430
- return super.onTrace("0x06fdde03", handler as any, fetchConfig);
430
+ return super.onEthTrace("0x06fdde03", handler as any, fetchConfig);
431
431
  }
432
432
 
433
433
  onCallOwnerOf(
434
434
  handler: (call: OwnerOfCallTrace, ctx: ERC721Context) => void,
435
435
  fetchConfig?: Partial<EthFetchConfig>
436
436
  ): this {
437
- return super.onTrace("0x6352211e", handler as any, fetchConfig);
437
+ return super.onEthTrace("0x6352211e", handler as any, fetchConfig);
438
438
  }
439
439
 
440
440
  onCallSafeTransferFrom_address_address_uint256(
@@ -444,7 +444,7 @@ export class ERC721Processor extends BaseProcessor<
444
444
  ) => void,
445
445
  fetchConfig?: Partial<EthFetchConfig>
446
446
  ): this {
447
- return super.onTrace("0x42842e0e", handler as any, fetchConfig);
447
+ return super.onEthTrace("0x42842e0e", handler as any, fetchConfig);
448
448
  }
449
449
 
450
450
  onCallSafeTransferFrom_address_address_uint256_bytes(
@@ -454,42 +454,42 @@ export class ERC721Processor extends BaseProcessor<
454
454
  ) => void,
455
455
  fetchConfig?: Partial<EthFetchConfig>
456
456
  ): this {
457
- return super.onTrace("0xb88d4fde", handler as any, fetchConfig);
457
+ return super.onEthTrace("0xb88d4fde", handler as any, fetchConfig);
458
458
  }
459
459
 
460
460
  onCallSetApprovalForAll(
461
461
  handler: (call: SetApprovalForAllCallTrace, ctx: ERC721Context) => void,
462
462
  fetchConfig?: Partial<EthFetchConfig>
463
463
  ): this {
464
- return super.onTrace("0xa22cb465", handler as any, fetchConfig);
464
+ return super.onEthTrace("0xa22cb465", handler as any, fetchConfig);
465
465
  }
466
466
 
467
467
  onCallSupportsInterface(
468
468
  handler: (call: SupportsInterfaceCallTrace, ctx: ERC721Context) => void,
469
469
  fetchConfig?: Partial<EthFetchConfig>
470
470
  ): this {
471
- return super.onTrace("0x01ffc9a7", handler as any, fetchConfig);
471
+ return super.onEthTrace("0x01ffc9a7", handler as any, fetchConfig);
472
472
  }
473
473
 
474
474
  onCallSymbol(
475
475
  handler: (call: SymbolCallTrace, ctx: ERC721Context) => void,
476
476
  fetchConfig?: Partial<EthFetchConfig>
477
477
  ): this {
478
- return super.onTrace("0x95d89b41", handler as any, fetchConfig);
478
+ return super.onEthTrace("0x95d89b41", handler as any, fetchConfig);
479
479
  }
480
480
 
481
481
  onCallTokenURI(
482
482
  handler: (call: TokenURICallTrace, ctx: ERC721Context) => void,
483
483
  fetchConfig?: Partial<EthFetchConfig>
484
484
  ): this {
485
- return super.onTrace("0xc87b56dd", handler as any, fetchConfig);
485
+ return super.onEthTrace("0xc87b56dd", handler as any, fetchConfig);
486
486
  }
487
487
 
488
488
  onCallTransferFrom(
489
489
  handler: (call: TransferFromCallTrace, ctx: ERC721Context) => void,
490
490
  fetchConfig?: Partial<EthFetchConfig>
491
491
  ): this {
492
- return super.onTrace("0x23b872dd", handler as any, fetchConfig);
492
+ return super.onEthTrace("0x23b872dd", handler as any, fetchConfig);
493
493
  }
494
494
 
495
495
  public static filters = {
@@ -574,7 +574,7 @@ export class ERC721ProcessorTemplate extends BaseProcessorTemplate<
574
574
  null
575
575
  );
576
576
  }
577
- return super.onEvent(handler, filter!, fetchConfig);
577
+ return super.onEthEvent(handler, filter!, fetchConfig);
578
578
  }
579
579
 
580
580
  onEventApprovalForAll(
@@ -589,7 +589,7 @@ export class ERC721ProcessorTemplate extends BaseProcessorTemplate<
589
589
  null
590
590
  );
591
591
  }
592
- return super.onEvent(handler, filter!, fetchConfig);
592
+ return super.onEthEvent(handler, filter!, fetchConfig);
593
593
  }
594
594
 
595
595
  onEventTransfer(
@@ -604,7 +604,7 @@ export class ERC721ProcessorTemplate extends BaseProcessorTemplate<
604
604
  null
605
605
  );
606
606
  }
607
- return super.onEvent(handler, filter!, fetchConfig);
607
+ return super.onEthEvent(handler, filter!, fetchConfig);
608
608
  }
609
609
  }
610
610
 
@@ -239,7 +239,7 @@ export class WETH9Processor extends BaseProcessor<
239
239
  null
240
240
  );
241
241
  }
242
- return super.onEvent(handler, filter!, fetchConfig);
242
+ return super.onEthEvent(handler, filter!, fetchConfig);
243
243
  }
244
244
 
245
245
  onEventTransfer(
@@ -254,7 +254,7 @@ export class WETH9Processor extends BaseProcessor<
254
254
  null
255
255
  );
256
256
  }
257
- return super.onEvent(handler, filter!, fetchConfig);
257
+ return super.onEthEvent(handler, filter!, fetchConfig);
258
258
  }
259
259
 
260
260
  onEventDeposit(
@@ -265,7 +265,7 @@ export class WETH9Processor extends BaseProcessor<
265
265
  if (!filter) {
266
266
  filter = templateContract.filters["Deposit(address,uint256)"](null, null);
267
267
  }
268
- return super.onEvent(handler, filter!, fetchConfig);
268
+ return super.onEthEvent(handler, filter!, fetchConfig);
269
269
  }
270
270
 
271
271
  onEventWithdrawal(
@@ -279,84 +279,84 @@ export class WETH9Processor extends BaseProcessor<
279
279
  null
280
280
  );
281
281
  }
282
- return super.onEvent(handler, filter!, fetchConfig);
282
+ return super.onEthEvent(handler, filter!, fetchConfig);
283
283
  }
284
284
 
285
285
  onCallName(
286
286
  handler: (call: NameCallTrace, ctx: WETH9Context) => void,
287
287
  fetchConfig?: Partial<EthFetchConfig>
288
288
  ): this {
289
- return super.onTrace("0x06fdde03", handler as any, fetchConfig);
289
+ return super.onEthTrace("0x06fdde03", handler as any, fetchConfig);
290
290
  }
291
291
 
292
292
  onCallApprove(
293
293
  handler: (call: ApproveCallTrace, ctx: WETH9Context) => void,
294
294
  fetchConfig?: Partial<EthFetchConfig>
295
295
  ): this {
296
- return super.onTrace("0x095ea7b3", handler as any, fetchConfig);
296
+ return super.onEthTrace("0x095ea7b3", handler as any, fetchConfig);
297
297
  }
298
298
 
299
299
  onCallTotalSupply(
300
300
  handler: (call: TotalSupplyCallTrace, ctx: WETH9Context) => void,
301
301
  fetchConfig?: Partial<EthFetchConfig>
302
302
  ): this {
303
- return super.onTrace("0x18160ddd", handler as any, fetchConfig);
303
+ return super.onEthTrace("0x18160ddd", handler as any, fetchConfig);
304
304
  }
305
305
 
306
306
  onCallTransferFrom(
307
307
  handler: (call: TransferFromCallTrace, ctx: WETH9Context) => void,
308
308
  fetchConfig?: Partial<EthFetchConfig>
309
309
  ): this {
310
- return super.onTrace("0x23b872dd", handler as any, fetchConfig);
310
+ return super.onEthTrace("0x23b872dd", handler as any, fetchConfig);
311
311
  }
312
312
 
313
313
  onCallWithdraw(
314
314
  handler: (call: WithdrawCallTrace, ctx: WETH9Context) => void,
315
315
  fetchConfig?: Partial<EthFetchConfig>
316
316
  ): this {
317
- return super.onTrace("0x2e1a7d4d", handler as any, fetchConfig);
317
+ return super.onEthTrace("0x2e1a7d4d", handler as any, fetchConfig);
318
318
  }
319
319
 
320
320
  onCallDecimals(
321
321
  handler: (call: DecimalsCallTrace, ctx: WETH9Context) => void,
322
322
  fetchConfig?: Partial<EthFetchConfig>
323
323
  ): this {
324
- return super.onTrace("0x313ce567", handler as any, fetchConfig);
324
+ return super.onEthTrace("0x313ce567", handler as any, fetchConfig);
325
325
  }
326
326
 
327
327
  onCallBalanceOf(
328
328
  handler: (call: BalanceOfCallTrace, ctx: WETH9Context) => void,
329
329
  fetchConfig?: Partial<EthFetchConfig>
330
330
  ): this {
331
- return super.onTrace("0x70a08231", handler as any, fetchConfig);
331
+ return super.onEthTrace("0x70a08231", handler as any, fetchConfig);
332
332
  }
333
333
 
334
334
  onCallSymbol(
335
335
  handler: (call: SymbolCallTrace, ctx: WETH9Context) => void,
336
336
  fetchConfig?: Partial<EthFetchConfig>
337
337
  ): this {
338
- return super.onTrace("0x95d89b41", handler as any, fetchConfig);
338
+ return super.onEthTrace("0x95d89b41", handler as any, fetchConfig);
339
339
  }
340
340
 
341
341
  onCallTransfer(
342
342
  handler: (call: TransferCallTrace, ctx: WETH9Context) => void,
343
343
  fetchConfig?: Partial<EthFetchConfig>
344
344
  ): this {
345
- return super.onTrace("0xa9059cbb", handler as any, fetchConfig);
345
+ return super.onEthTrace("0xa9059cbb", handler as any, fetchConfig);
346
346
  }
347
347
 
348
348
  onCallDeposit(
349
349
  handler: (call: DepositCallTrace, ctx: WETH9Context) => void,
350
350
  fetchConfig?: Partial<EthFetchConfig>
351
351
  ): this {
352
- return super.onTrace("0xd0e30db0", handler as any, fetchConfig);
352
+ return super.onEthTrace("0xd0e30db0", handler as any, fetchConfig);
353
353
  }
354
354
 
355
355
  onCallAllowance(
356
356
  handler: (call: AllowanceCallTrace, ctx: WETH9Context) => void,
357
357
  fetchConfig?: Partial<EthFetchConfig>
358
358
  ): this {
359
- return super.onTrace("0xdd62ed3e", handler as any, fetchConfig);
359
+ return super.onEthTrace("0xdd62ed3e", handler as any, fetchConfig);
360
360
  }
361
361
 
362
362
  public static filters = {
@@ -428,7 +428,7 @@ export class WETH9ProcessorTemplate extends BaseProcessorTemplate<
428
428
  null
429
429
  );
430
430
  }
431
- return super.onEvent(handler, filter!, fetchConfig);
431
+ return super.onEthEvent(handler, filter!, fetchConfig);
432
432
  }
433
433
 
434
434
  onEventTransfer(
@@ -443,7 +443,7 @@ export class WETH9ProcessorTemplate extends BaseProcessorTemplate<
443
443
  null
444
444
  );
445
445
  }
446
- return super.onEvent(handler, filter!, fetchConfig);
446
+ return super.onEthEvent(handler, filter!, fetchConfig);
447
447
  }
448
448
 
449
449
  onEventDeposit(
@@ -454,7 +454,7 @@ export class WETH9ProcessorTemplate extends BaseProcessorTemplate<
454
454
  if (!filter) {
455
455
  filter = templateContract.filters["Deposit(address,uint256)"](null, null);
456
456
  }
457
- return super.onEvent(handler, filter!, fetchConfig);
457
+ return super.onEthEvent(handler, filter!, fetchConfig);
458
458
  }
459
459
 
460
460
  onEventWithdrawal(
@@ -468,7 +468,7 @@ export class WETH9ProcessorTemplate extends BaseProcessorTemplate<
468
468
  null
469
469
  );
470
470
  }
471
- return super.onEvent(handler, filter!, fetchConfig);
471
+ return super.onEthEvent(handler, filter!, fetchConfig);
472
472
  }
473
473
  }
474
474
 
@@ -116,25 +116,25 @@ export default class EthersSentio extends Ethers.default {
116
116
  const content = `
117
117
 
118
118
  ${contract.name}Processor.bind({ address: '${contract.address}', network: EthChainId.${chainKey} })
119
- .onAllEvents((evt, ctx) => {
119
+ .onEvent((evt, ctx) => {
120
120
  ctx.meter.Counter('event_count').add(1, { name: evt.name })
121
121
  ctx.eventLogger.emit(evt.name, {
122
122
  ...evt.args.toObject(),
123
123
  })
124
124
  })
125
- .onAllTraces(function (trace, ctx) {
126
- const succeed = trace.error === undefined
127
- ctx.meter.Counter('trace_count').add(1, { name: trace.name, success: String(succeed) })
128
- if (succeed) {
129
- ctx.eventLogger.emit(trace.name, {
130
- distinctId: trace.action.from,
131
- ...trace.args.toObject(),
132
- })
133
- }
134
- })
135
125
  `
136
126
  exampleContent += content
137
127
  }
128
+ // .onAllTraces(function (trace, ctx) {
129
+ // const succeed = trace.error === undefined
130
+ // ctx.meter.Counter('trace_count').add(1, { name: trace.name, success: String(succeed) })
131
+ // if (succeed) {
132
+ // ctx.eventLogger.emit(trace.name, {
133
+ // distinctId: trace.action.from,
134
+ // ...trace.args.toObject(),
135
+ // })
136
+ // }
137
+ // })
138
138
 
139
139
  files.push({
140
140
  path: join(rootDir, 'processor.eth.example.ts'),
@@ -16,7 +16,7 @@ export function generateEventHandler(event: EventDeclaration, contractName: stri
16
16
  if (!filter) {
17
17
  filter = templateContract.filters['${filterName}'](${event.inputs.map(() => 'null').join(',')})
18
18
  }
19
- return super.onEvent(handler, filter!, fetchConfig)
19
+ return super.onEthEvent(handler, filter!, fetchConfig)
20
20
  }
21
21
  `
22
22
  }