@sentio/sdk 1.25.2 → 1.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/lib/aptos/aptos-processor.d.ts +23 -3
  2. package/lib/aptos/aptos-processor.js +69 -20
  3. package/lib/aptos/aptos-processor.js.map +1 -1
  4. package/lib/aptos/context.d.ts +9 -3
  5. package/lib/aptos/context.js +32 -2
  6. package/lib/aptos/context.js.map +1 -1
  7. package/lib/aptos/network.d.ts +1 -2
  8. package/lib/aptos/network.js +1 -1
  9. package/lib/aptos/network.js.map +1 -1
  10. package/lib/builtin/internal/eacaggregatorproxy_processor.js +24 -8
  11. package/lib/builtin/internal/eacaggregatorproxy_processor.js.map +1 -1
  12. package/lib/builtin/internal/erc20_processor.js +18 -6
  13. package/lib/builtin/internal/erc20_processor.js.map +1 -1
  14. package/lib/builtin/internal/erc20bytes_processor.js +12 -4
  15. package/lib/builtin/internal/erc20bytes_processor.js.map +1 -1
  16. package/lib/builtin/internal/weth9_processor.js +24 -8
  17. package/lib/builtin/internal/weth9_processor.js.map +1 -1
  18. package/lib/gen/processor/protos/processor.d.ts +22 -9
  19. package/lib/gen/processor/protos/processor.js +113 -24
  20. package/lib/gen/processor/protos/processor.js.map +1 -1
  21. package/lib/processor-state.d.ts +2 -0
  22. package/lib/processor-state.js +1 -0
  23. package/lib/processor-state.js.map +1 -1
  24. package/lib/service.d.ts +3 -0
  25. package/lib/service.js +40 -2
  26. package/lib/service.js.map +1 -1
  27. package/lib/target-ethers-sentio/codegen.js +3 -1
  28. package/lib/target-ethers-sentio/codegen.js.map +1 -1
  29. package/lib/tests/aptos.test.js +25 -0
  30. package/lib/tests/aptos.test.js.map +1 -1
  31. package/lib/tests/souffl3.js +5 -1
  32. package/lib/tests/souffl3.js.map +1 -1
  33. package/package.json +1 -1
  34. package/src/aptos/aptos-processor.ts +92 -19
  35. package/src/aptos/context.ts +31 -3
  36. package/src/aptos/network.ts +2 -4
  37. package/src/builtin/internal/eacaggregatorproxy_processor.ts +8 -0
  38. package/src/builtin/internal/erc20_processor.ts +24 -28
  39. package/src/builtin/internal/erc20bytes_processor.ts +16 -20
  40. package/src/builtin/internal/weth9_processor.ts +32 -30
  41. package/src/gen/processor/protos/processor.ts +153 -37
  42. package/src/processor-state.ts +2 -0
  43. package/src/service.ts +45 -2
  44. package/src/target-ethers-sentio/codegen.ts +3 -1
  45. package/src/tests/aptos.test.ts +28 -0
  46. package/src/tests/souffl3.ts +6 -1
@@ -8,14 +8,15 @@ import {
8
8
  TypeRegistry,
9
9
  } from '.'
10
10
 
11
- import Long from 'long'
12
11
  import { EventInstance, TYPE_REGISTRY } from './types'
13
12
  import { getChainId } from './network'
13
+ import { MoveResource } from 'aptos-sdk/src/generated'
14
+ import { AptosResourceContext } from './context'
14
15
 
15
16
  type IndexConfigure = {
16
17
  address: string
17
18
  network: AptosNetwork
18
- startVersion: Long
19
+ startVersion: bigint
19
20
  // endSeqNumber?: Long
20
21
  }
21
22
 
@@ -49,6 +50,18 @@ class CallHandler {
49
50
  handler: (call: Transaction_UserTransaction) => Promise<ProcessResult>
50
51
  }
51
52
 
