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