@gitmyabi-stg/uqc 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,1702 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * UquidCoin ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const UquidCoinAbi = [
10
+ {
11
+ "inputs": [
12
+ {
13
+ "internalType": "uint256",
14
+ "name": "_initialSupply",
15
+ "type": "uint256"
16
+ },
17
+ {
18
+ "internalType": "string",
19
+ "name": "_name",
20
+ "type": "string"
21
+ },
22
+ {
23
+ "internalType": "string",
24
+ "name": "_symbol",
25
+ "type": "string"
26
+ },
27
+ {
28
+ "internalType": "uint256",
29
+ "name": "_decimals",
30
+ "type": "uint256"
31
+ }
32
+ ],
33
+ "stateMutability": "nonpayable",
34
+ "type": "constructor"
35
+ },
36
+ {
37
+ "anonymous": false,
38
+ "inputs": [
39
+ {
40
+ "indexed": false,
41
+ "internalType": "address",
42
+ "name": "_user",
43
+ "type": "address"
44
+ }
45
+ ],
46
+ "name": "AddedBlackList",
47
+ "type": "event"
48
+ },
49
+ {
50
+ "anonymous": false,
51
+ "inputs": [
52
+ {
53
+ "indexed": true,
54
+ "internalType": "address",
55
+ "name": "owner",
56
+ "type": "address"
57
+ },
58
+ {
59
+ "indexed": true,
60
+ "internalType": "address",
61
+ "name": "spender",
62
+ "type": "address"
63
+ },
64
+ {
65
+ "indexed": false,
66
+ "internalType": "uint256",
67
+ "name": "value",
68
+ "type": "uint256"
69
+ }
70
+ ],
71
+ "name": "Approval",
72
+ "type": "event"
73
+ },
74
+ {
75
+ "anonymous": false,
76
+ "inputs": [
77
+ {
78
+ "indexed": false,
79
+ "internalType": "address",
80
+ "name": "newAddress",
81
+ "type": "address"
82
+ }
83
+ ],
84
+ "name": "Deprecate",
85
+ "type": "event"
86
+ },
87
+ {
88
+ "anonymous": false,
89
+ "inputs": [
90
+ {
91
+ "indexed": false,
92
+ "internalType": "address",
93
+ "name": "_blackListedUser",
94
+ "type": "address"
95
+ },
96
+ {
97
+ "indexed": false,
98
+ "internalType": "uint256",
99
+ "name": "_balance",
100
+ "type": "uint256"
101
+ }
102
+ ],
103
+ "name": "DestroyedBlackFunds",
104
+ "type": "event"
105
+ },
106
+ {
107
+ "anonymous": false,
108
+ "inputs": [
109
+ {
110
+ "indexed": false,
111
+ "internalType": "uint256",
112
+ "name": "amount",
113
+ "type": "uint256"
114
+ }
115
+ ],
116
+ "name": "Issue",
117
+ "type": "event"
118
+ },
119
+ {
120
+ "anonymous": false,
121
+ "inputs": [
122
+ {
123
+ "indexed": false,
124
+ "internalType": "uint256",
125
+ "name": "feeBasisPoints",
126
+ "type": "uint256"
127
+ },
128
+ {
129
+ "indexed": false,
130
+ "internalType": "uint256",
131
+ "name": "maxFee",
132
+ "type": "uint256"
133
+ }
134
+ ],
135
+ "name": "Params",
136
+ "type": "event"
137
+ },
138
+ {
139
+ "anonymous": false,
140
+ "inputs": [],
141
+ "name": "Pause",
142
+ "type": "event"
143
+ },
144
+ {
145
+ "anonymous": false,
146
+ "inputs": [
147
+ {
148
+ "indexed": false,
149
+ "internalType": "uint256",
150
+ "name": "amount",
151
+ "type": "uint256"
152
+ }
153
+ ],
154
+ "name": "Redeem",
155
+ "type": "event"
156
+ },
157
+ {
158
+ "anonymous": false,
159
+ "inputs": [
160
+ {
161
+ "indexed": false,
162
+ "internalType": "address",
163
+ "name": "_user",
164
+ "type": "address"
165
+ }
166
+ ],
167
+ "name": "RemovedBlackList",
168
+ "type": "event"
169
+ },
170
+ {
171
+ "anonymous": false,
172
+ "inputs": [
173
+ {
174
+ "indexed": true,
175
+ "internalType": "address",
176
+ "name": "from",
177
+ "type": "address"
178
+ },
179
+ {
180
+ "indexed": true,
181
+ "internalType": "address",
182
+ "name": "to",
183
+ "type": "address"
184
+ },
185
+ {
186
+ "indexed": false,
187
+ "internalType": "uint256",
188
+ "name": "value",
189
+ "type": "uint256"
190
+ }
191
+ ],
192
+ "name": "Transfer",
193
+ "type": "event"
194
+ },
195
+ {
196
+ "anonymous": false,
197
+ "inputs": [],
198
+ "name": "Unpause",
199
+ "type": "event"
200
+ },
201
+ {
202
+ "inputs": [],
203
+ "name": "MAX_UINT",
204
+ "outputs": [
205
+ {
206
+ "internalType": "uint256",
207
+ "name": "",
208
+ "type": "uint256"
209
+ }
210
+ ],
211
+ "stateMutability": "view",
212
+ "type": "function"
213
+ },
214
+ {
215
+ "inputs": [],
216
+ "name": "_totalSupply",
217
+ "outputs": [
218
+ {
219
+ "internalType": "uint256",
220
+ "name": "",
221
+ "type": "uint256"
222
+ }
223
+ ],
224
+ "stateMutability": "view",
225
+ "type": "function"
226
+ },
227
+ {
228
+ "inputs": [
229
+ {
230
+ "internalType": "address",
231
+ "name": "_evilUser",
232
+ "type": "address"
233
+ }
234
+ ],
235
+ "name": "addBlackList",
236
+ "outputs": [],
237
+ "stateMutability": "nonpayable",
238
+ "type": "function"
239
+ },
240
+ {
241
+ "inputs": [
242
+ {
243
+ "internalType": "address",
244
+ "name": "_owner",
245
+ "type": "address"
246
+ },
247
+ {
248
+ "internalType": "address",
249
+ "name": "_spender",
250
+ "type": "address"
251
+ }
252
+ ],
253
+ "name": "allowance",
254
+ "outputs": [
255
+ {
256
+ "internalType": "uint256",
257
+ "name": "remaining",
258
+ "type": "uint256"
259
+ }
260
+ ],
261
+ "stateMutability": "view",
262
+ "type": "function"
263
+ },
264
+ {
265
+ "inputs": [
266
+ {
267
+ "internalType": "address",
268
+ "name": "",
269
+ "type": "address"
270
+ },
271
+ {
272
+ "internalType": "address",
273
+ "name": "",
274
+ "type": "address"
275
+ }
276
+ ],
277
+ "name": "allowed",
278
+ "outputs": [
279
+ {
280
+ "internalType": "uint256",
281
+ "name": "",
282
+ "type": "uint256"
283
+ }
284
+ ],
285
+ "stateMutability": "view",
286
+ "type": "function"
287
+ },
288
+ {
289
+ "inputs": [
290
+ {
291
+ "internalType": "address",
292
+ "name": "_spender",
293
+ "type": "address"
294
+ },
295
+ {
296
+ "internalType": "uint256",
297
+ "name": "_value",
298
+ "type": "uint256"
299
+ }
300
+ ],
301
+ "name": "approve",
302
+ "outputs": [],
303
+ "stateMutability": "nonpayable",
304
+ "type": "function"
305
+ },
306
+ {
307
+ "inputs": [
308
+ {
309
+ "internalType": "address",
310
+ "name": "who",
311
+ "type": "address"
312
+ }
313
+ ],
314
+ "name": "balanceOf",
315
+ "outputs": [
316
+ {
317
+ "internalType": "uint256",
318
+ "name": "",
319
+ "type": "uint256"
320
+ }
321
+ ],
322
+ "stateMutability": "view",
323
+ "type": "function"
324
+ },
325
+ {
326
+ "inputs": [
327
+ {
328
+ "internalType": "address",
329
+ "name": "",
330
+ "type": "address"
331
+ }
332
+ ],
333
+ "name": "balances",
334
+ "outputs": [
335
+ {
336
+ "internalType": "uint256",
337
+ "name": "",
338
+ "type": "uint256"
339
+ }
340
+ ],
341
+ "stateMutability": "view",
342
+ "type": "function"
343
+ },
344
+ {
345
+ "inputs": [],
346
+ "name": "basisPointsRate",
347
+ "outputs": [
348
+ {
349
+ "internalType": "uint256",
350
+ "name": "",
351
+ "type": "uint256"
352
+ }
353
+ ],
354
+ "stateMutability": "view",
355
+ "type": "function"
356
+ },
357
+ {
358
+ "inputs": [],
359
+ "name": "decimals",
360
+ "outputs": [
361
+ {
362
+ "internalType": "uint256",
363
+ "name": "",
364
+ "type": "uint256"
365
+ }
366
+ ],
367
+ "stateMutability": "view",
368
+ "type": "function"
369
+ },
370
+ {
371
+ "inputs": [
372
+ {
373
+ "internalType": "address",
374
+ "name": "_upgradedAddress",
375
+ "type": "address"
376
+ }
377
+ ],
378
+ "name": "deprecate",
379
+ "outputs": [],
380
+ "stateMutability": "nonpayable",
381
+ "type": "function"
382
+ },
383
+ {
384
+ "inputs": [],
385
+ "name": "deprecated",
386
+ "outputs": [
387
+ {
388
+ "internalType": "bool",
389
+ "name": "",
390
+ "type": "bool"
391
+ }
392
+ ],
393
+ "stateMutability": "view",
394
+ "type": "function"
395
+ },
396
+ {
397
+ "inputs": [
398
+ {
399
+ "internalType": "address",
400
+ "name": "_blackListedUser",
401
+ "type": "address"
402
+ }
403
+ ],
404
+ "name": "destroyBlackFunds",
405
+ "outputs": [],
406
+ "stateMutability": "nonpayable",
407
+ "type": "function"
408
+ },
409
+ {
410
+ "inputs": [
411
+ {
412
+ "internalType": "address",
413
+ "name": "_maker",
414
+ "type": "address"
415
+ }
416
+ ],
417
+ "name": "getBlackListStatus",
418
+ "outputs": [
419
+ {
420
+ "internalType": "bool",
421
+ "name": "",
422
+ "type": "bool"
423
+ }
424
+ ],
425
+ "stateMutability": "view",
426
+ "type": "function"
427
+ },
428
+ {
429
+ "inputs": [],
430
+ "name": "getOwner",
431
+ "outputs": [
432
+ {
433
+ "internalType": "address",
434
+ "name": "",
435
+ "type": "address"
436
+ }
437
+ ],
438
+ "stateMutability": "view",
439
+ "type": "function"
440
+ },
441
+ {
442
+ "inputs": [
443
+ {
444
+ "internalType": "address",
445
+ "name": "",
446
+ "type": "address"
447
+ }
448
+ ],
449
+ "name": "isBlackListed",
450
+ "outputs": [
451
+ {
452
+ "internalType": "bool",
453
+ "name": "",
454
+ "type": "bool"
455
+ }
456
+ ],
457
+ "stateMutability": "view",
458
+ "type": "function"
459
+ },
460
+ {
461
+ "inputs": [
462
+ {
463
+ "internalType": "uint256",
464
+ "name": "amount",
465
+ "type": "uint256"
466
+ }
467
+ ],
468
+ "name": "issue",
469
+ "outputs": [],
470
+ "stateMutability": "nonpayable",
471
+ "type": "function"
472
+ },
473
+ {
474
+ "inputs": [],
475
+ "name": "maximumFee",
476
+ "outputs": [
477
+ {
478
+ "internalType": "uint256",
479
+ "name": "",
480
+ "type": "uint256"
481
+ }
482
+ ],
483
+ "stateMutability": "view",
484
+ "type": "function"
485
+ },
486
+ {
487
+ "inputs": [],
488
+ "name": "name",
489
+ "outputs": [
490
+ {
491
+ "internalType": "string",
492
+ "name": "",
493
+ "type": "string"
494
+ }
495
+ ],
496
+ "stateMutability": "view",
497
+ "type": "function"
498
+ },
499
+ {
500
+ "inputs": [],
501
+ "name": "owner",
502
+ "outputs": [
503
+ {
504
+ "internalType": "address",
505
+ "name": "",
506
+ "type": "address"
507
+ }
508
+ ],
509
+ "stateMutability": "view",
510
+ "type": "function"
511
+ },
512
+ {
513
+ "inputs": [],
514
+ "name": "pause",
515
+ "outputs": [],
516
+ "stateMutability": "nonpayable",
517
+ "type": "function"
518
+ },
519
+ {
520
+ "inputs": [],
521
+ "name": "paused",
522
+ "outputs": [
523
+ {
524
+ "internalType": "bool",
525
+ "name": "",
526
+ "type": "bool"
527
+ }
528
+ ],
529
+ "stateMutability": "view",
530
+ "type": "function"
531
+ },
532
+ {
533
+ "inputs": [
534
+ {
535
+ "internalType": "uint256",
536
+ "name": "amount",
537
+ "type": "uint256"
538
+ }
539
+ ],
540
+ "name": "redeem",
541
+ "outputs": [],
542
+ "stateMutability": "nonpayable",
543
+ "type": "function"
544
+ },
545
+ {
546
+ "inputs": [
547
+ {
548
+ "internalType": "address",
549
+ "name": "_clearedUser",
550
+ "type": "address"
551
+ }
552
+ ],
553
+ "name": "removeBlackList",
554
+ "outputs": [],
555
+ "stateMutability": "nonpayable",
556
+ "type": "function"
557
+ },
558
+ {
559
+ "inputs": [
560
+ {
561
+ "internalType": "uint256",
562
+ "name": "newBasisPoints",
563
+ "type": "uint256"
564
+ },
565
+ {
566
+ "internalType": "uint256",
567
+ "name": "newMaxFee",
568
+ "type": "uint256"
569
+ }
570
+ ],
571
+ "name": "setParams",
572
+ "outputs": [],
573
+ "stateMutability": "nonpayable",
574
+ "type": "function"
575
+ },
576
+ {
577
+ "inputs": [],
578
+ "name": "symbol",
579
+ "outputs": [
580
+ {
581
+ "internalType": "string",
582
+ "name": "",
583
+ "type": "string"
584
+ }
585
+ ],
586
+ "stateMutability": "view",
587
+ "type": "function"
588
+ },
589
+ {
590
+ "inputs": [],
591
+ "name": "totalSupply",
592
+ "outputs": [
593
+ {
594
+ "internalType": "uint256",
595
+ "name": "",
596
+ "type": "uint256"
597
+ }
598
+ ],
599
+ "stateMutability": "view",
600
+ "type": "function"
601
+ },
602
+ {
603
+ "inputs": [
604
+ {
605
+ "internalType": "address",
606
+ "name": "_to",
607
+ "type": "address"
608
+ },
609
+ {
610
+ "internalType": "uint256",
611
+ "name": "_value",
612
+ "type": "uint256"
613
+ }
614
+ ],
615
+ "name": "transfer",
616
+ "outputs": [],
617
+ "stateMutability": "nonpayable",
618
+ "type": "function"
619
+ },
620
+ {
621
+ "inputs": [
622
+ {
623
+ "internalType": "address",
624
+ "name": "_from",
625
+ "type": "address"
626
+ },
627
+ {
628
+ "internalType": "address",
629
+ "name": "_to",
630
+ "type": "address"
631
+ },
632
+ {
633
+ "internalType": "uint256",
634
+ "name": "_value",
635
+ "type": "uint256"
636
+ }
637
+ ],
638
+ "name": "transferFrom",
639
+ "outputs": [],
640
+ "stateMutability": "nonpayable",
641
+ "type": "function"
642
+ },
643
+ {
644
+ "inputs": [
645
+ {
646
+ "internalType": "address",
647
+ "name": "newOwner",
648
+ "type": "address"
649
+ }
650
+ ],
651
+ "name": "transferOwnership",
652
+ "outputs": [],
653
+ "stateMutability": "nonpayable",
654
+ "type": "function"
655
+ },
656
+ {
657
+ "inputs": [],
658
+ "name": "unpause",
659
+ "outputs": [],
660
+ "stateMutability": "nonpayable",
661
+ "type": "function"
662
+ },
663
+ {
664
+ "inputs": [],
665
+ "name": "upgradedAddress",
666
+ "outputs": [
667
+ {
668
+ "internalType": "address",
669
+ "name": "",
670
+ "type": "address"
671
+ }
672
+ ],
673
+ "stateMutability": "view",
674
+ "type": "function"
675
+ }
676
+ ] as const satisfies Abi;
677
+
678
+ /**
679
+ * Type-safe ABI for UquidCoin
680
+ */
681
+ export type UquidCoinAbi = typeof UquidCoinAbi;
682
+
683
+ /**
684
+ * Contract instance type for UquidCoin
685
+ */
686
+ // Use any for contract type to avoid complex viem type issues
687
+ // The runtime behavior is type-safe through viem's ABI typing
688
+ export type UquidCoinContract = any;
689
+
690
+ /**
691
+ * UquidCoin Contract Class
692
+ *
693
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
694
+ *
695
+ * @example
696
+ * ```typescript
697
+ * import { createPublicClient, createWalletClient, http } from 'viem';
698
+ * import { mainnet } from 'viem/chains';
699
+ * import { UquidCoin } from 'UquidCoin';
700
+ *
701
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
702
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
703
+ *
704
+ * const contract = new UquidCoin('0x...', { publicClient, walletClient });
705
+ *
706
+ * // Read functions
707
+ * const result = await contract.balanceOf('0x...');
708
+ *
709
+ * // Write functions
710
+ * const hash = await contract.transfer('0x...', 1000n);
711
+ *
712
+ * // Simulate transactions (dry-run)
713
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
714
+ * console.log('Gas estimate:', simulation.request.gas);
715
+ *
716
+ * // Watch events
717
+ * const unwatch = contract.watch.Transfer((event) => {
718
+ * console.log('Transfer event:', event);
719
+ * });
720
+ * ```
721
+ */
722
+ export class UquidCoin {
723
+ private contract: UquidCoinContract;
724
+ private contractAddress: Address;
725
+ private publicClient: PublicClient;
726
+
727
+ constructor(
728
+ address: Address,
729
+ clients: {
730
+ publicClient: PublicClient;
731
+ walletClient?: WalletClient;
732
+ }
733
+ ) {
734
+ this.contractAddress = address;
735
+ this.publicClient = clients.publicClient;
736
+ this.contract = getContract({
737
+ address,
738
+ abi: UquidCoinAbi,
739
+ client: {
740
+ public: clients.publicClient,
741
+ wallet: clients.walletClient,
742
+ },
743
+ });
744
+ }
745
+
746
+ /**
747
+ * Get the contract address
748
+ */
749
+ get address(): Address {
750
+ return this.contractAddress;
751
+ }
752
+
753
+ /**
754
+ * Get the underlying viem contract instance.
755
+ */
756
+ getContract(): UquidCoinContract {
757
+ return this.contract;
758
+ }
759
+
760
+ /**
761
+ * MAX_UINT
762
+ * view
763
+ */
764
+ async MAX_UINT(): Promise<bigint> {
765
+ return this.contract.read.MAX_UINT() as Promise<bigint>;
766
+ }
767
+
768
+ /**
769
+ * _totalSupply
770
+ * view
771
+ */
772
+ async _totalSupply(): Promise<bigint> {
773
+ return this.contract.read._totalSupply() as Promise<bigint>;
774
+ }
775
+
776
+ /**
777
+ * allowance
778
+ * view
779
+ */
780
+ async allowance(_owner: `0x${string}`, _spender: `0x${string}`): Promise<bigint> {
781
+ return this.contract.read.allowance([_owner, _spender] as const) as Promise<bigint>;
782
+ }
783
+
784
+ /**
785
+ * allowed
786
+ * view
787
+ */
788
+ async allowed(arg0: `0x${string}`, arg1: `0x${string}`): Promise<bigint> {
789
+ return this.contract.read.allowed([arg0, arg1] as const) as Promise<bigint>;
790
+ }
791
+
792
+ /**
793
+ * balanceOf
794
+ * view
795
+ */
796
+ async balanceOf(who: `0x${string}`): Promise<bigint> {
797
+ return this.contract.read.balanceOf([who] as const) as Promise<bigint>;
798
+ }
799
+
800
+ /**
801
+ * balances
802
+ * view
803
+ */
804
+ async balances(arg0: `0x${string}`): Promise<bigint> {
805
+ return this.contract.read.balances([arg0] as const) as Promise<bigint>;
806
+ }
807
+
808
+ /**
809
+ * basisPointsRate
810
+ * view
811
+ */
812
+ async basisPointsRate(): Promise<bigint> {
813
+ return this.contract.read.basisPointsRate() as Promise<bigint>;
814
+ }
815
+
816
+ /**
817
+ * decimals
818
+ * view
819
+ */
820
+ async decimals(): Promise<bigint> {
821
+ return this.contract.read.decimals() as Promise<bigint>;
822
+ }
823
+
824
+ /**
825
+ * deprecated
826
+ * view
827
+ */
828
+ async deprecated(): Promise<boolean> {
829
+ return this.contract.read.deprecated() as Promise<boolean>;
830
+ }
831
+
832
+ /**
833
+ * getBlackListStatus
834
+ * view
835
+ */
836
+ async getBlackListStatus(_maker: `0x${string}`): Promise<boolean> {
837
+ return this.contract.read.getBlackListStatus([_maker] as const) as Promise<boolean>;
838
+ }
839
+
840
+ /**
841
+ * getOwner
842
+ * view
843
+ */
844
+ async getOwner(): Promise<`0x${string}`> {
845
+ return this.contract.read.getOwner() as Promise<`0x${string}`>;
846
+ }
847
+
848
+ /**
849
+ * isBlackListed
850
+ * view
851
+ */
852
+ async isBlackListed(arg0: `0x${string}`): Promise<boolean> {
853
+ return this.contract.read.isBlackListed([arg0] as const) as Promise<boolean>;
854
+ }
855
+
856
+ /**
857
+ * maximumFee
858
+ * view
859
+ */
860
+ async maximumFee(): Promise<bigint> {
861
+ return this.contract.read.maximumFee() as Promise<bigint>;
862
+ }
863
+
864
+ /**
865
+ * name
866
+ * view
867
+ */
868
+ async name(): Promise<string> {
869
+ return this.contract.read.name() as Promise<string>;
870
+ }
871
+
872
+ /**
873
+ * owner
874
+ * view
875
+ */
876
+ async owner(): Promise<`0x${string}`> {
877
+ return this.contract.read.owner() as Promise<`0x${string}`>;
878
+ }
879
+
880
+ /**
881
+ * paused
882
+ * view
883
+ */
884
+ async paused(): Promise<boolean> {
885
+ return this.contract.read.paused() as Promise<boolean>;
886
+ }
887
+
888
+ /**
889
+ * symbol
890
+ * view
891
+ */
892
+ async symbol(): Promise<string> {
893
+ return this.contract.read.symbol() as Promise<string>;
894
+ }
895
+
896
+ /**
897
+ * totalSupply
898
+ * view
899
+ */
900
+ async totalSupply(): Promise<bigint> {
901
+ return this.contract.read.totalSupply() as Promise<bigint>;
902
+ }
903
+
904
+ /**
905
+ * upgradedAddress
906
+ * view
907
+ */
908
+ async upgradedAddress(): Promise<`0x${string}`> {
909
+ return this.contract.read.upgradedAddress() as Promise<`0x${string}`>;
910
+ }
911
+
912
+ /**
913
+ * addBlackList
914
+ * nonpayable
915
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
916
+ */
917
+ async addBlackList(_evilUser: `0x${string}`, options?: {
918
+ accessList?: import('viem').AccessList;
919
+ authorizationList?: import('viem').AuthorizationList;
920
+ chain?: import('viem').Chain | null;
921
+ dataSuffix?: `0x${string}`;
922
+ gas?: bigint;
923
+ gasPrice?: bigint;
924
+ maxFeePerGas?: bigint;
925
+ maxPriorityFeePerGas?: bigint;
926
+ nonce?: number;
927
+ value?: bigint;
928
+ }): Promise<`0x${string}`> {
929
+ if (!this.contract.write) {
930
+ throw new Error('Wallet client is required for write operations');
931
+ }
932
+ return this.contract.write.addBlackList([_evilUser] as const, options) as Promise<`0x${string}`>;
933
+ }
934
+
935
+ /**
936
+ * approve
937
+ * nonpayable
938
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
939
+ */
940
+ async approve(_spender: `0x${string}`, _value: bigint, options?: {
941
+ accessList?: import('viem').AccessList;
942
+ authorizationList?: import('viem').AuthorizationList;
943
+ chain?: import('viem').Chain | null;
944
+ dataSuffix?: `0x${string}`;
945
+ gas?: bigint;
946
+ gasPrice?: bigint;
947
+ maxFeePerGas?: bigint;
948
+ maxPriorityFeePerGas?: bigint;
949
+ nonce?: number;
950
+ value?: bigint;
951
+ }): Promise<`0x${string}`> {
952
+ if (!this.contract.write) {
953
+ throw new Error('Wallet client is required for write operations');
954
+ }
955
+ return this.contract.write.approve([_spender, _value] as const, options) as Promise<`0x${string}`>;
956
+ }
957
+
958
+ /**
959
+ * deprecate
960
+ * nonpayable
961
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
962
+ */
963
+ async deprecate(_upgradedAddress: `0x${string}`, options?: {
964
+ accessList?: import('viem').AccessList;
965
+ authorizationList?: import('viem').AuthorizationList;
966
+ chain?: import('viem').Chain | null;
967
+ dataSuffix?: `0x${string}`;
968
+ gas?: bigint;
969
+ gasPrice?: bigint;
970
+ maxFeePerGas?: bigint;
971
+ maxPriorityFeePerGas?: bigint;
972
+ nonce?: number;
973
+ value?: bigint;
974
+ }): Promise<`0x${string}`> {
975
+ if (!this.contract.write) {
976
+ throw new Error('Wallet client is required for write operations');
977
+ }
978
+ return this.contract.write.deprecate([_upgradedAddress] as const, options) as Promise<`0x${string}`>;
979
+ }
980
+
981
+ /**
982
+ * destroyBlackFunds
983
+ * nonpayable
984
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
985
+ */
986
+ async destroyBlackFunds(_blackListedUser: `0x${string}`, options?: {
987
+ accessList?: import('viem').AccessList;
988
+ authorizationList?: import('viem').AuthorizationList;
989
+ chain?: import('viem').Chain | null;
990
+ dataSuffix?: `0x${string}`;
991
+ gas?: bigint;
992
+ gasPrice?: bigint;
993
+ maxFeePerGas?: bigint;
994
+ maxPriorityFeePerGas?: bigint;
995
+ nonce?: number;
996
+ value?: bigint;
997
+ }): Promise<`0x${string}`> {
998
+ if (!this.contract.write) {
999
+ throw new Error('Wallet client is required for write operations');
1000
+ }
1001
+ return this.contract.write.destroyBlackFunds([_blackListedUser] as const, options) as Promise<`0x${string}`>;
1002
+ }
1003
+
1004
+ /**
1005
+ * issue
1006
+ * nonpayable
1007
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1008
+ */
1009
+ async issue(amount: bigint, options?: {
1010
+ accessList?: import('viem').AccessList;
1011
+ authorizationList?: import('viem').AuthorizationList;
1012
+ chain?: import('viem').Chain | null;
1013
+ dataSuffix?: `0x${string}`;
1014
+ gas?: bigint;
1015
+ gasPrice?: bigint;
1016
+ maxFeePerGas?: bigint;
1017
+ maxPriorityFeePerGas?: bigint;
1018
+ nonce?: number;
1019
+ value?: bigint;
1020
+ }): Promise<`0x${string}`> {
1021
+ if (!this.contract.write) {
1022
+ throw new Error('Wallet client is required for write operations');
1023
+ }
1024
+ return this.contract.write.issue([amount] as const, options) as Promise<`0x${string}`>;
1025
+ }
1026
+
1027
+ /**
1028
+ * pause
1029
+ * nonpayable
1030
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1031
+ */
1032
+ async pause(options?: {
1033
+ accessList?: import('viem').AccessList;
1034
+ authorizationList?: import('viem').AuthorizationList;
1035
+ chain?: import('viem').Chain | null;
1036
+ dataSuffix?: `0x${string}`;
1037
+ gas?: bigint;
1038
+ gasPrice?: bigint;
1039
+ maxFeePerGas?: bigint;
1040
+ maxPriorityFeePerGas?: bigint;
1041
+ nonce?: number;
1042
+ value?: bigint;
1043
+ }): Promise<`0x${string}`> {
1044
+ if (!this.contract.write) {
1045
+ throw new Error('Wallet client is required for write operations');
1046
+ }
1047
+ return this.contract.write.pause(options) as Promise<`0x${string}`>;
1048
+ }
1049
+
1050
+ /**
1051
+ * redeem
1052
+ * nonpayable
1053
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1054
+ */
1055
+ async redeem(amount: bigint, options?: {
1056
+ accessList?: import('viem').AccessList;
1057
+ authorizationList?: import('viem').AuthorizationList;
1058
+ chain?: import('viem').Chain | null;
1059
+ dataSuffix?: `0x${string}`;
1060
+ gas?: bigint;
1061
+ gasPrice?: bigint;
1062
+ maxFeePerGas?: bigint;
1063
+ maxPriorityFeePerGas?: bigint;
1064
+ nonce?: number;
1065
+ value?: bigint;
1066
+ }): Promise<`0x${string}`> {
1067
+ if (!this.contract.write) {
1068
+ throw new Error('Wallet client is required for write operations');
1069
+ }
1070
+ return this.contract.write.redeem([amount] as const, options) as Promise<`0x${string}`>;
1071
+ }
1072
+
1073
+ /**
1074
+ * removeBlackList
1075
+ * nonpayable
1076
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1077
+ */
1078
+ async removeBlackList(_clearedUser: `0x${string}`, options?: {
1079
+ accessList?: import('viem').AccessList;
1080
+ authorizationList?: import('viem').AuthorizationList;
1081
+ chain?: import('viem').Chain | null;
1082
+ dataSuffix?: `0x${string}`;
1083
+ gas?: bigint;
1084
+ gasPrice?: bigint;
1085
+ maxFeePerGas?: bigint;
1086
+ maxPriorityFeePerGas?: bigint;
1087
+ nonce?: number;
1088
+ value?: bigint;
1089
+ }): Promise<`0x${string}`> {
1090
+ if (!this.contract.write) {
1091
+ throw new Error('Wallet client is required for write operations');
1092
+ }
1093
+ return this.contract.write.removeBlackList([_clearedUser] as const, options) as Promise<`0x${string}`>;
1094
+ }
1095
+
1096
+ /**
1097
+ * setParams
1098
+ * nonpayable
1099
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1100
+ */
1101
+ async setParams(newBasisPoints: bigint, newMaxFee: bigint, options?: {
1102
+ accessList?: import('viem').AccessList;
1103
+ authorizationList?: import('viem').AuthorizationList;
1104
+ chain?: import('viem').Chain | null;
1105
+ dataSuffix?: `0x${string}`;
1106
+ gas?: bigint;
1107
+ gasPrice?: bigint;
1108
+ maxFeePerGas?: bigint;
1109
+ maxPriorityFeePerGas?: bigint;
1110
+ nonce?: number;
1111
+ value?: bigint;
1112
+ }): Promise<`0x${string}`> {
1113
+ if (!this.contract.write) {
1114
+ throw new Error('Wallet client is required for write operations');
1115
+ }
1116
+ return this.contract.write.setParams([newBasisPoints, newMaxFee] as const, options) as Promise<`0x${string}`>;
1117
+ }
1118
+
1119
+ /**
1120
+ * transfer
1121
+ * nonpayable
1122
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1123
+ */
1124
+ async transfer(_to: `0x${string}`, _value: bigint, options?: {
1125
+ accessList?: import('viem').AccessList;
1126
+ authorizationList?: import('viem').AuthorizationList;
1127
+ chain?: import('viem').Chain | null;
1128
+ dataSuffix?: `0x${string}`;
1129
+ gas?: bigint;
1130
+ gasPrice?: bigint;
1131
+ maxFeePerGas?: bigint;
1132
+ maxPriorityFeePerGas?: bigint;
1133
+ nonce?: number;
1134
+ value?: bigint;
1135
+ }): Promise<`0x${string}`> {
1136
+ if (!this.contract.write) {
1137
+ throw new Error('Wallet client is required for write operations');
1138
+ }
1139
+ return this.contract.write.transfer([_to, _value] as const, options) as Promise<`0x${string}`>;
1140
+ }
1141
+
1142
+ /**
1143
+ * transferFrom
1144
+ * nonpayable
1145
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1146
+ */
1147
+ async transferFrom(_from: `0x${string}`, _to: `0x${string}`, _value: bigint, options?: {
1148
+ accessList?: import('viem').AccessList;
1149
+ authorizationList?: import('viem').AuthorizationList;
1150
+ chain?: import('viem').Chain | null;
1151
+ dataSuffix?: `0x${string}`;
1152
+ gas?: bigint;
1153
+ gasPrice?: bigint;
1154
+ maxFeePerGas?: bigint;
1155
+ maxPriorityFeePerGas?: bigint;
1156
+ nonce?: number;
1157
+ value?: bigint;
1158
+ }): Promise<`0x${string}`> {
1159
+ if (!this.contract.write) {
1160
+ throw new Error('Wallet client is required for write operations');
1161
+ }
1162
+ return this.contract.write.transferFrom([_from, _to, _value] as const, options) as Promise<`0x${string}`>;
1163
+ }
1164
+
1165
+ /**
1166
+ * transferOwnership
1167
+ * nonpayable
1168
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1169
+ */
1170
+ async transferOwnership(newOwner: `0x${string}`, options?: {
1171
+ accessList?: import('viem').AccessList;
1172
+ authorizationList?: import('viem').AuthorizationList;
1173
+ chain?: import('viem').Chain | null;
1174
+ dataSuffix?: `0x${string}`;
1175
+ gas?: bigint;
1176
+ gasPrice?: bigint;
1177
+ maxFeePerGas?: bigint;
1178
+ maxPriorityFeePerGas?: bigint;
1179
+ nonce?: number;
1180
+ value?: bigint;
1181
+ }): Promise<`0x${string}`> {
1182
+ if (!this.contract.write) {
1183
+ throw new Error('Wallet client is required for write operations');
1184
+ }
1185
+ return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
1186
+ }
1187
+
1188
+ /**
1189
+ * unpause
1190
+ * nonpayable
1191
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1192
+ */
1193
+ async unpause(options?: {
1194
+ accessList?: import('viem').AccessList;
1195
+ authorizationList?: import('viem').AuthorizationList;
1196
+ chain?: import('viem').Chain | null;
1197
+ dataSuffix?: `0x${string}`;
1198
+ gas?: bigint;
1199
+ gasPrice?: bigint;
1200
+ maxFeePerGas?: bigint;
1201
+ maxPriorityFeePerGas?: bigint;
1202
+ nonce?: number;
1203
+ value?: bigint;
1204
+ }): Promise<`0x${string}`> {
1205
+ if (!this.contract.write) {
1206
+ throw new Error('Wallet client is required for write operations');
1207
+ }
1208
+ return this.contract.write.unpause(options) as Promise<`0x${string}`>;
1209
+ }
1210
+
1211
+
1212
+
1213
+ /**
1214
+ * Simulate contract write operations (dry-run without sending transaction)
1215
+ *
1216
+ * @example
1217
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1218
+ * console.log('Gas estimate:', result.request.gas);
1219
+ * console.log('Would succeed:', result.result);
1220
+ */
1221
+ get simulate() {
1222
+ const contract = this.contract;
1223
+ if (!contract.simulate) {
1224
+ throw new Error('Public client is required for simulation');
1225
+ }
1226
+ return {
1227
+ /**
1228
+ * Simulate addBlackList
1229
+ * Returns gas estimate and result without sending transaction
1230
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1231
+ */
1232
+ async addBlackList(_evilUser: `0x${string}`, options?: {
1233
+ accessList?: import('viem').AccessList;
1234
+ authorizationList?: import('viem').AuthorizationList;
1235
+ chain?: import('viem').Chain | null;
1236
+ dataSuffix?: `0x${string}`;
1237
+ gas?: bigint;
1238
+ gasPrice?: bigint;
1239
+ maxFeePerGas?: bigint;
1240
+ maxPriorityFeePerGas?: bigint;
1241
+ nonce?: number;
1242
+ value?: bigint;
1243
+ }): Promise<void> {
1244
+ return contract.simulate.addBlackList([_evilUser] as const, options) as Promise<void>;
1245
+ },
1246
+ /**
1247
+ * Simulate approve
1248
+ * Returns gas estimate and result without sending transaction
1249
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1250
+ */
1251
+ async approve(_spender: `0x${string}`, _value: bigint, options?: {
1252
+ accessList?: import('viem').AccessList;
1253
+ authorizationList?: import('viem').AuthorizationList;
1254
+ chain?: import('viem').Chain | null;
1255
+ dataSuffix?: `0x${string}`;
1256
+ gas?: bigint;
1257
+ gasPrice?: bigint;
1258
+ maxFeePerGas?: bigint;
1259
+ maxPriorityFeePerGas?: bigint;
1260
+ nonce?: number;
1261
+ value?: bigint;
1262
+ }): Promise<void> {
1263
+ return contract.simulate.approve([_spender, _value] as const, options) as Promise<void>;
1264
+ },
1265
+ /**
1266
+ * Simulate deprecate
1267
+ * Returns gas estimate and result without sending transaction
1268
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1269
+ */
1270
+ async deprecate(_upgradedAddress: `0x${string}`, options?: {
1271
+ accessList?: import('viem').AccessList;
1272
+ authorizationList?: import('viem').AuthorizationList;
1273
+ chain?: import('viem').Chain | null;
1274
+ dataSuffix?: `0x${string}`;
1275
+ gas?: bigint;
1276
+ gasPrice?: bigint;
1277
+ maxFeePerGas?: bigint;
1278
+ maxPriorityFeePerGas?: bigint;
1279
+ nonce?: number;
1280
+ value?: bigint;
1281
+ }): Promise<void> {
1282
+ return contract.simulate.deprecate([_upgradedAddress] as const, options) as Promise<void>;
1283
+ },
1284
+ /**
1285
+ * Simulate destroyBlackFunds
1286
+ * Returns gas estimate and result without sending transaction
1287
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1288
+ */
1289
+ async destroyBlackFunds(_blackListedUser: `0x${string}`, options?: {
1290
+ accessList?: import('viem').AccessList;
1291
+ authorizationList?: import('viem').AuthorizationList;
1292
+ chain?: import('viem').Chain | null;
1293
+ dataSuffix?: `0x${string}`;
1294
+ gas?: bigint;
1295
+ gasPrice?: bigint;
1296
+ maxFeePerGas?: bigint;
1297
+ maxPriorityFeePerGas?: bigint;
1298
+ nonce?: number;
1299
+ value?: bigint;
1300
+ }): Promise<void> {
1301
+ return contract.simulate.destroyBlackFunds([_blackListedUser] as const, options) as Promise<void>;
1302
+ },
1303
+ /**
1304
+ * Simulate issue
1305
+ * Returns gas estimate and result without sending transaction
1306
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1307
+ */
1308
+ async issue(amount: bigint, options?: {
1309
+ accessList?: import('viem').AccessList;
1310
+ authorizationList?: import('viem').AuthorizationList;
1311
+ chain?: import('viem').Chain | null;
1312
+ dataSuffix?: `0x${string}`;
1313
+ gas?: bigint;
1314
+ gasPrice?: bigint;
1315
+ maxFeePerGas?: bigint;
1316
+ maxPriorityFeePerGas?: bigint;
1317
+ nonce?: number;
1318
+ value?: bigint;
1319
+ }): Promise<void> {
1320
+ return contract.simulate.issue([amount] as const, options) as Promise<void>;
1321
+ },
1322
+ /**
1323
+ * Simulate pause
1324
+ * Returns gas estimate and result without sending transaction
1325
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1326
+ */
1327
+ async pause(options?: {
1328
+ accessList?: import('viem').AccessList;
1329
+ authorizationList?: import('viem').AuthorizationList;
1330
+ chain?: import('viem').Chain | null;
1331
+ dataSuffix?: `0x${string}`;
1332
+ gas?: bigint;
1333
+ gasPrice?: bigint;
1334
+ maxFeePerGas?: bigint;
1335
+ maxPriorityFeePerGas?: bigint;
1336
+ nonce?: number;
1337
+ value?: bigint;
1338
+ }): Promise<void> {
1339
+ return contract.simulate.pause(options) as Promise<void>;
1340
+ },
1341
+ /**
1342
+ * Simulate redeem
1343
+ * Returns gas estimate and result without sending transaction
1344
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1345
+ */
1346
+ async redeem(amount: bigint, options?: {
1347
+ accessList?: import('viem').AccessList;
1348
+ authorizationList?: import('viem').AuthorizationList;
1349
+ chain?: import('viem').Chain | null;
1350
+ dataSuffix?: `0x${string}`;
1351
+ gas?: bigint;
1352
+ gasPrice?: bigint;
1353
+ maxFeePerGas?: bigint;
1354
+ maxPriorityFeePerGas?: bigint;
1355
+ nonce?: number;
1356
+ value?: bigint;
1357
+ }): Promise<void> {
1358
+ return contract.simulate.redeem([amount] as const, options) as Promise<void>;
1359
+ },
1360
+ /**
1361
+ * Simulate removeBlackList
1362
+ * Returns gas estimate and result without sending transaction
1363
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1364
+ */
1365
+ async removeBlackList(_clearedUser: `0x${string}`, options?: {
1366
+ accessList?: import('viem').AccessList;
1367
+ authorizationList?: import('viem').AuthorizationList;
1368
+ chain?: import('viem').Chain | null;
1369
+ dataSuffix?: `0x${string}`;
1370
+ gas?: bigint;
1371
+ gasPrice?: bigint;
1372
+ maxFeePerGas?: bigint;
1373
+ maxPriorityFeePerGas?: bigint;
1374
+ nonce?: number;
1375
+ value?: bigint;
1376
+ }): Promise<void> {
1377
+ return contract.simulate.removeBlackList([_clearedUser] as const, options) as Promise<void>;
1378
+ },
1379
+ /**
1380
+ * Simulate setParams
1381
+ * Returns gas estimate and result without sending transaction
1382
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1383
+ */
1384
+ async setParams(newBasisPoints: bigint, newMaxFee: bigint, options?: {
1385
+ accessList?: import('viem').AccessList;
1386
+ authorizationList?: import('viem').AuthorizationList;
1387
+ chain?: import('viem').Chain | null;
1388
+ dataSuffix?: `0x${string}`;
1389
+ gas?: bigint;
1390
+ gasPrice?: bigint;
1391
+ maxFeePerGas?: bigint;
1392
+ maxPriorityFeePerGas?: bigint;
1393
+ nonce?: number;
1394
+ value?: bigint;
1395
+ }): Promise<void> {
1396
+ return contract.simulate.setParams([newBasisPoints, newMaxFee] as const, options) as Promise<void>;
1397
+ },
1398
+ /**
1399
+ * Simulate transfer
1400
+ * Returns gas estimate and result without sending transaction
1401
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1402
+ */
1403
+ async transfer(_to: `0x${string}`, _value: bigint, options?: {
1404
+ accessList?: import('viem').AccessList;
1405
+ authorizationList?: import('viem').AuthorizationList;
1406
+ chain?: import('viem').Chain | null;
1407
+ dataSuffix?: `0x${string}`;
1408
+ gas?: bigint;
1409
+ gasPrice?: bigint;
1410
+ maxFeePerGas?: bigint;
1411
+ maxPriorityFeePerGas?: bigint;
1412
+ nonce?: number;
1413
+ value?: bigint;
1414
+ }): Promise<void> {
1415
+ return contract.simulate.transfer([_to, _value] as const, options) as Promise<void>;
1416
+ },
1417
+ /**
1418
+ * Simulate transferFrom
1419
+ * Returns gas estimate and result without sending transaction
1420
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1421
+ */
1422
+ async transferFrom(_from: `0x${string}`, _to: `0x${string}`, _value: bigint, options?: {
1423
+ accessList?: import('viem').AccessList;
1424
+ authorizationList?: import('viem').AuthorizationList;
1425
+ chain?: import('viem').Chain | null;
1426
+ dataSuffix?: `0x${string}`;
1427
+ gas?: bigint;
1428
+ gasPrice?: bigint;
1429
+ maxFeePerGas?: bigint;
1430
+ maxPriorityFeePerGas?: bigint;
1431
+ nonce?: number;
1432
+ value?: bigint;
1433
+ }): Promise<void> {
1434
+ return contract.simulate.transferFrom([_from, _to, _value] as const, options) as Promise<void>;
1435
+ },
1436
+ /**
1437
+ * Simulate transferOwnership
1438
+ * Returns gas estimate and result without sending transaction
1439
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1440
+ */
1441
+ async transferOwnership(newOwner: `0x${string}`, options?: {
1442
+ accessList?: import('viem').AccessList;
1443
+ authorizationList?: import('viem').AuthorizationList;
1444
+ chain?: import('viem').Chain | null;
1445
+ dataSuffix?: `0x${string}`;
1446
+ gas?: bigint;
1447
+ gasPrice?: bigint;
1448
+ maxFeePerGas?: bigint;
1449
+ maxPriorityFeePerGas?: bigint;
1450
+ nonce?: number;
1451
+ value?: bigint;
1452
+ }): Promise<void> {
1453
+ return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
1454
+ },
1455
+ /**
1456
+ * Simulate unpause
1457
+ * Returns gas estimate and result without sending transaction
1458
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1459
+ */
1460
+ async unpause(options?: {
1461
+ accessList?: import('viem').AccessList;
1462
+ authorizationList?: import('viem').AuthorizationList;
1463
+ chain?: import('viem').Chain | null;
1464
+ dataSuffix?: `0x${string}`;
1465
+ gas?: bigint;
1466
+ gasPrice?: bigint;
1467
+ maxFeePerGas?: bigint;
1468
+ maxPriorityFeePerGas?: bigint;
1469
+ nonce?: number;
1470
+ value?: bigint;
1471
+ }): Promise<void> {
1472
+ return contract.simulate.unpause(options) as Promise<void>;
1473
+ }
1474
+ };
1475
+ }
1476
+
1477
+ /**
1478
+ * Watch contract events
1479
+ *
1480
+ * @example
1481
+ * // Watch all Transfer events
1482
+ * const unwatch = contract.watch.Transfer((event) => {
1483
+ * console.log('Transfer:', event);
1484
+ * });
1485
+ *
1486
+ * // Stop watching
1487
+ * unwatch();
1488
+ */
1489
+ get watch() {
1490
+ return {
1491
+ /**
1492
+ * Watch AddedBlackList events
1493
+ * @param callback Function to call when event is emitted
1494
+ * @param filter Optional filter for indexed parameters
1495
+ * @returns Unwatch function to stop listening
1496
+ */
1497
+ AddedBlackList: (callback: (event: { _user: `0x${string}` }) => void) => {
1498
+ return this.publicClient.watchContractEvent({
1499
+ address: this.contractAddress,
1500
+ abi: UquidCoinAbi,
1501
+ eventName: 'AddedBlackList',
1502
+
1503
+ onLogs: (logs: any[]) => {
1504
+ logs.forEach((log: any) => {
1505
+ callback(log.args as any);
1506
+ });
1507
+ },
1508
+ }) as () => void;
1509
+ },
1510
+ /**
1511
+ * Watch Approval events
1512
+ * @param callback Function to call when event is emitted
1513
+ * @param filter Optional filter for indexed parameters
1514
+ * @returns Unwatch function to stop listening
1515
+ */
1516
+ Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner?: `0x${string}` | `0x${string}`[] | null; spender?: `0x${string}` | `0x${string}`[] | null }) => {
1517
+ return this.publicClient.watchContractEvent({
1518
+ address: this.contractAddress,
1519
+ abi: UquidCoinAbi,
1520
+ eventName: 'Approval',
1521
+ args: filter as any,
1522
+ onLogs: (logs: any[]) => {
1523
+ logs.forEach((log: any) => {
1524
+ callback(log.args as any);
1525
+ });
1526
+ },
1527
+ }) as () => void;
1528
+ },
1529
+ /**
1530
+ * Watch Deprecate events
1531
+ * @param callback Function to call when event is emitted
1532
+ * @param filter Optional filter for indexed parameters
1533
+ * @returns Unwatch function to stop listening
1534
+ */
1535
+ Deprecate: (callback: (event: { newAddress: `0x${string}` }) => void) => {
1536
+ return this.publicClient.watchContractEvent({
1537
+ address: this.contractAddress,
1538
+ abi: UquidCoinAbi,
1539
+ eventName: 'Deprecate',
1540
+
1541
+ onLogs: (logs: any[]) => {
1542
+ logs.forEach((log: any) => {
1543
+ callback(log.args as any);
1544
+ });
1545
+ },
1546
+ }) as () => void;
1547
+ },
1548
+ /**
1549
+ * Watch DestroyedBlackFunds events
1550
+ * @param callback Function to call when event is emitted
1551
+ * @param filter Optional filter for indexed parameters
1552
+ * @returns Unwatch function to stop listening
1553
+ */
1554
+ DestroyedBlackFunds: (callback: (event: { _blackListedUser: `0x${string}`; _balance: bigint }) => void) => {
1555
+ return this.publicClient.watchContractEvent({
1556
+ address: this.contractAddress,
1557
+ abi: UquidCoinAbi,
1558
+ eventName: 'DestroyedBlackFunds',
1559
+
1560
+ onLogs: (logs: any[]) => {
1561
+ logs.forEach((log: any) => {
1562
+ callback(log.args as any);
1563
+ });
1564
+ },
1565
+ }) as () => void;
1566
+ },
1567
+ /**
1568
+ * Watch Issue events
1569
+ * @param callback Function to call when event is emitted
1570
+ * @param filter Optional filter for indexed parameters
1571
+ * @returns Unwatch function to stop listening
1572
+ */
1573
+ Issue: (callback: (event: { amount: bigint }) => void) => {
1574
+ return this.publicClient.watchContractEvent({
1575
+ address: this.contractAddress,
1576
+ abi: UquidCoinAbi,
1577
+ eventName: 'Issue',
1578
+
1579
+ onLogs: (logs: any[]) => {
1580
+ logs.forEach((log: any) => {
1581
+ callback(log.args as any);
1582
+ });
1583
+ },
1584
+ }) as () => void;
1585
+ },
1586
+ /**
1587
+ * Watch Params events
1588
+ * @param callback Function to call when event is emitted
1589
+ * @param filter Optional filter for indexed parameters
1590
+ * @returns Unwatch function to stop listening
1591
+ */
1592
+ Params: (callback: (event: { feeBasisPoints: bigint; maxFee: bigint }) => void) => {
1593
+ return this.publicClient.watchContractEvent({
1594
+ address: this.contractAddress,
1595
+ abi: UquidCoinAbi,
1596
+ eventName: 'Params',
1597
+
1598
+ onLogs: (logs: any[]) => {
1599
+ logs.forEach((log: any) => {
1600
+ callback(log.args as any);
1601
+ });
1602
+ },
1603
+ }) as () => void;
1604
+ },
1605
+ /**
1606
+ * Watch Pause events
1607
+ * @param callback Function to call when event is emitted
1608
+ * @param filter Optional filter for indexed parameters
1609
+ * @returns Unwatch function to stop listening
1610
+ */
1611
+ Pause: (callback: (event: { }) => void) => {
1612
+ return this.publicClient.watchContractEvent({
1613
+ address: this.contractAddress,
1614
+ abi: UquidCoinAbi,
1615
+ eventName: 'Pause',
1616
+
1617
+ onLogs: (logs: any[]) => {
1618
+ logs.forEach((log: any) => {
1619
+ callback(log.args as any);
1620
+ });
1621
+ },
1622
+ }) as () => void;
1623
+ },
1624
+ /**
1625
+ * Watch Redeem events
1626
+ * @param callback Function to call when event is emitted
1627
+ * @param filter Optional filter for indexed parameters
1628
+ * @returns Unwatch function to stop listening
1629
+ */
1630
+ Redeem: (callback: (event: { amount: bigint }) => void) => {
1631
+ return this.publicClient.watchContractEvent({
1632
+ address: this.contractAddress,
1633
+ abi: UquidCoinAbi,
1634
+ eventName: 'Redeem',
1635
+
1636
+ onLogs: (logs: any[]) => {
1637
+ logs.forEach((log: any) => {
1638
+ callback(log.args as any);
1639
+ });
1640
+ },
1641
+ }) as () => void;
1642
+ },
1643
+ /**
1644
+ * Watch RemovedBlackList events
1645
+ * @param callback Function to call when event is emitted
1646
+ * @param filter Optional filter for indexed parameters
1647
+ * @returns Unwatch function to stop listening
1648
+ */
1649
+ RemovedBlackList: (callback: (event: { _user: `0x${string}` }) => void) => {
1650
+ return this.publicClient.watchContractEvent({
1651
+ address: this.contractAddress,
1652
+ abi: UquidCoinAbi,
1653
+ eventName: 'RemovedBlackList',
1654
+
1655
+ onLogs: (logs: any[]) => {
1656
+ logs.forEach((log: any) => {
1657
+ callback(log.args as any);
1658
+ });
1659
+ },
1660
+ }) as () => void;
1661
+ },
1662
+ /**
1663
+ * Watch Transfer events
1664
+ * @param callback Function to call when event is emitted
1665
+ * @param filter Optional filter for indexed parameters
1666
+ * @returns Unwatch function to stop listening
1667
+ */
1668
+ Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from?: `0x${string}` | `0x${string}`[] | null; to?: `0x${string}` | `0x${string}`[] | null }) => {
1669
+ return this.publicClient.watchContractEvent({
1670
+ address: this.contractAddress,
1671
+ abi: UquidCoinAbi,
1672
+ eventName: 'Transfer',
1673
+ args: filter as any,
1674
+ onLogs: (logs: any[]) => {
1675
+ logs.forEach((log: any) => {
1676
+ callback(log.args as any);
1677
+ });
1678
+ },
1679
+ }) as () => void;
1680
+ },
1681
+ /**
1682
+ * Watch Unpause events
1683
+ * @param callback Function to call when event is emitted
1684
+ * @param filter Optional filter for indexed parameters
1685
+ * @returns Unwatch function to stop listening
1686
+ */
1687
+ Unpause: (callback: (event: { }) => void) => {
1688
+ return this.publicClient.watchContractEvent({
1689
+ address: this.contractAddress,
1690
+ abi: UquidCoinAbi,
1691
+ eventName: 'Unpause',
1692
+
1693
+ onLogs: (logs: any[]) => {
1694
+ logs.forEach((log: any) => {
1695
+ callback(log.args as any);
1696
+ });
1697
+ },
1698
+ }) as () => void;
1699
+ }
1700
+ };
1701
+ }
1702
+ }