53
+ export class MoveResourcesWithVersionPayload {
54
+ resources: MoveResource[]
55
+ version: string
56
+ }
57
+
58
+ class ResourceHandlder {
59
+ type?: string
60
+ versionInterval?: number
61
+ timeIntervalInMinutes?: number
62
+ handler: (resource: MoveResourcesWithVersionPayload) => Promise<ProcessResult>
63
+ }
64
+
52
65
  export class AptosBaseProcessor {
53
66
  readonly moduleName: string
54
67
  config: IndexConfigure
@@ -57,7 +70,7 @@ export class AptosBaseProcessor {
57
70
 
58
71
  constructor(moduleName: string, options: AptosBindOptions) {
59
72
  this.moduleName = moduleName
60
- this.configure(options)
73
+ this.config = configure(options)
61
74
  global.PROCESSOR_STATE.aptosProcessors.push(this)
62
75
  this.loadTypes(TYPE_REGISTRY)
63
76
  }
@@ -79,7 +92,7 @@ export class AptosBaseProcessor {
79
92
  processor.moduleName,
80
93
  processor.config.network,
81
94
  processor.config.address,
82
- Long.fromString(tx.version),
95
+ BigInt(tx.version),
83
96
  tx
84
97
  )
85
98
  if (tx) {
@@ -116,7 +129,7 @@ export class AptosBaseProcessor {
116
129
  processor.moduleName,
117
130
  processor.config.network,
118
131
  processor.config.address,
119
- Long.fromString(txn.version),
132
+ BigInt(txn.version),
120
133
  txn
121
134
  )
122
135
  if (txn && txn.events) {
@@ -158,7 +171,7 @@ export class AptosBaseProcessor {
158
171
  processor.moduleName,
159
172
  processor.config.network,
160
173
  processor.config.address,
161
- Long.fromString(tx.version),
174
+ BigInt(tx.version),
162
175
  tx
163
176
  )
164
177
  if (tx) {
@@ -173,19 +186,6 @@ export class AptosBaseProcessor {
173
186
  return this
174
187
  }
175
188
 
176
- private configure(options: AptosBindOptions) {
177
- let startVersion = Long.ZERO
178
- if (options.startVersion) {
179
- startVersion = Long.fromValue(options.startVersion)
180
- }
181
-
182
- this.config = {
183
- startVersion: startVersion,
184
- address: options.address,
185
- network: options.network || AptosNetwork.MAIN_NET,
186
- }
187
- }
188
-
189
189
  getChainId(): string {
190
190
  return getChainId(this.config.network)
191
191
  }
@@ -202,3 +202,76 @@ export class AptosBaseProcessor {
202
202
  console.log('')
203
203
  }
204
204
  }
205
+
206
+ export class AptosAccountProcessor {
207
+ config: IndexConfigure
208
+
209
+ resourcesHandlers: ResourceHandlder[] = []
210
+
211
+ static bind(options: AptosBindOptions): AptosAccountProcessor {
212
+ return new AptosAccountProcessor(options)
213
+ }
214
+
215
+ protected constructor(options: AptosBindOptions) {
216
+ this.config = configure(options)
217
+ global.PROCESSOR_STATE.aptosAccountProcessors.push(this)
218
+ }
219
+
220
+ getChainId(): string {
221
+ return getChainId(this.config.network)
222
+ }
223
+
224
+ private onInterval(
225
+ handler: (resources: MoveResource[], ctx: AptosResourceContext) => void,
226
+ timeInterval: number | undefined,
227
+ versionInterval: number | undefined,
228
+ type: string | undefined
229
+ ) {
230
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
231
+ const processor = this
232
+ this.resourcesHandlers.push({
233
+ handler: async function (arg) {
234
+ const ctx = new AptosResourceContext(processor.config.network, processor.config.address, BigInt(arg.version))
235
+ await handler(arg.resources, ctx)
236
+ return ctx.getProcessResult()
237
+ },
238
+ timeIntervalInMinutes: timeInterval,
239
+ versionInterval: versionInterval,
240
+ type: type,
241
+ })
242
+ return this
243
+ }
244
+
245
+ public onTimeInterval(
246
+ handler: (resources: MoveResource[], ctx: AptosResourceContext) => void,
247
+ timeIntervalInMinutes = 60,
248
+ typpe?: string
249
+ ) {
250
+ return this.onInterval(handler, timeIntervalInMinutes, undefined, typpe)
251
+ }
252
+
253
+ public onVersionInterval(
254
+ handler: (resources: MoveResource[], ctx: AptosResourceContext) => void,
255
+ versionInterval = 100000,
256
+ typePrefix?: string
257
+ ) {
258
+ return this.onInterval(handler, undefined, versionInterval, typePrefix)
259
+ }
260
+ }
261
+
262
+ function configure(options: AptosBindOptions): IndexConfigure {
263
+ let startVersion = 0n
264
+ if (options.startVersion !== undefined) {
265
+ if (typeof options.startVersion === 'number') {
266
+ startVersion = BigInt(options.startVersion)
267
+ } else {
268
+ startVersion = options.startVersion
269
+ }
270
+ }
271
+
272
+ return {
273
+ startVersion: startVersion,
274
+ address: options.address,
275
+ network: options.network || AptosNetwork.MAIN_NET,
276
+ }
277
+ }
@@ -10,14 +10,14 @@ export class AptosContext extends BaseContext {
10
10
  address: string
11
11
  network: AptosNetwork
12
12
  moduleName: string
13
- version: Long
13
+ version: bigint
14
14
  transaction: Transaction_UserTransaction
15
15
 
16
16
  constructor(
17
17
  moduleName: string,
18
18
  network: AptosNetwork,
19
19
  address: string,
20
- version: Long,
20
+ version: bigint,
21
21
  transaction?: Transaction_UserTransaction
22
22
  ) {
23
23
  super()
@@ -34,7 +34,7 @@ export class AptosContext extends BaseContext {
34
34
  return {
35
35
  address: this.address,
36
36
  contractName: this.moduleName,
37
- blockNumber: this.version,
37
+ blockNumber: Long.fromString(this.version.toString()),
38
38
  transactionIndex: 0,
39
39
  transactionHash: this.transaction?.hash || '', // TODO
40
40
  logIndex: 0,
@@ -45,3 +45,31 @@ export class AptosContext extends BaseContext {
45
45
  }
46
46
  }
47
47
  }
48
+
49
+ export class AptosResourceContext extends BaseContext {
50
+ address: string
51
+ network: AptosNetwork
52
+ version: bigint
53
+
54
+ constructor(network: AptosNetwork, address: string, version: bigint) {
55
+ super()
56
+ this.address = address
57
+ this.network = network
58
+ this.version = version
59
+ }
60
+
61
+ getMetaData(descriptor: DataDescriptor, labels: Labels): RecordMetaData {
62
+ return {
63
+ address: this.address,
64
+ contractName: 'resources',
65
+ blockNumber: Long.fromString(this.version.toString()),
66
+ transactionIndex: 0,
67
+ transactionHash: '',
68
+ logIndex: 0,
69
+ chainId: getChainId(this.network),
70
+ dataDescriptor: descriptor,
71
+ name: descriptor.name,
72
+ labels: normalizeLabels(labels),
73
+ }
74
+ }
75
+ }
@@ -1,4 +1,3 @@
1
- import Long from 'long'
2
1
  import { APTOS_MAINNET_ID, APTOS_TESTNET_ID, CHAIN_MAP } from '../utils/chain'
3
2
  import { AptosClient } from 'aptos-sdk'
4
3
 
@@ -38,7 +37,6 @@ export function getRpcClient(network: AptosNetwork): AptosClient {
38
37
 
39
38
  export class AptosBindOptions {
40
39
  address: string
41
- network?: AptosNetwork = AptosNetwork.TEST_NET
42
- startVersion?: Long | number
43
- // endBlock?: Long | number
40
+ network?: AptosNetwork = AptosNetwork.MAIN_NET
41
+ startVersion?: bigint | number
44
42
  }
@@ -857,6 +857,7 @@ export class EACAggregatorProxyProcessorTemplate extends BaseProcessorTemplate<
857
857
  if (!filter) {
858
858
  // @ts-ignore
859
859
  filter = EACAggregatorProxyProcessor.filters[
860
+ // @ts-ignore
860
861
  "AnswerUpdated(int256,uint256,uint256)"
861
862
  ](null, null, null);
862
863
  }
@@ -870,6 +871,7 @@ export class EACAggregatorProxyProcessorTemplate extends BaseProcessorTemplate<
870
871
  if (!filter) {
871
872
  // @ts-ignore
872
873
  filter = EACAggregatorProxyProcessor.filters[
874
+ // @ts-ignore
873
875
  "NewRound(uint256,address,uint256)"
874
876
  ](null, null, null);
875
877
  }
@@ -888,6 +890,7 @@ export class EACAggregatorProxyProcessorTemplate extends BaseProcessorTemplate<
888
890
  if (!filter) {
889
891
  // @ts-ignore
890
892
  filter = EACAggregatorProxyProcessor.filters[
893
+ // @ts-ignore
891
894
  "OwnershipTransferRequested(address,address)"
892
895
  ](null, null);
893
896
  }
@@ -904,6 +907,7 @@ export class EACAggregatorProxyProcessorTemplate extends BaseProcessorTemplate<
904
907
  if (!filter) {
905
908
  // @ts-ignore
906
909
  filter = EACAggregatorProxyProcessor.filters[
910
+ // @ts-ignore
907
911
  "OwnershipTransferred(address,address)"
908
912
  ](null, null);
909
913
  }
@@ -1114,6 +1118,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
1114
1118
  if (!filter) {
1115
1119
  // @ts-ignore
1116
1120
  filter = EACAggregatorProxyProcessor.filters[
1121
+ // @ts-ignore
1117
1122
  "AnswerUpdated(int256,uint256,uint256)"
1118
1123
  ](null, null, null);
1119
1124
  }
@@ -1127,6 +1132,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
1127
1132
  if (!filter) {
1128
1133
  // @ts-ignore
1129
1134
  filter = EACAggregatorProxyProcessor.filters[
1135
+ // @ts-ignore
1130
1136
  "NewRound(uint256,address,uint256)"
1131
1137
  ](null, null, null);
1132
1138
  }
@@ -1145,6 +1151,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
1145
1151
  if (!filter) {
1146
1152
  // @ts-ignore
1147
1153
  filter = EACAggregatorProxyProcessor.filters[
1154
+ // @ts-ignore
1148
1155
  "OwnershipTransferRequested(address,address)"
1149
1156
  ](null, null);
1150
1157
  }
@@ -1161,6 +1168,7 @@ export class EACAggregatorProxyProcessor extends BaseProcessor<
1161
1168
  if (!filter) {
1162
1169
  // @ts-ignore
1163
1170
  filter = EACAggregatorProxyProcessor.filters[
1171
+ // @ts-ignore
1164
1172
  "OwnershipTransferred(address,address)"
1165
1173
  ](null, null);
1166
1174
  }
@@ -446,11 +446,10 @@ export class ERC20ProcessorTemplate extends BaseProcessorTemplate<
446
446
  ) {
447
447
  if (!filter) {
448
448
  // @ts-ignore
449
- filter = ERC20Processor.filters["Approval(address,address,uint256)"](
450
- null,
451
- null,
452
- null
453
- );
449
+ filter = ERC20Processor.filters[
450
+ // @ts-ignore
451
+ "Approval(address,address,uint256)"
452
+ ](null, null, null);
454
453
  }
455
454
  return super.onEvent(handler, filter!);
456
455
  }
@@ -461,10 +460,10 @@ export class ERC20ProcessorTemplate extends BaseProcessorTemplate<
461
460
  ) {
462
461
  if (!filter) {
463
462
  // @ts-ignore
464
- filter = ERC20Processor.filters["OwnershipTransferred(address,address)"](
465
- null,
466
- null
467
- );
463
+ filter = ERC20Processor.filters[
464
+ // @ts-ignore
465
+ "OwnershipTransferred(address,address)"
466
+ ](null, null);
468
467
  }
469
468
  return super.onEvent(handler, filter!);
470
469
  }
@@ -475,11 +474,10 @@ export class ERC20ProcessorTemplate extends BaseProcessorTemplate<
475
474
  ) {
476
475
  if (!filter) {
477
476
  // @ts-ignore
478
- filter = ERC20Processor.filters["Transfer(address,address,uint256)"](
479
- null,
480
- null,
481
- null
482
- );
477
+ filter = ERC20Processor.filters[
478
+ // @ts-ignore
479
+ "Transfer(address,address,uint256)"
480
+ ](null, null, null);
483
481
  }
484
482
  return super.onEvent(handler, filter!);
485
483
  }
@@ -591,11 +589,10 @@ export class ERC20Processor extends BaseProcessor<
591
589
  ) {
592
590
  if (!filter) {
593
591
  // @ts-ignore
594
- filter = ERC20Processor.filters["Approval(address,address,uint256)"](
595
- null,
596
- null,
597
- null
598
- );
592
+ filter = ERC20Processor.filters[
593
+ // @ts-ignore
594
+ "Approval(address,address,uint256)"
595
+ ](null, null, null);
599
596
  }
600
597
  return super.onEvent(handler, filter!);
601
598
  }
@@ -606,10 +603,10 @@ export class ERC20Processor extends BaseProcessor<
606
603
  ) {
607
604
  if (!filter) {
608
605
  // @ts-ignore
609
- filter = ERC20Processor.filters["OwnershipTransferred(address,address)"](
610
- null,
611
- null
612
- );
606
+ filter = ERC20Processor.filters[
607
+ // @ts-ignore
608
+ "OwnershipTransferred(address,address)"
609
+ ](null, null);
613
610
  }
614
611
  return super.onEvent(handler, filter!);
615
612
  }
@@ -620,11 +617,10 @@ export class ERC20Processor extends BaseProcessor<
620
617
  ) {
621
618
  if (!filter) {
622
619
  // @ts-ignore
623
- filter = ERC20Processor.filters["Transfer(address,address,uint256)"](
624
- null,
625
- null,
626
- null
627
- );
620
+ filter = ERC20Processor.filters[
621
+ // @ts-ignore
622
+ "Transfer(address,address,uint256)"
623
+ ](null, null, null);
628
624
  }
629
625
  return super.onEvent(handler, filter!);
630
626
  }
@@ -323,11 +323,10 @@ export class ERC20BytesProcessorTemplate extends BaseProcessorTemplate<
323
323
  ) {
324
324
  if (!filter) {
325
325
  // @ts-ignore
326
- filter = ERC20BytesProcessor.filters["Approval(address,address,uint256)"](
327
- null,
328
- null,
329
- null
330
- );
326
+ filter = ERC20BytesProcessor.filters[
327
+ // @ts-ignore
328
+ "Approval(address,address,uint256)"
329
+ ](null, null, null);
331
330
  }
332
331
  return super.onEvent(handler, filter!);
333
332
  }
