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