@gitmyabi/lwc 0.0.0-stage → 1.0.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.
@@ -0,0 +1,804 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * LWCToken_json ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const LWCToken_jsonAbi = [
10
+ {
11
+ "constant": true,
12
+ "inputs": [],
13
+ "name": "name",
14
+ "outputs": [
15
+ {
16
+ "name": "",
17
+ "type": "string"
18
+ }
19
+ ],
20
+ "payable": false,
21
+ "stateMutability": "view",
22
+ "type": "function"
23
+ },
24
+ {
25
+ "constant": false,
26
+ "inputs": [
27
+ {
28
+ "name": "spender",
29
+ "type": "address"
30
+ },
31
+ {
32
+ "name": "tokens",
33
+ "type": "uint256"
34
+ }
35
+ ],
36
+ "name": "approve",
37
+ "outputs": [
38
+ {
39
+ "name": "success",
40
+ "type": "bool"
41
+ }
42
+ ],
43
+ "payable": false,
44
+ "stateMutability": "nonpayable",
45
+ "type": "function"
46
+ },
47
+ {
48
+ "constant": true,
49
+ "inputs": [],
50
+ "name": "totalSupply",
51
+ "outputs": [
52
+ {
53
+ "name": "",
54
+ "type": "uint256"
55
+ }
56
+ ],
57
+ "payable": false,
58
+ "stateMutability": "view",
59
+ "type": "function"
60
+ },
61
+ {
62
+ "constant": false,
63
+ "inputs": [
64
+ {
65
+ "name": "from",
66
+ "type": "address"
67
+ },
68
+ {
69
+ "name": "to",
70
+ "type": "address"
71
+ },
72
+ {
73
+ "name": "tokens",
74
+ "type": "uint256"
75
+ }
76
+ ],
77
+ "name": "transferFrom",
78
+ "outputs": [
79
+ {
80
+ "name": "success",
81
+ "type": "bool"
82
+ }
83
+ ],
84
+ "payable": false,
85
+ "stateMutability": "nonpayable",
86
+ "type": "function"
87
+ },
88
+ {
89
+ "constant": true,
90
+ "inputs": [],
91
+ "name": "decimals",
92
+ "outputs": [
93
+ {
94
+ "name": "",
95
+ "type": "uint8"
96
+ }
97
+ ],
98
+ "payable": false,
99
+ "stateMutability": "view",
100
+ "type": "function"
101
+ },
102
+ {
103
+ "constant": true,
104
+ "inputs": [],
105
+ "name": "_totalSupply",
106
+ "outputs": [
107
+ {
108
+ "name": "",
109
+ "type": "uint256"
110
+ }
111
+ ],
112
+ "payable": false,
113
+ "stateMutability": "view",
114
+ "type": "function"
115
+ },
116
+ {
117
+ "constant": true,
118
+ "inputs": [
119
+ {
120
+ "name": "tokenOwner",
121
+ "type": "address"
122
+ }
123
+ ],
124
+ "name": "balanceOf",
125
+ "outputs": [
126
+ {
127
+ "name": "balance",
128
+ "type": "uint256"
129
+ }
130
+ ],
131
+ "payable": false,
132
+ "stateMutability": "view",
133
+ "type": "function"
134
+ },
135
+ {
136
+ "constant": true,
137
+ "inputs": [],
138
+ "name": "tokenPrice",
139
+ "outputs": [
140
+ {
141
+ "name": "",
142
+ "type": "uint256"
143
+ }
144
+ ],
145
+ "payable": false,
146
+ "stateMutability": "view",
147
+ "type": "function"
148
+ },
149
+ {
150
+ "constant": true,
151
+ "inputs": [],
152
+ "name": "symbol",
153
+ "outputs": [
154
+ {
155
+ "name": "",
156
+ "type": "string"
157
+ }
158
+ ],
159
+ "payable": false,
160
+ "stateMutability": "view",
161
+ "type": "function"
162
+ },
163
+ {
164
+ "constant": true,
165
+ "inputs": [
166
+ {
167
+ "name": "a",
168
+ "type": "uint256"
169
+ },
170
+ {
171
+ "name": "b",
172
+ "type": "uint256"
173
+ }
174
+ ],
175
+ "name": "safeSub",
176
+ "outputs": [
177
+ {
178
+ "name": "c",
179
+ "type": "uint256"
180
+ }
181
+ ],
182
+ "payable": false,
183
+ "stateMutability": "pure",
184
+ "type": "function"
185
+ },
186
+ {
187
+ "constant": false,
188
+ "inputs": [
189
+ {
190
+ "name": "to",
191
+ "type": "address"
192
+ },
193
+ {
194
+ "name": "tokens",
195
+ "type": "uint256"
196
+ }
197
+ ],
198
+ "name": "transfer",
199
+ "outputs": [
200
+ {
201
+ "name": "success",
202
+ "type": "bool"
203
+ }
204
+ ],
205
+ "payable": false,
206
+ "stateMutability": "nonpayable",
207
+ "type": "function"
208
+ },
209
+ {
210
+ "constant": true,
211
+ "inputs": [
212
+ {
213
+ "name": "a",
214
+ "type": "uint256"
215
+ },
216
+ {
217
+ "name": "b",
218
+ "type": "uint256"
219
+ }
220
+ ],
221
+ "name": "safeDiv",
222
+ "outputs": [
223
+ {
224
+ "name": "c",
225
+ "type": "uint256"
226
+ }
227
+ ],
228
+ "payable": false,
229
+ "stateMutability": "pure",
230
+ "type": "function"
231
+ },
232
+ {
233
+ "constant": false,
234
+ "inputs": [
235
+ {
236
+ "name": "spender",
237
+ "type": "address"
238
+ },
239
+ {
240
+ "name": "tokens",
241
+ "type": "uint256"
242
+ },
243
+ {
244
+ "name": "data",
245
+ "type": "bytes"
246
+ }
247
+ ],
248
+ "name": "approveAndCall",
249
+ "outputs": [
250
+ {
251
+ "name": "success",
252
+ "type": "bool"
253
+ }
254
+ ],
255
+ "payable": false,
256
+ "stateMutability": "nonpayable",
257
+ "type": "function"
258
+ },
259
+ {
260
+ "constant": true,
261
+ "inputs": [
262
+ {
263
+ "name": "a",
264
+ "type": "uint256"
265
+ },
266
+ {
267
+ "name": "b",
268
+ "type": "uint256"
269
+ }
270
+ ],
271
+ "name": "safeMul",
272
+ "outputs": [
273
+ {
274
+ "name": "c",
275
+ "type": "uint256"
276
+ }
277
+ ],
278
+ "payable": false,
279
+ "stateMutability": "pure",
280
+ "type": "function"
281
+ },
282
+ {
283
+ "constant": true,
284
+ "inputs": [
285
+ {
286
+ "name": "tokenOwner",
287
+ "type": "address"
288
+ },
289
+ {
290
+ "name": "spender",
291
+ "type": "address"
292
+ }
293
+ ],
294
+ "name": "allowance",
295
+ "outputs": [
296
+ {
297
+ "name": "remaining",
298
+ "type": "uint256"
299
+ }
300
+ ],
301
+ "payable": false,
302
+ "stateMutability": "view",
303
+ "type": "function"
304
+ },
305
+ {
306
+ "constant": true,
307
+ "inputs": [
308
+ {
309
+ "name": "a",
310
+ "type": "uint256"
311
+ },
312
+ {
313
+ "name": "b",
314
+ "type": "uint256"
315
+ }
316
+ ],
317
+ "name": "safeAdd",
318
+ "outputs": [
319
+ {
320
+ "name": "c",
321
+ "type": "uint256"
322
+ }
323
+ ],
324
+ "payable": false,
325
+ "stateMutability": "pure",
326
+ "type": "function"
327
+ },
328
+ {
329
+ "inputs": [],
330
+ "payable": false,
331
+ "stateMutability": "nonpayable",
332
+ "type": "constructor"
333
+ },
334
+ {
335
+ "payable": true,
336
+ "stateMutability": "payable",
337
+ "type": "fallback"
338
+ },
339
+ {
340
+ "anonymous": false,
341
+ "inputs": [
342
+ {
343
+ "indexed": true,
344
+ "name": "from",
345
+ "type": "address"
346
+ },
347
+ {
348
+ "indexed": true,
349
+ "name": "to",
350
+ "type": "address"
351
+ },
352
+ {
353
+ "indexed": false,
354
+ "name": "tokens",
355
+ "type": "uint256"
356
+ }
357
+ ],
358
+ "name": "Transfer",
359
+ "type": "event"
360
+ },
361
+ {
362
+ "anonymous": false,
363
+ "inputs": [
364
+ {
365
+ "indexed": true,
366
+ "name": "tokenOwner",
367
+ "type": "address"
368
+ },
369
+ {
370
+ "indexed": true,
371
+ "name": "spender",
372
+ "type": "address"
373
+ },
374
+ {
375
+ "indexed": false,
376
+ "name": "tokens",
377
+ "type": "uint256"
378
+ }
379
+ ],
380
+ "name": "Approval",
381
+ "type": "event"
382
+ }
383
+ ] as const satisfies Abi;
384
+
385
+ /**
386
+ * Type-safe ABI for LWCToken_json
387
+ */
388
+ export type LWCToken_jsonAbi = typeof LWCToken_jsonAbi;
389
+
390
+ /**
391
+ * Contract instance type for LWCToken_json
392
+ */
393
+ // Use any for contract type to avoid complex viem type issues
394
+ // The runtime behavior is type-safe through viem's ABI typing
395
+ export type LWCToken_jsonContract = any;
396
+
397
+ /**
398
+ * LWCToken_json Contract Class
399
+ *
400
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
401
+ *
402
+ * @example
403
+ * ```typescript
404
+ * import { createPublicClient, createWalletClient, http } from 'viem';
405
+ * import { mainnet } from 'viem/chains';
406
+ * import { LWCToken_json } from 'LWCToken_json';
407
+ *
408
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
409
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
410
+ *
411
+ * const contract = new LWCToken_json('0x...', { publicClient, walletClient });
412
+ *
413
+ * // Read functions
414
+ * const result = await contract.balanceOf('0x...');
415
+ *
416
+ * // Write functions
417
+ * const hash = await contract.transfer('0x...', 1000n);
418
+ *
419
+ * // Simulate transactions (dry-run)
420
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
421
+ * console.log('Gas estimate:', simulation.request.gas);
422
+ *
423
+ * // Watch events
424
+ * const unwatch = contract.watch.Transfer((event) => {
425
+ * console.log('Transfer event:', event);
426
+ * });
427
+ * ```
428
+ */
429
+ export class LWCToken_json {
430
+ private contract: LWCToken_jsonContract;
431
+ private contractAddress: Address;
432
+ private publicClient: PublicClient;
433
+
434
+ constructor(
435
+ address: Address,
436
+ clients: {
437
+ publicClient: PublicClient;
438
+ walletClient?: WalletClient;
439
+ }
440
+ ) {
441
+ this.contractAddress = address;
442
+ this.publicClient = clients.publicClient;
443
+ this.contract = getContract({
444
+ address,
445
+ abi: LWCToken_jsonAbi,
446
+ client: {
447
+ public: clients.publicClient,
448
+ wallet: clients.walletClient,
449
+ },
450
+ });
451
+ }
452
+
453
+ /**
454
+ * Get the contract address
455
+ */
456
+ get address(): Address {
457
+ return this.contractAddress;
458
+ }
459
+
460
+ /**
461
+ * Get the underlying viem contract instance
462
+ */
463
+ getContract(): LWCToken_jsonContract {
464
+ return this.contract;
465
+ }
466
+
467
+ /**
468
+ * name
469
+ * view
470
+ */
471
+ async name(): Promise<string> {
472
+ return this.contract.read.name() as Promise<string>;
473
+ }
474
+
475
+ /**
476
+ * totalSupply
477
+ * view
478
+ */
479
+ async totalSupply(): Promise<bigint> {
480
+ return this.contract.read.totalSupply() as Promise<bigint>;
481
+ }
482
+
483
+ /**
484
+ * decimals
485
+ * view
486
+ */
487
+ async decimals(): Promise<bigint> {
488
+ return this.contract.read.decimals() as Promise<bigint>;
489
+ }
490
+
491
+ /**
492
+ * _totalSupply
493
+ * view
494
+ */
495
+ async _totalSupply(): Promise<bigint> {
496
+ return this.contract.read._totalSupply() as Promise<bigint>;
497
+ }
498
+
499
+ /**
500
+ * balanceOf
501
+ * view
502
+ */
503
+ async balanceOf(tokenOwner: `0x${string}`): Promise<bigint> {
504
+ return this.contract.read.balanceOf([tokenOwner] as const) as Promise<bigint>;
505
+ }
506
+
507
+ /**
508
+ * tokenPrice
509
+ * view
510
+ */
511
+ async tokenPrice(): Promise<bigint> {
512
+ return this.contract.read.tokenPrice() as Promise<bigint>;
513
+ }
514
+
515
+ /**
516
+ * symbol
517
+ * view
518
+ */
519
+ async symbol(): Promise<string> {
520
+ return this.contract.read.symbol() as Promise<string>;
521
+ }
522
+
523
+ /**
524
+ * safeSub
525
+ * pure
526
+ */
527
+ async safeSub(a: bigint, b: bigint): Promise<bigint> {
528
+ return this.contract.read.safeSub([a, b] as const) as Promise<bigint>;
529
+ }
530
+
531
+ /**
532
+ * safeDiv
533
+ * pure
534
+ */
535
+ async safeDiv(a: bigint, b: bigint): Promise<bigint> {
536
+ return this.contract.read.safeDiv([a, b] as const) as Promise<bigint>;
537
+ }
538
+
539
+ /**
540
+ * safeMul
541
+ * pure
542
+ */
543
+ async safeMul(a: bigint, b: bigint): Promise<bigint> {
544
+ return this.contract.read.safeMul([a, b] as const) as Promise<bigint>;
545
+ }
546
+
547
+ /**
548
+ * allowance
549
+ * view
550
+ */
551
+ async allowance(tokenOwner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
552
+ return this.contract.read.allowance([tokenOwner, spender] as const) as Promise<bigint>;
553
+ }
554
+
555
+ /**
556
+ * safeAdd
557
+ * pure
558
+ */
559
+ async safeAdd(a: bigint, b: bigint): Promise<bigint> {
560
+ return this.contract.read.safeAdd([a, b] as const) as Promise<bigint>;
561
+ }
562
+
563
+ /**
564
+ * approve
565
+ * nonpayable
566
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
567
+ */
568
+ async approve(spender: `0x${string}`, tokens: bigint, options?: {
569
+ accessList?: import('viem').AccessList;
570
+ authorizationList?: import('viem').AuthorizationList;
571
+ chain?: import('viem').Chain | null;
572
+ dataSuffix?: `0x${string}`;
573
+ gas?: bigint;
574
+ gasPrice?: bigint;
575
+ maxFeePerGas?: bigint;
576
+ maxPriorityFeePerGas?: bigint;
577
+ nonce?: number;
578
+ value?: bigint;
579
+ }): Promise<`0x${string}`> {
580
+ if (!this.contract.write) {
581
+ throw new Error('Wallet client is required for write operations');
582
+ }
583
+ return this.contract.write.approve([spender, tokens] as const, options) as Promise<`0x${string}`>;
584
+ }
585
+
586
+ /**
587
+ * transferFrom
588
+ * nonpayable
589
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
590
+ */
591
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, tokens: bigint, options?: {
592
+ accessList?: import('viem').AccessList;
593
+ authorizationList?: import('viem').AuthorizationList;
594
+ chain?: import('viem').Chain | null;
595
+ dataSuffix?: `0x${string}`;
596
+ gas?: bigint;
597
+ gasPrice?: bigint;
598
+ maxFeePerGas?: bigint;
599
+ maxPriorityFeePerGas?: bigint;
600
+ nonce?: number;
601
+ value?: bigint;
602
+ }): Promise<`0x${string}`> {
603
+ if (!this.contract.write) {
604
+ throw new Error('Wallet client is required for write operations');
605
+ }
606
+ return this.contract.write.transferFrom([from, to, tokens] as const, options) as Promise<`0x${string}`>;
607
+ }
608
+
609
+ /**
610
+ * transfer
611
+ * nonpayable
612
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
613
+ */
614
+ async transfer(to: `0x${string}`, tokens: bigint, options?: {
615
+ accessList?: import('viem').AccessList;
616
+ authorizationList?: import('viem').AuthorizationList;
617
+ chain?: import('viem').Chain | null;
618
+ dataSuffix?: `0x${string}`;
619
+ gas?: bigint;
620
+ gasPrice?: bigint;
621
+ maxFeePerGas?: bigint;
622
+ maxPriorityFeePerGas?: bigint;
623
+ nonce?: number;
624
+ value?: bigint;
625
+ }): Promise<`0x${string}`> {
626
+ if (!this.contract.write) {
627
+ throw new Error('Wallet client is required for write operations');
628
+ }
629
+ return this.contract.write.transfer([to, tokens] as const, options) as Promise<`0x${string}`>;
630
+ }
631
+
632
+ /**
633
+ * approveAndCall
634
+ * nonpayable
635
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
636
+ */
637
+ async approveAndCall(spender: `0x${string}`, tokens: bigint, data: `0x${string}`, options?: {
638
+ accessList?: import('viem').AccessList;
639
+ authorizationList?: import('viem').AuthorizationList;
640
+ chain?: import('viem').Chain | null;
641
+ dataSuffix?: `0x${string}`;
642
+ gas?: bigint;
643
+ gasPrice?: bigint;
644
+ maxFeePerGas?: bigint;
645
+ maxPriorityFeePerGas?: bigint;
646
+ nonce?: number;
647
+ value?: bigint;
648
+ }): Promise<`0x${string}`> {
649
+ if (!this.contract.write) {
650
+ throw new Error('Wallet client is required for write operations');
651
+ }
652
+ return this.contract.write.approveAndCall([spender, tokens, data] as const, options) as Promise<`0x${string}`>;
653
+ }
654
+
655
+
656
+
657
+ /**
658
+ * Simulate contract write operations (dry-run without sending transaction)
659
+ *
660
+ * @example
661
+ * const result = await contract.simulate.transfer('0x...', 1000n);
662
+ * console.log('Gas estimate:', result.request.gas);
663
+ * console.log('Would succeed:', result.result);
664
+ */
665
+ get simulate() {
666
+ const contract = this.contract;
667
+ if (!contract.simulate) {
668
+ throw new Error('Public client is required for simulation');
669
+ }
670
+ return {
671
+ /**
672
+ * Simulate approve
673
+ * Returns gas estimate and result without sending transaction
674
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
675
+ */
676
+ async approve(spender: `0x${string}`, tokens: bigint, options?: {
677
+ accessList?: import('viem').AccessList;
678
+ authorizationList?: import('viem').AuthorizationList;
679
+ chain?: import('viem').Chain | null;
680
+ dataSuffix?: `0x${string}`;
681
+ gas?: bigint;
682
+ gasPrice?: bigint;
683
+ maxFeePerGas?: bigint;
684
+ maxPriorityFeePerGas?: bigint;
685
+ nonce?: number;
686
+ value?: bigint;
687
+ }): Promise<boolean> {
688
+ return contract.simulate.approve([spender, tokens] as const, options) as Promise<boolean>;
689
+ },
690
+ /**
691
+ * Simulate transferFrom
692
+ * Returns gas estimate and result without sending transaction
693
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
694
+ */
695
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, tokens: bigint, options?: {
696
+ accessList?: import('viem').AccessList;
697
+ authorizationList?: import('viem').AuthorizationList;
698
+ chain?: import('viem').Chain | null;
699
+ dataSuffix?: `0x${string}`;
700
+ gas?: bigint;
701
+ gasPrice?: bigint;
702
+ maxFeePerGas?: bigint;
703
+ maxPriorityFeePerGas?: bigint;
704
+ nonce?: number;
705
+ value?: bigint;
706
+ }): Promise<boolean> {
707
+ return contract.simulate.transferFrom([from, to, tokens] as const, options) as Promise<boolean>;
708
+ },
709
+ /**
710
+ * Simulate transfer
711
+ * Returns gas estimate and result without sending transaction
712
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
713
+ */
714
+ async transfer(to: `0x${string}`, tokens: bigint, options?: {
715
+ accessList?: import('viem').AccessList;
716
+ authorizationList?: import('viem').AuthorizationList;
717
+ chain?: import('viem').Chain | null;
718
+ dataSuffix?: `0x${string}`;
719
+ gas?: bigint;
720
+ gasPrice?: bigint;
721
+ maxFeePerGas?: bigint;
722
+ maxPriorityFeePerGas?: bigint;
723
+ nonce?: number;
724
+ value?: bigint;
725
+ }): Promise<boolean> {
726
+ return contract.simulate.transfer([to, tokens] as const, options) as Promise<boolean>;
727
+ },
728
+ /**
729
+ * Simulate approveAndCall
730
+ * Returns gas estimate and result without sending transaction
731
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
732
+ */
733
+ async approveAndCall(spender: `0x${string}`, tokens: bigint, data: `0x${string}`, options?: {
734
+ accessList?: import('viem').AccessList;
735
+ authorizationList?: import('viem').AuthorizationList;
736
+ chain?: import('viem').Chain | null;
737
+ dataSuffix?: `0x${string}`;
738
+ gas?: bigint;
739
+ gasPrice?: bigint;
740
+ maxFeePerGas?: bigint;
741
+ maxPriorityFeePerGas?: bigint;
742
+ nonce?: number;
743
+ value?: bigint;
744
+ }): Promise<boolean> {
745
+ return contract.simulate.approveAndCall([spender, tokens, data] as const, options) as Promise<boolean>;
746
+ }
747
+ };
748
+ }
749
+
750
+ /**
751
+ * Watch contract events
752
+ *
753
+ * @example
754
+ * // Watch all Transfer events
755
+ * const unwatch = contract.watch.Transfer((event) => {
756
+ * console.log('Transfer:', event);
757
+ * });
758
+ *
759
+ * // Stop watching
760
+ * unwatch();
761
+ */
762
+ get watch() {
763
+ return {
764
+ /**
765
+ * Watch Transfer events
766
+ * @param callback Function to call when event is emitted
767
+ * @param filter Optional filter for indexed parameters
768
+ * @returns Unwatch function to stop listening
769
+ */
770
+ Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; tokens: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
771
+ return this.publicClient.watchContractEvent({
772
+ address: this.contractAddress,
773
+ abi: LWCToken_jsonAbi,
774
+ eventName: 'Transfer',
775
+ args: filter,
776
+ onLogs: (logs: any[]) => {
777
+ logs.forEach((log: any) => {
778
+ callback(log.args as any);
779
+ });
780
+ },
781
+ }) as () => void;
782
+ },
783
+ /**
784
+ * Watch Approval events
785
+ * @param callback Function to call when event is emitted
786
+ * @param filter Optional filter for indexed parameters
787
+ * @returns Unwatch function to stop listening
788
+ */
789
+ Approval: (callback: (event: { tokenOwner: `0x${string}`; spender: `0x${string}`; tokens: bigint }) => void, filter?: { tokenOwner: `0x${string}`; spender: `0x${string}` }) => {
790
+ return this.publicClient.watchContractEvent({
791
+ address: this.contractAddress,
792
+ abi: LWCToken_jsonAbi,
793
+ eventName: 'Approval',
794
+ args: filter,
795
+ onLogs: (logs: any[]) => {
796
+ logs.forEach((log: any) => {
797
+ callback(log.args as any);
798
+ });
799
+ },
800
+ }) as () => void;
801
+ }
802
+ };
803
+ }
804
+ }