@@ -338,11 +337,10 @@ export class ERC20BytesProcessorTemplate extends BaseProcessorTemplate<
338
337
  ) {
339
338
  if (!filter) {
340
339
  // @ts-ignore
341
- filter = ERC20BytesProcessor.filters["Transfer(address,address,uint256)"](
342
- null,
343
- null,
344
- null
345
- );
340
+ filter = ERC20BytesProcessor.filters[
341
+ // @ts-ignore
342
+ "Transfer(address,address,uint256)"
343
+ ](null, null, null);
346
344
  }
347
345
  return super.onEvent(handler, filter!);
348
346
  }
@@ -410,11 +408,10 @@ export class ERC20BytesProcessor extends BaseProcessor<
410
408
  ) {
411
409
  if (!filter) {
412
410
  // @ts-ignore
413
- filter = ERC20BytesProcessor.filters["Approval(address,address,uint256)"](
414
- null,
415
- null,
416
- null
417
- );
411
+ filter = ERC20BytesProcessor.filters[
412
+ // @ts-ignore
413
+ "Approval(address,address,uint256)"
414
+ ](null, null, null);
418
415
  }
419
416
  return super.onEvent(handler, filter!);
420
417
  }
@@ -425,11 +422,10 @@ export class ERC20BytesProcessor extends BaseProcessor<
425
422
  ) {
426
423
  if (!filter) {
427
424
  // @ts-ignore
428
- filter = ERC20BytesProcessor.filters["Transfer(address,address,uint256)"](
429
- null,
430
- null,
431
- null
432
- );
425
+ filter = ERC20BytesProcessor.filters[
426
+ // @ts-ignore
427
+ "Transfer(address,address,uint256)"
428
+ ](null, null, null);
433
429
  }
434
430
  return super.onEvent(handler, filter!);
435
431
  }
@@ -329,11 +329,10 @@ export class WETH9ProcessorTemplate extends BaseProcessorTemplate<
329
329
  ) {
330
330
  if (!filter) {
331
331
  // @ts-ignore
332
- filter = WETH9Processor.filters["Approval(address,address,uint256)"](
333
- null,
334
- null,
335
- null
336
- );
332
+ filter = WETH9Processor.filters[
333
+ // @ts-ignore
334
+ "Approval(address,address,uint256)"
335
+ ](null, null, null);
337
336
  }
338
337
  return super.onEvent(handler, filter!);
339
338
  }
@@ -344,11 +343,10 @@ export class WETH9ProcessorTemplate extends BaseProcessorTemplate<
344
343
  ) {
345
344
  if (!filter) {
346
345
  // @ts-ignore
347
- filter = WETH9Processor.filters["Transfer(address,address,uint256)"](
348
- null,
349
- null,
350
- null
351
- );
346
+ filter = WETH9Processor.filters[
347
+ // @ts-ignore
348
+ "Transfer(address,address,uint256)"
349
+ ](null, null, null);
352
350
  }
353
351
  return super.onEvent(handler, filter!);
354
352
  }
@@ -359,7 +357,10 @@ export class WETH9ProcessorTemplate extends BaseProcessorTemplate<
359
357
  ) {
360
358
  if (!filter) {
361
359
  // @ts-ignore
362
- filter = WETH9Processor.filters["Deposit(address,uint256)"](null, null);
360
+ filter = WETH9Processor.filters[
361
+ // @ts-ignore
362
+ "Deposit(address,uint256)"
363
+ ](null, null);
363
364
  }
364
365
  return super.onEvent(handler, filter!);
365
366
  }
@@ -370,10 +371,10 @@ export class WETH9ProcessorTemplate extends BaseProcessorTemplate<
370
371
  ) {
371
372
  if (!filter) {
372
373
  // @ts-ignore
373
- filter = WETH9Processor.filters["Withdrawal(address,uint256)"](
374
- null,
375
- null
376
- );
374
+ filter = WETH9Processor.filters[
375
+ // @ts-ignore
376
+ "Withdrawal(address,uint256)"
377
+ ](null, null);
377
378
  }
378
379
  return super.onEvent(handler, filter!);
379
380
  }
@@ -447,11 +448,10 @@ export class WETH9Processor extends BaseProcessor<
447
448
  ) {
448
449
  if (!filter) {
449
450
  // @ts-ignore
450
- filter = WETH9Processor.filters["Approval(address,address,uint256)"](
451
- null,
452
- null,
453
- null
454
- );
451
+ filter = WETH9Processor.filters[
452
+ // @ts-ignore
453
+ "Approval(address,address,uint256)"
454
+ ](null, null, null);
455
455
  }
456
456
  return super.onEvent(handler, filter!);
457
457
  }
@@ -462,11 +462,10 @@ export class WETH9Processor extends BaseProcessor<
462
462
  ) {
463
463
  if (!filter) {
464
464
  // @ts-ignore
465
- filter = WETH9Processor.filters["Transfer(address,address,uint256)"](
466
- null,
467
- null,
468
- null
469
- );
465
+ filter = WETH9Processor.filters[
466
+ // @ts-ignore
467
+ "Transfer(address,address,uint256)"
468
+ ](null, null, null);
470
469
  }
471
470
  return super.onEvent(handler, filter!);
472
471
  }
@@ -477,7 +476,10 @@ export class WETH9Processor extends BaseProcessor<
477
476
  ) {
478
477
  if (!filter) {
479
478
  // @ts-ignore
480
- filter = WETH9Processor.filters["Deposit(address,uint256)"](null, null);
479
+ filter = WETH9Processor.filters[
480
+ // @ts-ignore
481
+ "Deposit(address,uint256)"
482
+ ](null, null);
481
483
  }
482
484
  return super.onEvent(handler, filter!);
483
485
  }
@@ -488,10 +490,10 @@ export class WETH9Processor extends BaseProcessor<
488
490
  ) {
489
491
  if (!filter) {
490
492
  // @ts-ignore
491
- filter = WETH9Processor.filters["Withdrawal(address,uint256)"](
492
- null,
493
- null
494
- );
493
+ filter = WETH9Processor.filters[
494
+ // @ts-ignore
495
+ "Withdrawal(address,uint256)"
496
+ ](null, null);
495
497
  }
496
498
  return super.onEvent(handler, filter!);
497
499
  }