@gitmyabi/arss 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2719 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+
5
+ /**
6
+ * Stablecoin.MinterInfo struct type
7
+ */
8
+ export type Stablecoin_MinterInfo = {
9
+ minter: `0x${string}`;
10
+ allowance: bigint;
11
+ };
12
+ /**
13
+ * Stablecoin ABI
14
+ *
15
+ * This ABI is typed using viem's type system for full type safety.
16
+ */
17
+ export const StablecoinAbi = [
18
+ {
19
+ "inputs": [],
20
+ "stateMutability": "nonpayable",
21
+ "type": "constructor"
22
+ },
23
+ {
24
+ "inputs": [],
25
+ "name": "AccessControlBadConfirmation",
26
+ "type": "error"
27
+ },
28
+ {
29
+ "inputs": [
30
+ {
31
+ "internalType": "address",
32
+ "name": "account",
33
+ "type": "address"
34
+ },
35
+ {
36
+ "internalType": "bytes32",
37
+ "name": "neededRole",
38
+ "type": "bytes32"
39
+ }
40
+ ],
41
+ "name": "AccessControlUnauthorizedAccount",
42
+ "type": "error"
43
+ },
44
+ {
45
+ "inputs": [
46
+ {
47
+ "internalType": "address",
48
+ "name": "account",
49
+ "type": "address"
50
+ }
51
+ ],
52
+ "name": "AccountIsFrozen",
53
+ "type": "error"
54
+ },
55
+ {
56
+ "inputs": [
57
+ {
58
+ "internalType": "address",
59
+ "name": "target",
60
+ "type": "address"
61
+ }
62
+ ],
63
+ "name": "AddressEmptyCode",
64
+ "type": "error"
65
+ },
66
+ {
67
+ "inputs": [],
68
+ "name": "AdminRoleCannotBeEmpty",
69
+ "type": "error"
70
+ },
71
+ {
72
+ "inputs": [
73
+ {
74
+ "internalType": "address",
75
+ "name": "implementation",
76
+ "type": "address"
77
+ }
78
+ ],
79
+ "name": "ERC1967InvalidImplementation",
80
+ "type": "error"
81
+ },
82
+ {
83
+ "inputs": [],
84
+ "name": "ERC1967NonPayable",
85
+ "type": "error"
86
+ },
87
+ {
88
+ "inputs": [
89
+ {
90
+ "internalType": "address",
91
+ "name": "spender",
92
+ "type": "address"
93
+ },
94
+ {
95
+ "internalType": "uint256",
96
+ "name": "allowance",
97
+ "type": "uint256"
98
+ },
99
+ {
100
+ "internalType": "uint256",
101
+ "name": "needed",
102
+ "type": "uint256"
103
+ }
104
+ ],
105
+ "name": "ERC20InsufficientAllowance",
106
+ "type": "error"
107
+ },
108
+ {
109
+ "inputs": [
110
+ {
111
+ "internalType": "address",
112
+ "name": "sender",
113
+ "type": "address"
114
+ },
115
+ {
116
+ "internalType": "uint256",
117
+ "name": "balance",
118
+ "type": "uint256"
119
+ },
120
+ {
121
+ "internalType": "uint256",
122
+ "name": "needed",
123
+ "type": "uint256"
124
+ }
125
+ ],
126
+ "name": "ERC20InsufficientBalance",
127
+ "type": "error"
128
+ },
129
+ {
130
+ "inputs": [
131
+ {
132
+ "internalType": "address",
133
+ "name": "approver",
134
+ "type": "address"
135
+ }
136
+ ],
137
+ "name": "ERC20InvalidApprover",
138
+ "type": "error"
139
+ },
140
+ {
141
+ "inputs": [
142
+ {
143
+ "internalType": "address",
144
+ "name": "receiver",
145
+ "type": "address"
146
+ }
147
+ ],
148
+ "name": "ERC20InvalidReceiver",
149
+ "type": "error"
150
+ },
151
+ {
152
+ "inputs": [
153
+ {
154
+ "internalType": "address",
155
+ "name": "sender",
156
+ "type": "address"
157
+ }
158
+ ],
159
+ "name": "ERC20InvalidSender",
160
+ "type": "error"
161
+ },
162
+ {
163
+ "inputs": [
164
+ {
165
+ "internalType": "address",
166
+ "name": "spender",
167
+ "type": "address"
168
+ }
169
+ ],
170
+ "name": "ERC20InvalidSpender",
171
+ "type": "error"
172
+ },
173
+ {
174
+ "inputs": [],
175
+ "name": "EnforcedPause",
176
+ "type": "error"
177
+ },
178
+ {
179
+ "inputs": [],
180
+ "name": "ExpectedPause",
181
+ "type": "error"
182
+ },
183
+ {
184
+ "inputs": [],
185
+ "name": "FailedCall",
186
+ "type": "error"
187
+ },
188
+ {
189
+ "inputs": [],
190
+ "name": "InvalidInitialization",
191
+ "type": "error"
192
+ },
193
+ {
194
+ "inputs": [
195
+ {
196
+ "internalType": "address",
197
+ "name": "minter",
198
+ "type": "address"
199
+ }
200
+ ],
201
+ "name": "MinterAlreadyExists",
202
+ "type": "error"
203
+ },
204
+ {
205
+ "inputs": [
206
+ {
207
+ "internalType": "address",
208
+ "name": "minter",
209
+ "type": "address"
210
+ }
211
+ ],
212
+ "name": "MinterDoesNotExist",
213
+ "type": "error"
214
+ },
215
+ {
216
+ "inputs": [
217
+ {
218
+ "internalType": "address",
219
+ "name": "impl",
220
+ "type": "address"
221
+ }
222
+ ],
223
+ "name": "NotAContract",
224
+ "type": "error"
225
+ },
226
+ {
227
+ "inputs": [
228
+ {
229
+ "internalType": "address",
230
+ "name": "account",
231
+ "type": "address"
232
+ }
233
+ ],
234
+ "name": "NotAnAdmin",
235
+ "type": "error"
236
+ },
237
+ {
238
+ "inputs": [],
239
+ "name": "NotInitializing",
240
+ "type": "error"
241
+ },
242
+ {
243
+ "inputs": [],
244
+ "name": "UUPSUnauthorizedCallContext",
245
+ "type": "error"
246
+ },
247
+ {
248
+ "inputs": [
249
+ {
250
+ "internalType": "bytes32",
251
+ "name": "slot",
252
+ "type": "bytes32"
253
+ }
254
+ ],
255
+ "name": "UUPSUnsupportedProxiableUUID",
256
+ "type": "error"
257
+ },
258
+ {
259
+ "inputs": [
260
+ {
261
+ "internalType": "uint256",
262
+ "name": "requested",
263
+ "type": "uint256"
264
+ },
265
+ {
266
+ "internalType": "uint256",
267
+ "name": "allowance",
268
+ "type": "uint256"
269
+ }
270
+ ],
271
+ "name": "ValueExceedsAllowance",
272
+ "type": "error"
273
+ },
274
+ {
275
+ "inputs": [
276
+ {
277
+ "internalType": "bytes32",
278
+ "name": "role",
279
+ "type": "bytes32"
280
+ }
281
+ ],
282
+ "name": "ZeroAddress",
283
+ "type": "error"
284
+ },
285
+ {
286
+ "anonymous": false,
287
+ "inputs": [
288
+ {
289
+ "indexed": true,
290
+ "internalType": "address",
291
+ "name": "account",
292
+ "type": "address"
293
+ }
294
+ ],
295
+ "name": "AccountFrozen",
296
+ "type": "event"
297
+ },
298
+ {
299
+ "anonymous": false,
300
+ "inputs": [
301
+ {
302
+ "indexed": true,
303
+ "internalType": "address",
304
+ "name": "account",
305
+ "type": "address"
306
+ }
307
+ ],
308
+ "name": "AccountUnfrozen",
309
+ "type": "event"
310
+ },
311
+ {
312
+ "anonymous": false,
313
+ "inputs": [
314
+ {
315
+ "indexed": true,
316
+ "internalType": "address",
317
+ "name": "owner",
318
+ "type": "address"
319
+ },
320
+ {
321
+ "indexed": true,
322
+ "internalType": "address",
323
+ "name": "spender",
324
+ "type": "address"
325
+ },
326
+ {
327
+ "indexed": false,
328
+ "internalType": "uint256",
329
+ "name": "value",
330
+ "type": "uint256"
331
+ }
332
+ ],
333
+ "name": "Approval",
334
+ "type": "event"
335
+ },
336
+ {
337
+ "anonymous": false,
338
+ "inputs": [
339
+ {
340
+ "indexed": false,
341
+ "internalType": "uint64",
342
+ "name": "version",
343
+ "type": "uint64"
344
+ }
345
+ ],
346
+ "name": "Initialized",
347
+ "type": "event"
348
+ },
349
+ {
350
+ "anonymous": false,
351
+ "inputs": [
352
+ {
353
+ "indexed": true,
354
+ "internalType": "address",
355
+ "name": "minter",
356
+ "type": "address"
357
+ },
358
+ {
359
+ "indexed": false,
360
+ "internalType": "uint256",
361
+ "name": "allowance",
362
+ "type": "uint256"
363
+ }
364
+ ],
365
+ "name": "MinterAdded",
366
+ "type": "event"
367
+ },
368
+ {
369
+ "anonymous": false,
370
+ "inputs": [
371
+ {
372
+ "indexed": true,
373
+ "internalType": "address",
374
+ "name": "minter",
375
+ "type": "address"
376
+ },
377
+ {
378
+ "indexed": false,
379
+ "internalType": "uint256",
380
+ "name": "oldAllowance",
381
+ "type": "uint256"
382
+ },
383
+ {
384
+ "indexed": false,
385
+ "internalType": "uint256",
386
+ "name": "newAllowance",
387
+ "type": "uint256"
388
+ }
389
+ ],
390
+ "name": "MinterAllowanceChanged",
391
+ "type": "event"
392
+ },
393
+ {
394
+ "anonymous": false,
395
+ "inputs": [
396
+ {
397
+ "indexed": true,
398
+ "internalType": "address",
399
+ "name": "minter",
400
+ "type": "address"
401
+ }
402
+ ],
403
+ "name": "MinterRemoved",
404
+ "type": "event"
405
+ },
406
+ {
407
+ "anonymous": false,
408
+ "inputs": [
409
+ {
410
+ "indexed": false,
411
+ "internalType": "address",
412
+ "name": "account",
413
+ "type": "address"
414
+ }
415
+ ],
416
+ "name": "Paused",
417
+ "type": "event"
418
+ },
419
+ {
420
+ "anonymous": false,
421
+ "inputs": [
422
+ {
423
+ "indexed": true,
424
+ "internalType": "bytes32",
425
+ "name": "role",
426
+ "type": "bytes32"
427
+ },
428
+ {
429
+ "indexed": true,
430
+ "internalType": "bytes32",
431
+ "name": "previousAdminRole",
432
+ "type": "bytes32"
433
+ },
434
+ {
435
+ "indexed": true,
436
+ "internalType": "bytes32",
437
+ "name": "newAdminRole",
438
+ "type": "bytes32"
439
+ }
440
+ ],
441
+ "name": "RoleAdminChanged",
442
+ "type": "event"
443
+ },
444
+ {
445
+ "anonymous": false,
446
+ "inputs": [
447
+ {
448
+ "indexed": true,
449
+ "internalType": "bytes32",
450
+ "name": "role",
451
+ "type": "bytes32"
452
+ },
453
+ {
454
+ "indexed": true,
455
+ "internalType": "address",
456
+ "name": "account",
457
+ "type": "address"
458
+ },
459
+ {
460
+ "indexed": true,
461
+ "internalType": "address",
462
+ "name": "sender",
463
+ "type": "address"
464
+ }
465
+ ],
466
+ "name": "RoleGranted",
467
+ "type": "event"
468
+ },
469
+ {
470
+ "anonymous": false,
471
+ "inputs": [
472
+ {
473
+ "indexed": true,
474
+ "internalType": "bytes32",
475
+ "name": "role",
476
+ "type": "bytes32"
477
+ },
478
+ {
479
+ "indexed": true,
480
+ "internalType": "address",
481
+ "name": "account",
482
+ "type": "address"
483
+ },
484
+ {
485
+ "indexed": true,
486
+ "internalType": "address",
487
+ "name": "sender",
488
+ "type": "address"
489
+ }
490
+ ],
491
+ "name": "RoleRevoked",
492
+ "type": "event"
493
+ },
494
+ {
495
+ "anonymous": false,
496
+ "inputs": [
497
+ {
498
+ "indexed": true,
499
+ "internalType": "address",
500
+ "name": "from",
501
+ "type": "address"
502
+ },
503
+ {
504
+ "indexed": true,
505
+ "internalType": "address",
506
+ "name": "to",
507
+ "type": "address"
508
+ },
509
+ {
510
+ "indexed": false,
511
+ "internalType": "uint256",
512
+ "name": "value",
513
+ "type": "uint256"
514
+ }
515
+ ],
516
+ "name": "Transfer",
517
+ "type": "event"
518
+ },
519
+ {
520
+ "anonymous": false,
521
+ "inputs": [
522
+ {
523
+ "indexed": false,
524
+ "internalType": "address",
525
+ "name": "account",
526
+ "type": "address"
527
+ }
528
+ ],
529
+ "name": "Unpaused",
530
+ "type": "event"
531
+ },
532
+ {
533
+ "anonymous": false,
534
+ "inputs": [
535
+ {
536
+ "indexed": true,
537
+ "internalType": "address",
538
+ "name": "implementation",
539
+ "type": "address"
540
+ }
541
+ ],
542
+ "name": "Upgraded",
543
+ "type": "event"
544
+ },
545
+ {
546
+ "inputs": [],
547
+ "name": "ADMIN_ROLE",
548
+ "outputs": [
549
+ {
550
+ "internalType": "bytes32",
551
+ "name": "",
552
+ "type": "bytes32"
553
+ }
554
+ ],
555
+ "stateMutability": "view",
556
+ "type": "function"
557
+ },
558
+ {
559
+ "inputs": [],
560
+ "name": "BURNER_ROLE",
561
+ "outputs": [
562
+ {
563
+ "internalType": "bytes32",
564
+ "name": "",
565
+ "type": "bytes32"
566
+ }
567
+ ],
568
+ "stateMutability": "view",
569
+ "type": "function"
570
+ },
571
+ {
572
+ "inputs": [],
573
+ "name": "DEFAULT_ADMIN_ROLE",
574
+ "outputs": [
575
+ {
576
+ "internalType": "bytes32",
577
+ "name": "",
578
+ "type": "bytes32"
579
+ }
580
+ ],
581
+ "stateMutability": "view",
582
+ "type": "function"
583
+ },
584
+ {
585
+ "inputs": [],
586
+ "name": "FREEZER_ROLE",
587
+ "outputs": [
588
+ {
589
+ "internalType": "bytes32",
590
+ "name": "",
591
+ "type": "bytes32"
592
+ }
593
+ ],
594
+ "stateMutability": "view",
595
+ "type": "function"
596
+ },
597
+ {
598
+ "inputs": [],
599
+ "name": "MINTER_ROLE",
600
+ "outputs": [
601
+ {
602
+ "internalType": "bytes32",
603
+ "name": "",
604
+ "type": "bytes32"
605
+ }
606
+ ],
607
+ "stateMutability": "view",
608
+ "type": "function"
609
+ },
610
+ {
611
+ "inputs": [],
612
+ "name": "PAUSER_ROLE",
613
+ "outputs": [
614
+ {
615
+ "internalType": "bytes32",
616
+ "name": "",
617
+ "type": "bytes32"
618
+ }
619
+ ],
620
+ "stateMutability": "view",
621
+ "type": "function"
622
+ },
623
+ {
624
+ "inputs": [],
625
+ "name": "UPGRADE_INTERFACE_VERSION",
626
+ "outputs": [
627
+ {
628
+ "internalType": "string",
629
+ "name": "",
630
+ "type": "string"
631
+ }
632
+ ],
633
+ "stateMutability": "view",
634
+ "type": "function"
635
+ },
636
+ {
637
+ "inputs": [
638
+ {
639
+ "internalType": "address",
640
+ "name": "newMinter",
641
+ "type": "address"
642
+ },
643
+ {
644
+ "internalType": "uint256",
645
+ "name": "allowance",
646
+ "type": "uint256"
647
+ }
648
+ ],
649
+ "name": "addMinter",
650
+ "outputs": [],
651
+ "stateMutability": "nonpayable",
652
+ "type": "function"
653
+ },
654
+ {
655
+ "inputs": [
656
+ {
657
+ "internalType": "address",
658
+ "name": "owner",
659
+ "type": "address"
660
+ },
661
+ {
662
+ "internalType": "address",
663
+ "name": "spender",
664
+ "type": "address"
665
+ }
666
+ ],
667
+ "name": "allowance",
668
+ "outputs": [
669
+ {
670
+ "internalType": "uint256",
671
+ "name": "",
672
+ "type": "uint256"
673
+ }
674
+ ],
675
+ "stateMutability": "view",
676
+ "type": "function"
677
+ },
678
+ {
679
+ "inputs": [
680
+ {
681
+ "internalType": "address",
682
+ "name": "spender",
683
+ "type": "address"
684
+ },
685
+ {
686
+ "internalType": "uint256",
687
+ "name": "value",
688
+ "type": "uint256"
689
+ }
690
+ ],
691
+ "name": "approve",
692
+ "outputs": [
693
+ {
694
+ "internalType": "bool",
695
+ "name": "",
696
+ "type": "bool"
697
+ }
698
+ ],
699
+ "stateMutability": "nonpayable",
700
+ "type": "function"
701
+ },
702
+ {
703
+ "inputs": [
704
+ {
705
+ "internalType": "address",
706
+ "name": "account",
707
+ "type": "address"
708
+ }
709
+ ],
710
+ "name": "balanceOf",
711
+ "outputs": [
712
+ {
713
+ "internalType": "uint256",
714
+ "name": "",
715
+ "type": "uint256"
716
+ }
717
+ ],
718
+ "stateMutability": "view",
719
+ "type": "function"
720
+ },
721
+ {
722
+ "inputs": [
723
+ {
724
+ "internalType": "uint256",
725
+ "name": "value",
726
+ "type": "uint256"
727
+ }
728
+ ],
729
+ "name": "burn",
730
+ "outputs": [],
731
+ "stateMutability": "nonpayable",
732
+ "type": "function"
733
+ },
734
+ {
735
+ "inputs": [
736
+ {
737
+ "internalType": "address",
738
+ "name": "account",
739
+ "type": "address"
740
+ },
741
+ {
742
+ "internalType": "uint256",
743
+ "name": "value",
744
+ "type": "uint256"
745
+ }
746
+ ],
747
+ "name": "burnFrom",
748
+ "outputs": [],
749
+ "stateMutability": "nonpayable",
750
+ "type": "function"
751
+ },
752
+ {
753
+ "inputs": [],
754
+ "name": "decimals",
755
+ "outputs": [
756
+ {
757
+ "internalType": "uint8",
758
+ "name": "",
759
+ "type": "uint8"
760
+ }
761
+ ],
762
+ "stateMutability": "view",
763
+ "type": "function"
764
+ },
765
+ {
766
+ "inputs": [
767
+ {
768
+ "internalType": "address",
769
+ "name": "account",
770
+ "type": "address"
771
+ }
772
+ ],
773
+ "name": "freeze",
774
+ "outputs": [],
775
+ "stateMutability": "nonpayable",
776
+ "type": "function"
777
+ },
778
+ {
779
+ "inputs": [
780
+ {
781
+ "internalType": "address",
782
+ "name": "account",
783
+ "type": "address"
784
+ }
785
+ ],
786
+ "name": "frozen",
787
+ "outputs": [
788
+ {
789
+ "internalType": "bool",
790
+ "name": "isFrozen",
791
+ "type": "bool"
792
+ }
793
+ ],
794
+ "stateMutability": "view",
795
+ "type": "function"
796
+ },
797
+ {
798
+ "inputs": [],
799
+ "name": "getAllBurners",
800
+ "outputs": [
801
+ {
802
+ "internalType": "address[]",
803
+ "name": "",
804
+ "type": "address[]"
805
+ }
806
+ ],
807
+ "stateMutability": "view",
808
+ "type": "function"
809
+ },
810
+ {
811
+ "inputs": [],
812
+ "name": "getAllMinters",
813
+ "outputs": [
814
+ {
815
+ "components": [
816
+ {
817
+ "internalType": "address",
818
+ "name": "minter",
819
+ "type": "address"
820
+ },
821
+ {
822
+ "internalType": "uint256",
823
+ "name": "allowance",
824
+ "type": "uint256"
825
+ }
826
+ ],
827
+ "internalType": "struct Stablecoin.MinterInfo[]",
828
+ "name": "",
829
+ "type": "tuple[]"
830
+ }
831
+ ],
832
+ "stateMutability": "view",
833
+ "type": "function"
834
+ },
835
+ {
836
+ "inputs": [],
837
+ "name": "getBurnerCount",
838
+ "outputs": [
839
+ {
840
+ "internalType": "uint256",
841
+ "name": "",
842
+ "type": "uint256"
843
+ }
844
+ ],
845
+ "stateMutability": "view",
846
+ "type": "function"
847
+ },
848
+ {
849
+ "inputs": [],
850
+ "name": "getMinterCount",
851
+ "outputs": [
852
+ {
853
+ "internalType": "uint256",
854
+ "name": "",
855
+ "type": "uint256"
856
+ }
857
+ ],
858
+ "stateMutability": "view",
859
+ "type": "function"
860
+ },
861
+ {
862
+ "inputs": [
863
+ {
864
+ "internalType": "bytes32",
865
+ "name": "role",
866
+ "type": "bytes32"
867
+ }
868
+ ],
869
+ "name": "getRoleAdmin",
870
+ "outputs": [
871
+ {
872
+ "internalType": "bytes32",
873
+ "name": "",
874
+ "type": "bytes32"
875
+ }
876
+ ],
877
+ "stateMutability": "view",
878
+ "type": "function"
879
+ },
880
+ {
881
+ "inputs": [
882
+ {
883
+ "internalType": "bytes32",
884
+ "name": "role",
885
+ "type": "bytes32"
886
+ },
887
+ {
888
+ "internalType": "uint256",
889
+ "name": "index",
890
+ "type": "uint256"
891
+ }
892
+ ],
893
+ "name": "getRoleMember",
894
+ "outputs": [
895
+ {
896
+ "internalType": "address",
897
+ "name": "",
898
+ "type": "address"
899
+ }
900
+ ],
901
+ "stateMutability": "view",
902
+ "type": "function"
903
+ },
904
+ {
905
+ "inputs": [
906
+ {
907
+ "internalType": "bytes32",
908
+ "name": "role",
909
+ "type": "bytes32"
910
+ }
911
+ ],
912
+ "name": "getRoleMemberCount",
913
+ "outputs": [
914
+ {
915
+ "internalType": "uint256",
916
+ "name": "",
917
+ "type": "uint256"
918
+ }
919
+ ],
920
+ "stateMutability": "view",
921
+ "type": "function"
922
+ },
923
+ {
924
+ "inputs": [
925
+ {
926
+ "internalType": "bytes32",
927
+ "name": "role",
928
+ "type": "bytes32"
929
+ }
930
+ ],
931
+ "name": "getRoleMembers",
932
+ "outputs": [
933
+ {
934
+ "internalType": "address[]",
935
+ "name": "",
936
+ "type": "address[]"
937
+ }
938
+ ],
939
+ "stateMutability": "view",
940
+ "type": "function"
941
+ },
942
+ {
943
+ "inputs": [
944
+ {
945
+ "internalType": "bytes32",
946
+ "name": "role",
947
+ "type": "bytes32"
948
+ },
949
+ {
950
+ "internalType": "address",
951
+ "name": "account",
952
+ "type": "address"
953
+ }
954
+ ],
955
+ "name": "grantRole",
956
+ "outputs": [],
957
+ "stateMutability": "nonpayable",
958
+ "type": "function"
959
+ },
960
+ {
961
+ "inputs": [
962
+ {
963
+ "internalType": "bytes32",
964
+ "name": "role",
965
+ "type": "bytes32"
966
+ },
967
+ {
968
+ "internalType": "address",
969
+ "name": "account",
970
+ "type": "address"
971
+ }
972
+ ],
973
+ "name": "hasRole",
974
+ "outputs": [
975
+ {
976
+ "internalType": "bool",
977
+ "name": "",
978
+ "type": "bool"
979
+ }
980
+ ],
981
+ "stateMutability": "view",
982
+ "type": "function"
983
+ },
984
+ {
985
+ "inputs": [
986
+ {
987
+ "internalType": "string",
988
+ "name": "name",
989
+ "type": "string"
990
+ },
991
+ {
992
+ "internalType": "string",
993
+ "name": "symbol",
994
+ "type": "string"
995
+ },
996
+ {
997
+ "internalType": "uint8",
998
+ "name": "decimals_",
999
+ "type": "uint8"
1000
+ },
1001
+ {
1002
+ "internalType": "address",
1003
+ "name": "admin",
1004
+ "type": "address"
1005
+ },
1006
+ {
1007
+ "internalType": "address",
1008
+ "name": "burner",
1009
+ "type": "address"
1010
+ },
1011
+ {
1012
+ "internalType": "address",
1013
+ "name": "pauser",
1014
+ "type": "address"
1015
+ },
1016
+ {
1017
+ "internalType": "address",
1018
+ "name": "freezer",
1019
+ "type": "address"
1020
+ }
1021
+ ],
1022
+ "name": "initialize",
1023
+ "outputs": [],
1024
+ "stateMutability": "nonpayable",
1025
+ "type": "function"
1026
+ },
1027
+ {
1028
+ "inputs": [
1029
+ {
1030
+ "internalType": "address",
1031
+ "name": "to",
1032
+ "type": "address"
1033
+ },
1034
+ {
1035
+ "internalType": "uint256",
1036
+ "name": "value",
1037
+ "type": "uint256"
1038
+ }
1039
+ ],
1040
+ "name": "mint",
1041
+ "outputs": [],
1042
+ "stateMutability": "nonpayable",
1043
+ "type": "function"
1044
+ },
1045
+ {
1046
+ "inputs": [
1047
+ {
1048
+ "internalType": "address",
1049
+ "name": "minter",
1050
+ "type": "address"
1051
+ }
1052
+ ],
1053
+ "name": "minterAllowance",
1054
+ "outputs": [
1055
+ {
1056
+ "internalType": "uint256",
1057
+ "name": "",
1058
+ "type": "uint256"
1059
+ }
1060
+ ],
1061
+ "stateMutability": "view",
1062
+ "type": "function"
1063
+ },
1064
+ {
1065
+ "inputs": [
1066
+ {
1067
+ "internalType": "address",
1068
+ "name": "minter",
1069
+ "type": "address"
1070
+ },
1071
+ {
1072
+ "internalType": "int256",
1073
+ "name": "delta",
1074
+ "type": "int256"
1075
+ }
1076
+ ],
1077
+ "name": "modifyMinterAllowance",
1078
+ "outputs": [],
1079
+ "stateMutability": "nonpayable",
1080
+ "type": "function"
1081
+ },
1082
+ {
1083
+ "inputs": [],
1084
+ "name": "name",
1085
+ "outputs": [
1086
+ {
1087
+ "internalType": "string",
1088
+ "name": "",
1089
+ "type": "string"
1090
+ }
1091
+ ],
1092
+ "stateMutability": "view",
1093
+ "type": "function"
1094
+ },
1095
+ {
1096
+ "inputs": [],
1097
+ "name": "pause",
1098
+ "outputs": [],
1099
+ "stateMutability": "nonpayable",
1100
+ "type": "function"
1101
+ },
1102
+ {
1103
+ "inputs": [],
1104
+ "name": "paused",
1105
+ "outputs": [
1106
+ {
1107
+ "internalType": "bool",
1108
+ "name": "",
1109
+ "type": "bool"
1110
+ }
1111
+ ],
1112
+ "stateMutability": "view",
1113
+ "type": "function"
1114
+ },
1115
+ {
1116
+ "inputs": [],
1117
+ "name": "proxiableUUID",
1118
+ "outputs": [
1119
+ {
1120
+ "internalType": "bytes32",
1121
+ "name": "",
1122
+ "type": "bytes32"
1123
+ }
1124
+ ],
1125
+ "stateMutability": "view",
1126
+ "type": "function"
1127
+ },
1128
+ {
1129
+ "inputs": [],
1130
+ "name": "reinitializeAdminRole",
1131
+ "outputs": [],
1132
+ "stateMutability": "nonpayable",
1133
+ "type": "function"
1134
+ },
1135
+ {
1136
+ "inputs": [
1137
+ {
1138
+ "internalType": "address",
1139
+ "name": "minter",
1140
+ "type": "address"
1141
+ }
1142
+ ],
1143
+ "name": "removeMinter",
1144
+ "outputs": [],
1145
+ "stateMutability": "nonpayable",
1146
+ "type": "function"
1147
+ },
1148
+ {
1149
+ "inputs": [
1150
+ {
1151
+ "internalType": "bytes32",
1152
+ "name": "role",
1153
+ "type": "bytes32"
1154
+ },
1155
+ {
1156
+ "internalType": "address",
1157
+ "name": "callerConfirmation",
1158
+ "type": "address"
1159
+ }
1160
+ ],
1161
+ "name": "renounceRole",
1162
+ "outputs": [],
1163
+ "stateMutability": "nonpayable",
1164
+ "type": "function"
1165
+ },
1166
+ {
1167
+ "inputs": [
1168
+ {
1169
+ "internalType": "bytes32",
1170
+ "name": "role",
1171
+ "type": "bytes32"
1172
+ },
1173
+ {
1174
+ "internalType": "address",
1175
+ "name": "account",
1176
+ "type": "address"
1177
+ }
1178
+ ],
1179
+ "name": "revokeRole",
1180
+ "outputs": [],
1181
+ "stateMutability": "nonpayable",
1182
+ "type": "function"
1183
+ },
1184
+ {
1185
+ "inputs": [
1186
+ {
1187
+ "internalType": "bytes4",
1188
+ "name": "interfaceId",
1189
+ "type": "bytes4"
1190
+ }
1191
+ ],
1192
+ "name": "supportsInterface",
1193
+ "outputs": [
1194
+ {
1195
+ "internalType": "bool",
1196
+ "name": "",
1197
+ "type": "bool"
1198
+ }
1199
+ ],
1200
+ "stateMutability": "view",
1201
+ "type": "function"
1202
+ },
1203
+ {
1204
+ "inputs": [],
1205
+ "name": "symbol",
1206
+ "outputs": [
1207
+ {
1208
+ "internalType": "string",
1209
+ "name": "",
1210
+ "type": "string"
1211
+ }
1212
+ ],
1213
+ "stateMutability": "view",
1214
+ "type": "function"
1215
+ },
1216
+ {
1217
+ "inputs": [],
1218
+ "name": "totalSupply",
1219
+ "outputs": [
1220
+ {
1221
+ "internalType": "uint256",
1222
+ "name": "",
1223
+ "type": "uint256"
1224
+ }
1225
+ ],
1226
+ "stateMutability": "view",
1227
+ "type": "function"
1228
+ },
1229
+ {
1230
+ "inputs": [
1231
+ {
1232
+ "internalType": "address",
1233
+ "name": "to",
1234
+ "type": "address"
1235
+ },
1236
+ {
1237
+ "internalType": "uint256",
1238
+ "name": "value",
1239
+ "type": "uint256"
1240
+ }
1241
+ ],
1242
+ "name": "transfer",
1243
+ "outputs": [
1244
+ {
1245
+ "internalType": "bool",
1246
+ "name": "",
1247
+ "type": "bool"
1248
+ }
1249
+ ],
1250
+ "stateMutability": "nonpayable",
1251
+ "type": "function"
1252
+ },
1253
+ {
1254
+ "inputs": [
1255
+ {
1256
+ "internalType": "address",
1257
+ "name": "from",
1258
+ "type": "address"
1259
+ },
1260
+ {
1261
+ "internalType": "address",
1262
+ "name": "to",
1263
+ "type": "address"
1264
+ },
1265
+ {
1266
+ "internalType": "uint256",
1267
+ "name": "value",
1268
+ "type": "uint256"
1269
+ }
1270
+ ],
1271
+ "name": "transferFrom",
1272
+ "outputs": [
1273
+ {
1274
+ "internalType": "bool",
1275
+ "name": "",
1276
+ "type": "bool"
1277
+ }
1278
+ ],
1279
+ "stateMutability": "nonpayable",
1280
+ "type": "function"
1281
+ },
1282
+ {
1283
+ "inputs": [
1284
+ {
1285
+ "internalType": "address",
1286
+ "name": "account",
1287
+ "type": "address"
1288
+ }
1289
+ ],
1290
+ "name": "unfreeze",
1291
+ "outputs": [],
1292
+ "stateMutability": "nonpayable",
1293
+ "type": "function"
1294
+ },
1295
+ {
1296
+ "inputs": [],
1297
+ "name": "unpause",
1298
+ "outputs": [],
1299
+ "stateMutability": "nonpayable",
1300
+ "type": "function"
1301
+ },
1302
+ {
1303
+ "inputs": [
1304
+ {
1305
+ "internalType": "address",
1306
+ "name": "newImplementation",
1307
+ "type": "address"
1308
+ },
1309
+ {
1310
+ "internalType": "bytes",
1311
+ "name": "data",
1312
+ "type": "bytes"
1313
+ }
1314
+ ],
1315
+ "name": "upgradeToAndCall",
1316
+ "outputs": [],
1317
+ "stateMutability": "payable",
1318
+ "type": "function"
1319
+ }
1320
+ ] as const satisfies Abi;
1321
+
1322
+ /**
1323
+ * Type-safe ABI for Stablecoin
1324
+ */
1325
+ export type StablecoinAbi = typeof StablecoinAbi;
1326
+
1327
+ /**
1328
+ * Contract instance type for Stablecoin
1329
+ */
1330
+ // Use any for contract type to avoid complex viem type issues
1331
+ // The runtime behavior is type-safe through viem's ABI typing
1332
+ export type StablecoinContract = any;
1333
+
1334
+ /**
1335
+ * Stablecoin Contract Class
1336
+ *
1337
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
1338
+ *
1339
+ * @example
1340
+ * ```typescript
1341
+ * import { createPublicClient, createWalletClient, http } from 'viem';
1342
+ * import { mainnet } from 'viem/chains';
1343
+ * import { Stablecoin } from 'Stablecoin';
1344
+ *
1345
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
1346
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
1347
+ *
1348
+ * const contract = new Stablecoin('0x...', { publicClient, walletClient });
1349
+ *
1350
+ * // Read functions
1351
+ * const result = await contract.balanceOf('0x...');
1352
+ *
1353
+ * // Write functions
1354
+ * const hash = await contract.transfer('0x...', 1000n);
1355
+ *
1356
+ * // Simulate transactions (dry-run)
1357
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
1358
+ * console.log('Gas estimate:', simulation.request.gas);
1359
+ *
1360
+ * // Watch events
1361
+ * const unwatch = contract.watch.Transfer((event) => {
1362
+ * console.log('Transfer event:', event);
1363
+ * });
1364
+ * ```
1365
+ */
1366
+ export class Stablecoin {
1367
+ private contract: StablecoinContract;
1368
+ private contractAddress: Address;
1369
+ private publicClient: PublicClient;
1370
+
1371
+ constructor(
1372
+ address: Address,
1373
+ clients: {
1374
+ publicClient: PublicClient;
1375
+ walletClient?: WalletClient;
1376
+ }
1377
+ ) {
1378
+ this.contractAddress = address;
1379
+ this.publicClient = clients.publicClient;
1380
+ this.contract = getContract({
1381
+ address,
1382
+ abi: StablecoinAbi,
1383
+ client: {
1384
+ public: clients.publicClient,
1385
+ wallet: clients.walletClient,
1386
+ },
1387
+ });
1388
+ }
1389
+
1390
+ /**
1391
+ * Get the contract address
1392
+ */
1393
+ get address(): Address {
1394
+ return this.contractAddress;
1395
+ }
1396
+
1397
+ /**
1398
+ * Get the underlying viem contract instance.
1399
+ */
1400
+ getContract(): StablecoinContract {
1401
+ return this.contract;
1402
+ }
1403
+
1404
+ /**
1405
+ * ADMIN_ROLE
1406
+ * view
1407
+ */
1408
+ async ADMIN_ROLE(): Promise<`0x${string}`> {
1409
+ return this.contract.read.ADMIN_ROLE() as Promise<`0x${string}`>;
1410
+ }
1411
+
1412
+ /**
1413
+ * BURNER_ROLE
1414
+ * view
1415
+ */
1416
+ async BURNER_ROLE(): Promise<`0x${string}`> {
1417
+ return this.contract.read.BURNER_ROLE() as Promise<`0x${string}`>;
1418
+ }
1419
+
1420
+ /**
1421
+ * DEFAULT_ADMIN_ROLE
1422
+ * view
1423
+ */
1424
+ async DEFAULT_ADMIN_ROLE(): Promise<`0x${string}`> {
1425
+ return this.contract.read.DEFAULT_ADMIN_ROLE() as Promise<`0x${string}`>;
1426
+ }
1427
+
1428
+ /**
1429
+ * FREEZER_ROLE
1430
+ * view
1431
+ */
1432
+ async FREEZER_ROLE(): Promise<`0x${string}`> {
1433
+ return this.contract.read.FREEZER_ROLE() as Promise<`0x${string}`>;
1434
+ }
1435
+
1436
+ /**
1437
+ * MINTER_ROLE
1438
+ * view
1439
+ */
1440
+ async MINTER_ROLE(): Promise<`0x${string}`> {
1441
+ return this.contract.read.MINTER_ROLE() as Promise<`0x${string}`>;
1442
+ }
1443
+
1444
+ /**
1445
+ * PAUSER_ROLE
1446
+ * view
1447
+ */
1448
+ async PAUSER_ROLE(): Promise<`0x${string}`> {
1449
+ return this.contract.read.PAUSER_ROLE() as Promise<`0x${string}`>;
1450
+ }
1451
+
1452
+ /**
1453
+ * UPGRADE_INTERFACE_VERSION
1454
+ * view
1455
+ */
1456
+ async UPGRADE_INTERFACE_VERSION(): Promise<string> {
1457
+ return this.contract.read.UPGRADE_INTERFACE_VERSION() as Promise<string>;
1458
+ }
1459
+
1460
+ /**
1461
+ * allowance
1462
+ * view
1463
+ */
1464
+ async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
1465
+ return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
1466
+ }
1467
+
1468
+ /**
1469
+ * balanceOf
1470
+ * view
1471
+ */
1472
+ async balanceOf(account: `0x${string}`): Promise<bigint> {
1473
+ return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
1474
+ }
1475
+
1476
+ /**
1477
+ * decimals
1478
+ * view
1479
+ */
1480
+ async decimals(): Promise<bigint> {
1481
+ return this.contract.read.decimals() as Promise<bigint>;
1482
+ }
1483
+
1484
+ /**
1485
+ * frozen
1486
+ * view
1487
+ */
1488
+ async frozen(account: `0x${string}`): Promise<boolean> {
1489
+ return this.contract.read.frozen([account] as const) as Promise<boolean>;
1490
+ }
1491
+
1492
+ /**
1493
+ * getAllBurners
1494
+ * view
1495
+ */
1496
+ async getAllBurners(): Promise<`0x${string}`[]> {
1497
+ return this.contract.read.getAllBurners() as Promise<`0x${string}`[]>;
1498
+ }
1499
+
1500
+ /**
1501
+ * getAllMinters
1502
+ * view
1503
+ */
1504
+ async getAllMinters(): Promise<Stablecoin_MinterInfo[]> {
1505
+ return this.contract.read.getAllMinters() as Promise<Stablecoin_MinterInfo[]>;
1506
+ }
1507
+
1508
+ /**
1509
+ * getBurnerCount
1510
+ * view
1511
+ */
1512
+ async getBurnerCount(): Promise<bigint> {
1513
+ return this.contract.read.getBurnerCount() as Promise<bigint>;
1514
+ }
1515
+
1516
+ /**
1517
+ * getMinterCount
1518
+ * view
1519
+ */
1520
+ async getMinterCount(): Promise<bigint> {
1521
+ return this.contract.read.getMinterCount() as Promise<bigint>;
1522
+ }
1523
+
1524
+ /**
1525
+ * getRoleAdmin
1526
+ * view
1527
+ */
1528
+ async getRoleAdmin(role: `0x${string}`): Promise<`0x${string}`> {
1529
+ return this.contract.read.getRoleAdmin([role] as const) as Promise<`0x${string}`>;
1530
+ }
1531
+
1532
+ /**
1533
+ * getRoleMember
1534
+ * view
1535
+ */
1536
+ async getRoleMember(role: `0x${string}`, index: bigint): Promise<`0x${string}`> {
1537
+ return this.contract.read.getRoleMember([role, index] as const) as Promise<`0x${string}`>;
1538
+ }
1539
+
1540
+ /**
1541
+ * getRoleMemberCount
1542
+ * view
1543
+ */
1544
+ async getRoleMemberCount(role: `0x${string}`): Promise<bigint> {
1545
+ return this.contract.read.getRoleMemberCount([role] as const) as Promise<bigint>;
1546
+ }
1547
+
1548
+ /**
1549
+ * getRoleMembers
1550
+ * view
1551
+ */
1552
+ async getRoleMembers(role: `0x${string}`): Promise<`0x${string}`[]> {
1553
+ return this.contract.read.getRoleMembers([role] as const) as Promise<`0x${string}`[]>;
1554
+ }
1555
+
1556
+ /**
1557
+ * hasRole
1558
+ * view
1559
+ */
1560
+ async hasRole(role: `0x${string}`, account: `0x${string}`): Promise<boolean> {
1561
+ return this.contract.read.hasRole([role, account] as const) as Promise<boolean>;
1562
+ }
1563
+
1564
+ /**
1565
+ * minterAllowance
1566
+ * view
1567
+ */
1568
+ async minterAllowance(minter: `0x${string}`): Promise<bigint> {
1569
+ return this.contract.read.minterAllowance([minter] as const) as Promise<bigint>;
1570
+ }
1571
+
1572
+ /**
1573
+ * name
1574
+ * view
1575
+ */
1576
+ async name(): Promise<string> {
1577
+ return this.contract.read.name() as Promise<string>;
1578
+ }
1579
+
1580
+ /**
1581
+ * paused
1582
+ * view
1583
+ */
1584
+ async paused(): Promise<boolean> {
1585
+ return this.contract.read.paused() as Promise<boolean>;
1586
+ }
1587
+
1588
+ /**
1589
+ * proxiableUUID
1590
+ * view
1591
+ */
1592
+ async proxiableUUID(): Promise<`0x${string}`> {
1593
+ return this.contract.read.proxiableUUID() as Promise<`0x${string}`>;
1594
+ }
1595
+
1596
+ /**
1597
+ * supportsInterface
1598
+ * view
1599
+ */
1600
+ async supportsInterface(interfaceId: `0x${string}`): Promise<boolean> {
1601
+ return this.contract.read.supportsInterface([interfaceId] as const) as Promise<boolean>;
1602
+ }
1603
+
1604
+ /**
1605
+ * symbol
1606
+ * view
1607
+ */
1608
+ async symbol(): Promise<string> {
1609
+ return this.contract.read.symbol() as Promise<string>;
1610
+ }
1611
+
1612
+ /**
1613
+ * totalSupply
1614
+ * view
1615
+ */
1616
+ async totalSupply(): Promise<bigint> {
1617
+ return this.contract.read.totalSupply() as Promise<bigint>;
1618
+ }
1619
+
1620
+ /**
1621
+ * addMinter
1622
+ * nonpayable
1623
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1624
+ */
1625
+ async addMinter(newMinter: `0x${string}`, allowance: bigint, options?: {
1626
+ accessList?: import('viem').AccessList;
1627
+ authorizationList?: import('viem').AuthorizationList;
1628
+ chain?: import('viem').Chain | null;
1629
+ dataSuffix?: `0x${string}`;
1630
+ gas?: bigint;
1631
+ gasPrice?: bigint;
1632
+ maxFeePerGas?: bigint;
1633
+ maxPriorityFeePerGas?: bigint;
1634
+ nonce?: number;
1635
+ value?: bigint;
1636
+ }): Promise<`0x${string}`> {
1637
+ if (!this.contract.write) {
1638
+ throw new Error('Wallet client is required for write operations');
1639
+ }
1640
+ return this.contract.write.addMinter([newMinter, allowance] as const, options) as Promise<`0x${string}`>;
1641
+ }
1642
+
1643
+ /**
1644
+ * approve
1645
+ * nonpayable
1646
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1647
+ */
1648
+ async approve(spender: `0x${string}`, value: bigint, options?: {
1649
+ accessList?: import('viem').AccessList;
1650
+ authorizationList?: import('viem').AuthorizationList;
1651
+ chain?: import('viem').Chain | null;
1652
+ dataSuffix?: `0x${string}`;
1653
+ gas?: bigint;
1654
+ gasPrice?: bigint;
1655
+ maxFeePerGas?: bigint;
1656
+ maxPriorityFeePerGas?: bigint;
1657
+ nonce?: number;
1658
+ value?: bigint;
1659
+ }): Promise<`0x${string}`> {
1660
+ if (!this.contract.write) {
1661
+ throw new Error('Wallet client is required for write operations');
1662
+ }
1663
+ return this.contract.write.approve([spender, value] as const, options) as Promise<`0x${string}`>;
1664
+ }
1665
+
1666
+ /**
1667
+ * burn
1668
+ * nonpayable
1669
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1670
+ */
1671
+ async burn(value: bigint, options?: {
1672
+ accessList?: import('viem').AccessList;
1673
+ authorizationList?: import('viem').AuthorizationList;
1674
+ chain?: import('viem').Chain | null;
1675
+ dataSuffix?: `0x${string}`;
1676
+ gas?: bigint;
1677
+ gasPrice?: bigint;
1678
+ maxFeePerGas?: bigint;
1679
+ maxPriorityFeePerGas?: bigint;
1680
+ nonce?: number;
1681
+ value?: bigint;
1682
+ }): Promise<`0x${string}`> {
1683
+ if (!this.contract.write) {
1684
+ throw new Error('Wallet client is required for write operations');
1685
+ }
1686
+ return this.contract.write.burn([value] as const, options) as Promise<`0x${string}`>;
1687
+ }
1688
+
1689
+ /**
1690
+ * burnFrom
1691
+ * nonpayable
1692
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1693
+ */
1694
+ async burnFrom(account: `0x${string}`, value: bigint, options?: {
1695
+ accessList?: import('viem').AccessList;
1696
+ authorizationList?: import('viem').AuthorizationList;
1697
+ chain?: import('viem').Chain | null;
1698
+ dataSuffix?: `0x${string}`;
1699
+ gas?: bigint;
1700
+ gasPrice?: bigint;
1701
+ maxFeePerGas?: bigint;
1702
+ maxPriorityFeePerGas?: bigint;
1703
+ nonce?: number;
1704
+ value?: bigint;
1705
+ }): Promise<`0x${string}`> {
1706
+ if (!this.contract.write) {
1707
+ throw new Error('Wallet client is required for write operations');
1708
+ }
1709
+ return this.contract.write.burnFrom([account, value] as const, options) as Promise<`0x${string}`>;
1710
+ }
1711
+
1712
+ /**
1713
+ * freeze
1714
+ * nonpayable
1715
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1716
+ */
1717
+ async freeze(account: `0x${string}`, options?: {
1718
+ accessList?: import('viem').AccessList;
1719
+ authorizationList?: import('viem').AuthorizationList;
1720
+ chain?: import('viem').Chain | null;
1721
+ dataSuffix?: `0x${string}`;
1722
+ gas?: bigint;
1723
+ gasPrice?: bigint;
1724
+ maxFeePerGas?: bigint;
1725
+ maxPriorityFeePerGas?: bigint;
1726
+ nonce?: number;
1727
+ value?: bigint;
1728
+ }): Promise<`0x${string}`> {
1729
+ if (!this.contract.write) {
1730
+ throw new Error('Wallet client is required for write operations');
1731
+ }
1732
+ return this.contract.write.freeze([account] as const, options) as Promise<`0x${string}`>;
1733
+ }
1734
+
1735
+ /**
1736
+ * grantRole
1737
+ * nonpayable
1738
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1739
+ */
1740
+ async grantRole(role: `0x${string}`, account: `0x${string}`, options?: {
1741
+ accessList?: import('viem').AccessList;
1742
+ authorizationList?: import('viem').AuthorizationList;
1743
+ chain?: import('viem').Chain | null;
1744
+ dataSuffix?: `0x${string}`;
1745
+ gas?: bigint;
1746
+ gasPrice?: bigint;
1747
+ maxFeePerGas?: bigint;
1748
+ maxPriorityFeePerGas?: bigint;
1749
+ nonce?: number;
1750
+ value?: bigint;
1751
+ }): Promise<`0x${string}`> {
1752
+ if (!this.contract.write) {
1753
+ throw new Error('Wallet client is required for write operations');
1754
+ }
1755
+ return this.contract.write.grantRole([role, account] as const, options) as Promise<`0x${string}`>;
1756
+ }
1757
+
1758
+ /**
1759
+ * initialize
1760
+ * nonpayable
1761
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1762
+ */
1763
+ async initialize(name: string, symbol: string, decimals_: bigint, admin: `0x${string}`, burner: `0x${string}`, pauser: `0x${string}`, freezer: `0x${string}`, options?: {
1764
+ accessList?: import('viem').AccessList;
1765
+ authorizationList?: import('viem').AuthorizationList;
1766
+ chain?: import('viem').Chain | null;
1767
+ dataSuffix?: `0x${string}`;
1768
+ gas?: bigint;
1769
+ gasPrice?: bigint;
1770
+ maxFeePerGas?: bigint;
1771
+ maxPriorityFeePerGas?: bigint;
1772
+ nonce?: number;
1773
+ value?: bigint;
1774
+ }): Promise<`0x${string}`> {
1775
+ if (!this.contract.write) {
1776
+ throw new Error('Wallet client is required for write operations');
1777
+ }
1778
+ return this.contract.write.initialize([name, symbol, decimals_, admin, burner, pauser, freezer] as const, options) as Promise<`0x${string}`>;
1779
+ }
1780
+
1781
+ /**
1782
+ * mint
1783
+ * nonpayable
1784
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1785
+ */
1786
+ async mint(to: `0x${string}`, value: bigint, options?: {
1787
+ accessList?: import('viem').AccessList;
1788
+ authorizationList?: import('viem').AuthorizationList;
1789
+ chain?: import('viem').Chain | null;
1790
+ dataSuffix?: `0x${string}`;
1791
+ gas?: bigint;
1792
+ gasPrice?: bigint;
1793
+ maxFeePerGas?: bigint;
1794
+ maxPriorityFeePerGas?: bigint;
1795
+ nonce?: number;
1796
+ value?: bigint;
1797
+ }): Promise<`0x${string}`> {
1798
+ if (!this.contract.write) {
1799
+ throw new Error('Wallet client is required for write operations');
1800
+ }
1801
+ return this.contract.write.mint([to, value] as const, options) as Promise<`0x${string}`>;
1802
+ }
1803
+
1804
+ /**
1805
+ * modifyMinterAllowance
1806
+ * nonpayable
1807
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1808
+ */
1809
+ async modifyMinterAllowance(minter: `0x${string}`, delta: bigint, options?: {
1810
+ accessList?: import('viem').AccessList;
1811
+ authorizationList?: import('viem').AuthorizationList;
1812
+ chain?: import('viem').Chain | null;
1813
+ dataSuffix?: `0x${string}`;
1814
+ gas?: bigint;
1815
+ gasPrice?: bigint;
1816
+ maxFeePerGas?: bigint;
1817
+ maxPriorityFeePerGas?: bigint;
1818
+ nonce?: number;
1819
+ value?: bigint;
1820
+ }): Promise<`0x${string}`> {
1821
+ if (!this.contract.write) {
1822
+ throw new Error('Wallet client is required for write operations');
1823
+ }
1824
+ return this.contract.write.modifyMinterAllowance([minter, delta] as const, options) as Promise<`0x${string}`>;
1825
+ }
1826
+
1827
+ /**
1828
+ * pause
1829
+ * nonpayable
1830
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1831
+ */
1832
+ async pause(options?: {
1833
+ accessList?: import('viem').AccessList;
1834
+ authorizationList?: import('viem').AuthorizationList;
1835
+ chain?: import('viem').Chain | null;
1836
+ dataSuffix?: `0x${string}`;
1837
+ gas?: bigint;
1838
+ gasPrice?: bigint;
1839
+ maxFeePerGas?: bigint;
1840
+ maxPriorityFeePerGas?: bigint;
1841
+ nonce?: number;
1842
+ value?: bigint;
1843
+ }): Promise<`0x${string}`> {
1844
+ if (!this.contract.write) {
1845
+ throw new Error('Wallet client is required for write operations');
1846
+ }
1847
+ return this.contract.write.pause(options) as Promise<`0x${string}`>;
1848
+ }
1849
+
1850
+ /**
1851
+ * reinitializeAdminRole
1852
+ * nonpayable
1853
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1854
+ */
1855
+ async reinitializeAdminRole(options?: {
1856
+ accessList?: import('viem').AccessList;
1857
+ authorizationList?: import('viem').AuthorizationList;
1858
+ chain?: import('viem').Chain | null;
1859
+ dataSuffix?: `0x${string}`;
1860
+ gas?: bigint;
1861
+ gasPrice?: bigint;
1862
+ maxFeePerGas?: bigint;
1863
+ maxPriorityFeePerGas?: bigint;
1864
+ nonce?: number;
1865
+ value?: bigint;
1866
+ }): Promise<`0x${string}`> {
1867
+ if (!this.contract.write) {
1868
+ throw new Error('Wallet client is required for write operations');
1869
+ }
1870
+ return this.contract.write.reinitializeAdminRole(options) as Promise<`0x${string}`>;
1871
+ }
1872
+
1873
+ /**
1874
+ * removeMinter
1875
+ * nonpayable
1876
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1877
+ */
1878
+ async removeMinter(minter: `0x${string}`, options?: {
1879
+ accessList?: import('viem').AccessList;
1880
+ authorizationList?: import('viem').AuthorizationList;
1881
+ chain?: import('viem').Chain | null;
1882
+ dataSuffix?: `0x${string}`;
1883
+ gas?: bigint;
1884
+ gasPrice?: bigint;
1885
+ maxFeePerGas?: bigint;
1886
+ maxPriorityFeePerGas?: bigint;
1887
+ nonce?: number;
1888
+ value?: bigint;
1889
+ }): Promise<`0x${string}`> {
1890
+ if (!this.contract.write) {
1891
+ throw new Error('Wallet client is required for write operations');
1892
+ }
1893
+ return this.contract.write.removeMinter([minter] as const, options) as Promise<`0x${string}`>;
1894
+ }
1895
+
1896
+ /**
1897
+ * renounceRole
1898
+ * nonpayable
1899
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1900
+ */
1901
+ async renounceRole(role: `0x${string}`, callerConfirmation: `0x${string}`, options?: {
1902
+ accessList?: import('viem').AccessList;
1903
+ authorizationList?: import('viem').AuthorizationList;
1904
+ chain?: import('viem').Chain | null;
1905
+ dataSuffix?: `0x${string}`;
1906
+ gas?: bigint;
1907
+ gasPrice?: bigint;
1908
+ maxFeePerGas?: bigint;
1909
+ maxPriorityFeePerGas?: bigint;
1910
+ nonce?: number;
1911
+ value?: bigint;
1912
+ }): Promise<`0x${string}`> {
1913
+ if (!this.contract.write) {
1914
+ throw new Error('Wallet client is required for write operations');
1915
+ }
1916
+ return this.contract.write.renounceRole([role, callerConfirmation] as const, options) as Promise<`0x${string}`>;
1917
+ }
1918
+
1919
+ /**
1920
+ * revokeRole
1921
+ * nonpayable
1922
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1923
+ */
1924
+ async revokeRole(role: `0x${string}`, account: `0x${string}`, options?: {
1925
+ accessList?: import('viem').AccessList;
1926
+ authorizationList?: import('viem').AuthorizationList;
1927
+ chain?: import('viem').Chain | null;
1928
+ dataSuffix?: `0x${string}`;
1929
+ gas?: bigint;
1930
+ gasPrice?: bigint;
1931
+ maxFeePerGas?: bigint;
1932
+ maxPriorityFeePerGas?: bigint;
1933
+ nonce?: number;
1934
+ value?: bigint;
1935
+ }): Promise<`0x${string}`> {
1936
+ if (!this.contract.write) {
1937
+ throw new Error('Wallet client is required for write operations');
1938
+ }
1939
+ return this.contract.write.revokeRole([role, account] as const, options) as Promise<`0x${string}`>;
1940
+ }
1941
+
1942
+ /**
1943
+ * transfer
1944
+ * nonpayable
1945
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1946
+ */
1947
+ async transfer(to: `0x${string}`, value: bigint, options?: {
1948
+ accessList?: import('viem').AccessList;
1949
+ authorizationList?: import('viem').AuthorizationList;
1950
+ chain?: import('viem').Chain | null;
1951
+ dataSuffix?: `0x${string}`;
1952
+ gas?: bigint;
1953
+ gasPrice?: bigint;
1954
+ maxFeePerGas?: bigint;
1955
+ maxPriorityFeePerGas?: bigint;
1956
+ nonce?: number;
1957
+ value?: bigint;
1958
+ }): Promise<`0x${string}`> {
1959
+ if (!this.contract.write) {
1960
+ throw new Error('Wallet client is required for write operations');
1961
+ }
1962
+ return this.contract.write.transfer([to, value] as const, options) as Promise<`0x${string}`>;
1963
+ }
1964
+
1965
+ /**
1966
+ * transferFrom
1967
+ * nonpayable
1968
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1969
+ */
1970
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
1971
+ accessList?: import('viem').AccessList;
1972
+ authorizationList?: import('viem').AuthorizationList;
1973
+ chain?: import('viem').Chain | null;
1974
+ dataSuffix?: `0x${string}`;
1975
+ gas?: bigint;
1976
+ gasPrice?: bigint;
1977
+ maxFeePerGas?: bigint;
1978
+ maxPriorityFeePerGas?: bigint;
1979
+ nonce?: number;
1980
+ value?: bigint;
1981
+ }): Promise<`0x${string}`> {
1982
+ if (!this.contract.write) {
1983
+ throw new Error('Wallet client is required for write operations');
1984
+ }
1985
+ return this.contract.write.transferFrom([from, to, value] as const, options) as Promise<`0x${string}`>;
1986
+ }
1987
+
1988
+ /**
1989
+ * unfreeze
1990
+ * nonpayable
1991
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1992
+ */
1993
+ async unfreeze(account: `0x${string}`, options?: {
1994
+ accessList?: import('viem').AccessList;
1995
+ authorizationList?: import('viem').AuthorizationList;
1996
+ chain?: import('viem').Chain | null;
1997
+ dataSuffix?: `0x${string}`;
1998
+ gas?: bigint;
1999
+ gasPrice?: bigint;
2000
+ maxFeePerGas?: bigint;
2001
+ maxPriorityFeePerGas?: bigint;
2002
+ nonce?: number;
2003
+ value?: bigint;
2004
+ }): Promise<`0x${string}`> {
2005
+ if (!this.contract.write) {
2006
+ throw new Error('Wallet client is required for write operations');
2007
+ }
2008
+ return this.contract.write.unfreeze([account] as const, options) as Promise<`0x${string}`>;
2009
+ }
2010
+
2011
+ /**
2012
+ * unpause
2013
+ * nonpayable
2014
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2015
+ */
2016
+ async unpause(options?: {
2017
+ accessList?: import('viem').AccessList;
2018
+ authorizationList?: import('viem').AuthorizationList;
2019
+ chain?: import('viem').Chain | null;
2020
+ dataSuffix?: `0x${string}`;
2021
+ gas?: bigint;
2022
+ gasPrice?: bigint;
2023
+ maxFeePerGas?: bigint;
2024
+ maxPriorityFeePerGas?: bigint;
2025
+ nonce?: number;
2026
+ value?: bigint;
2027
+ }): Promise<`0x${string}`> {
2028
+ if (!this.contract.write) {
2029
+ throw new Error('Wallet client is required for write operations');
2030
+ }
2031
+ return this.contract.write.unpause(options) as Promise<`0x${string}`>;
2032
+ }
2033
+
2034
+ /**
2035
+ * upgradeToAndCall
2036
+ * payable
2037
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2038
+ */
2039
+ async upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
2040
+ accessList?: import('viem').AccessList;
2041
+ authorizationList?: import('viem').AuthorizationList;
2042
+ chain?: import('viem').Chain | null;
2043
+ dataSuffix?: `0x${string}`;
2044
+ gas?: bigint;
2045
+ gasPrice?: bigint;
2046
+ maxFeePerGas?: bigint;
2047
+ maxPriorityFeePerGas?: bigint;
2048
+ nonce?: number;
2049
+ value?: bigint;
2050
+ }): Promise<`0x${string}`> {
2051
+ if (!this.contract.write) {
2052
+ throw new Error('Wallet client is required for write operations');
2053
+ }
2054
+ return this.contract.write.upgradeToAndCall([newImplementation, data] as const, options) as Promise<`0x${string}`>;
2055
+ }
2056
+
2057
+
2058
+
2059
+ /**
2060
+ * Simulate contract write operations (dry-run without sending transaction)
2061
+ *
2062
+ * @example
2063
+ * const result = await contract.simulate.transfer('0x...', 1000n);
2064
+ * console.log('Gas estimate:', result.request.gas);
2065
+ * console.log('Would succeed:', result.result);
2066
+ */
2067
+ get simulate() {
2068
+ const contract = this.contract;
2069
+ if (!contract.simulate) {
2070
+ throw new Error('Public client is required for simulation');
2071
+ }
2072
+ return {
2073
+ /**
2074
+ * Simulate addMinter
2075
+ * Returns gas estimate and result without sending transaction
2076
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2077
+ */
2078
+ async addMinter(newMinter: `0x${string}`, allowance: bigint, options?: {
2079
+ accessList?: import('viem').AccessList;
2080
+ authorizationList?: import('viem').AuthorizationList;
2081
+ chain?: import('viem').Chain | null;
2082
+ dataSuffix?: `0x${string}`;
2083
+ gas?: bigint;
2084
+ gasPrice?: bigint;
2085
+ maxFeePerGas?: bigint;
2086
+ maxPriorityFeePerGas?: bigint;
2087
+ nonce?: number;
2088
+ value?: bigint;
2089
+ }): Promise<void> {
2090
+ return contract.simulate.addMinter([newMinter, allowance] as const, options) as Promise<void>;
2091
+ },
2092
+ /**
2093
+ * Simulate approve
2094
+ * Returns gas estimate and result without sending transaction
2095
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2096
+ */
2097
+ async approve(spender: `0x${string}`, value: bigint, options?: {
2098
+ accessList?: import('viem').AccessList;
2099
+ authorizationList?: import('viem').AuthorizationList;
2100
+ chain?: import('viem').Chain | null;
2101
+ dataSuffix?: `0x${string}`;
2102
+ gas?: bigint;
2103
+ gasPrice?: bigint;
2104
+ maxFeePerGas?: bigint;
2105
+ maxPriorityFeePerGas?: bigint;
2106
+ nonce?: number;
2107
+ value?: bigint;
2108
+ }): Promise<boolean> {
2109
+ return contract.simulate.approve([spender, value] as const, options) as Promise<boolean>;
2110
+ },
2111
+ /**
2112
+ * Simulate burn
2113
+ * Returns gas estimate and result without sending transaction
2114
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2115
+ */
2116
+ async burn(value: bigint, options?: {
2117
+ accessList?: import('viem').AccessList;
2118
+ authorizationList?: import('viem').AuthorizationList;
2119
+ chain?: import('viem').Chain | null;
2120
+ dataSuffix?: `0x${string}`;
2121
+ gas?: bigint;
2122
+ gasPrice?: bigint;
2123
+ maxFeePerGas?: bigint;
2124
+ maxPriorityFeePerGas?: bigint;
2125
+ nonce?: number;
2126
+ value?: bigint;
2127
+ }): Promise<void> {
2128
+ return contract.simulate.burn([value] as const, options) as Promise<void>;
2129
+ },
2130
+ /**
2131
+ * Simulate burnFrom
2132
+ * Returns gas estimate and result without sending transaction
2133
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2134
+ */
2135
+ async burnFrom(account: `0x${string}`, value: bigint, options?: {
2136
+ accessList?: import('viem').AccessList;
2137
+ authorizationList?: import('viem').AuthorizationList;
2138
+ chain?: import('viem').Chain | null;
2139
+ dataSuffix?: `0x${string}`;
2140
+ gas?: bigint;
2141
+ gasPrice?: bigint;
2142
+ maxFeePerGas?: bigint;
2143
+ maxPriorityFeePerGas?: bigint;
2144
+ nonce?: number;
2145
+ value?: bigint;
2146
+ }): Promise<void> {
2147
+ return contract.simulate.burnFrom([account, value] as const, options) as Promise<void>;
2148
+ },
2149
+ /**
2150
+ * Simulate freeze
2151
+ * Returns gas estimate and result without sending transaction
2152
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2153
+ */
2154
+ async freeze(account: `0x${string}`, options?: {
2155
+ accessList?: import('viem').AccessList;
2156
+ authorizationList?: import('viem').AuthorizationList;
2157
+ chain?: import('viem').Chain | null;
2158
+ dataSuffix?: `0x${string}`;
2159
+ gas?: bigint;
2160
+ gasPrice?: bigint;
2161
+ maxFeePerGas?: bigint;
2162
+ maxPriorityFeePerGas?: bigint;
2163
+ nonce?: number;
2164
+ value?: bigint;
2165
+ }): Promise<void> {
2166
+ return contract.simulate.freeze([account] as const, options) as Promise<void>;
2167
+ },
2168
+ /**
2169
+ * Simulate grantRole
2170
+ * Returns gas estimate and result without sending transaction
2171
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2172
+ */
2173
+ async grantRole(role: `0x${string}`, account: `0x${string}`, options?: {
2174
+ accessList?: import('viem').AccessList;
2175
+ authorizationList?: import('viem').AuthorizationList;
2176
+ chain?: import('viem').Chain | null;
2177
+ dataSuffix?: `0x${string}`;
2178
+ gas?: bigint;
2179
+ gasPrice?: bigint;
2180
+ maxFeePerGas?: bigint;
2181
+ maxPriorityFeePerGas?: bigint;
2182
+ nonce?: number;
2183
+ value?: bigint;
2184
+ }): Promise<void> {
2185
+ return contract.simulate.grantRole([role, account] as const, options) as Promise<void>;
2186
+ },
2187
+ /**
2188
+ * Simulate initialize
2189
+ * Returns gas estimate and result without sending transaction
2190
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2191
+ */
2192
+ async initialize(name: string, symbol: string, decimals_: bigint, admin: `0x${string}`, burner: `0x${string}`, pauser: `0x${string}`, freezer: `0x${string}`, options?: {
2193
+ accessList?: import('viem').AccessList;
2194
+ authorizationList?: import('viem').AuthorizationList;
2195
+ chain?: import('viem').Chain | null;
2196
+ dataSuffix?: `0x${string}`;
2197
+ gas?: bigint;
2198
+ gasPrice?: bigint;
2199
+ maxFeePerGas?: bigint;
2200
+ maxPriorityFeePerGas?: bigint;
2201
+ nonce?: number;
2202
+ value?: bigint;
2203
+ }): Promise<void> {
2204
+ return contract.simulate.initialize([name, symbol, decimals_, admin, burner, pauser, freezer] as const, options) as Promise<void>;
2205
+ },
2206
+ /**
2207
+ * Simulate mint
2208
+ * Returns gas estimate and result without sending transaction
2209
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2210
+ */
2211
+ async mint(to: `0x${string}`, value: bigint, options?: {
2212
+ accessList?: import('viem').AccessList;
2213
+ authorizationList?: import('viem').AuthorizationList;
2214
+ chain?: import('viem').Chain | null;
2215
+ dataSuffix?: `0x${string}`;
2216
+ gas?: bigint;
2217
+ gasPrice?: bigint;
2218
+ maxFeePerGas?: bigint;
2219
+ maxPriorityFeePerGas?: bigint;
2220
+ nonce?: number;
2221
+ value?: bigint;
2222
+ }): Promise<void> {
2223
+ return contract.simulate.mint([to, value] as const, options) as Promise<void>;
2224
+ },
2225
+ /**
2226
+ * Simulate modifyMinterAllowance
2227
+ * Returns gas estimate and result without sending transaction
2228
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2229
+ */
2230
+ async modifyMinterAllowance(minter: `0x${string}`, delta: bigint, options?: {
2231
+ accessList?: import('viem').AccessList;
2232
+ authorizationList?: import('viem').AuthorizationList;
2233
+ chain?: import('viem').Chain | null;
2234
+ dataSuffix?: `0x${string}`;
2235
+ gas?: bigint;
2236
+ gasPrice?: bigint;
2237
+ maxFeePerGas?: bigint;
2238
+ maxPriorityFeePerGas?: bigint;
2239
+ nonce?: number;
2240
+ value?: bigint;
2241
+ }): Promise<void> {
2242
+ return contract.simulate.modifyMinterAllowance([minter, delta] as const, options) as Promise<void>;
2243
+ },
2244
+ /**
2245
+ * Simulate pause
2246
+ * Returns gas estimate and result without sending transaction
2247
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2248
+ */
2249
+ async pause(options?: {
2250
+ accessList?: import('viem').AccessList;
2251
+ authorizationList?: import('viem').AuthorizationList;
2252
+ chain?: import('viem').Chain | null;
2253
+ dataSuffix?: `0x${string}`;
2254
+ gas?: bigint;
2255
+ gasPrice?: bigint;
2256
+ maxFeePerGas?: bigint;
2257
+ maxPriorityFeePerGas?: bigint;
2258
+ nonce?: number;
2259
+ value?: bigint;
2260
+ }): Promise<void> {
2261
+ return contract.simulate.pause(options) as Promise<void>;
2262
+ },
2263
+ /**
2264
+ * Simulate reinitializeAdminRole
2265
+ * Returns gas estimate and result without sending transaction
2266
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2267
+ */
2268
+ async reinitializeAdminRole(options?: {
2269
+ accessList?: import('viem').AccessList;
2270
+ authorizationList?: import('viem').AuthorizationList;
2271
+ chain?: import('viem').Chain | null;
2272
+ dataSuffix?: `0x${string}`;
2273
+ gas?: bigint;
2274
+ gasPrice?: bigint;
2275
+ maxFeePerGas?: bigint;
2276
+ maxPriorityFeePerGas?: bigint;
2277
+ nonce?: number;
2278
+ value?: bigint;
2279
+ }): Promise<void> {
2280
+ return contract.simulate.reinitializeAdminRole(options) as Promise<void>;
2281
+ },
2282
+ /**
2283
+ * Simulate removeMinter
2284
+ * Returns gas estimate and result without sending transaction
2285
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2286
+ */
2287
+ async removeMinter(minter: `0x${string}`, options?: {
2288
+ accessList?: import('viem').AccessList;
2289
+ authorizationList?: import('viem').AuthorizationList;
2290
+ chain?: import('viem').Chain | null;
2291
+ dataSuffix?: `0x${string}`;
2292
+ gas?: bigint;
2293
+ gasPrice?: bigint;
2294
+ maxFeePerGas?: bigint;
2295
+ maxPriorityFeePerGas?: bigint;
2296
+ nonce?: number;
2297
+ value?: bigint;
2298
+ }): Promise<void> {
2299
+ return contract.simulate.removeMinter([minter] as const, options) as Promise<void>;
2300
+ },
2301
+ /**
2302
+ * Simulate renounceRole
2303
+ * Returns gas estimate and result without sending transaction
2304
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2305
+ */
2306
+ async renounceRole(role: `0x${string}`, callerConfirmation: `0x${string}`, options?: {
2307
+ accessList?: import('viem').AccessList;
2308
+ authorizationList?: import('viem').AuthorizationList;
2309
+ chain?: import('viem').Chain | null;
2310
+ dataSuffix?: `0x${string}`;
2311
+ gas?: bigint;
2312
+ gasPrice?: bigint;
2313
+ maxFeePerGas?: bigint;
2314
+ maxPriorityFeePerGas?: bigint;
2315
+ nonce?: number;
2316
+ value?: bigint;
2317
+ }): Promise<void> {
2318
+ return contract.simulate.renounceRole([role, callerConfirmation] as const, options) as Promise<void>;
2319
+ },
2320
+ /**
2321
+ * Simulate revokeRole
2322
+ * Returns gas estimate and result without sending transaction
2323
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2324
+ */
2325
+ async revokeRole(role: `0x${string}`, account: `0x${string}`, options?: {
2326
+ accessList?: import('viem').AccessList;
2327
+ authorizationList?: import('viem').AuthorizationList;
2328
+ chain?: import('viem').Chain | null;
2329
+ dataSuffix?: `0x${string}`;
2330
+ gas?: bigint;
2331
+ gasPrice?: bigint;
2332
+ maxFeePerGas?: bigint;
2333
+ maxPriorityFeePerGas?: bigint;
2334
+ nonce?: number;
2335
+ value?: bigint;
2336
+ }): Promise<void> {
2337
+ return contract.simulate.revokeRole([role, account] as const, options) as Promise<void>;
2338
+ },
2339
+ /**
2340
+ * Simulate transfer
2341
+ * Returns gas estimate and result without sending transaction
2342
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2343
+ */
2344
+ async transfer(to: `0x${string}`, value: bigint, options?: {
2345
+ accessList?: import('viem').AccessList;
2346
+ authorizationList?: import('viem').AuthorizationList;
2347
+ chain?: import('viem').Chain | null;
2348
+ dataSuffix?: `0x${string}`;
2349
+ gas?: bigint;
2350
+ gasPrice?: bigint;
2351
+ maxFeePerGas?: bigint;
2352
+ maxPriorityFeePerGas?: bigint;
2353
+ nonce?: number;
2354
+ value?: bigint;
2355
+ }): Promise<boolean> {
2356
+ return contract.simulate.transfer([to, value] as const, options) as Promise<boolean>;
2357
+ },
2358
+ /**
2359
+ * Simulate transferFrom
2360
+ * Returns gas estimate and result without sending transaction
2361
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2362
+ */
2363
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
2364
+ accessList?: import('viem').AccessList;
2365
+ authorizationList?: import('viem').AuthorizationList;
2366
+ chain?: import('viem').Chain | null;
2367
+ dataSuffix?: `0x${string}`;
2368
+ gas?: bigint;
2369
+ gasPrice?: bigint;
2370
+ maxFeePerGas?: bigint;
2371
+ maxPriorityFeePerGas?: bigint;
2372
+ nonce?: number;
2373
+ value?: bigint;
2374
+ }): Promise<boolean> {
2375
+ return contract.simulate.transferFrom([from, to, value] as const, options) as Promise<boolean>;
2376
+ },
2377
+ /**
2378
+ * Simulate unfreeze
2379
+ * Returns gas estimate and result without sending transaction
2380
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2381
+ */
2382
+ async unfreeze(account: `0x${string}`, options?: {
2383
+ accessList?: import('viem').AccessList;
2384
+ authorizationList?: import('viem').AuthorizationList;
2385
+ chain?: import('viem').Chain | null;
2386
+ dataSuffix?: `0x${string}`;
2387
+ gas?: bigint;
2388
+ gasPrice?: bigint;
2389
+ maxFeePerGas?: bigint;
2390
+ maxPriorityFeePerGas?: bigint;
2391
+ nonce?: number;
2392
+ value?: bigint;
2393
+ }): Promise<void> {
2394
+ return contract.simulate.unfreeze([account] as const, options) as Promise<void>;
2395
+ },
2396
+ /**
2397
+ * Simulate unpause
2398
+ * Returns gas estimate and result without sending transaction
2399
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2400
+ */
2401
+ async unpause(options?: {
2402
+ accessList?: import('viem').AccessList;
2403
+ authorizationList?: import('viem').AuthorizationList;
2404
+ chain?: import('viem').Chain | null;
2405
+ dataSuffix?: `0x${string}`;
2406
+ gas?: bigint;
2407
+ gasPrice?: bigint;
2408
+ maxFeePerGas?: bigint;
2409
+ maxPriorityFeePerGas?: bigint;
2410
+ nonce?: number;
2411
+ value?: bigint;
2412
+ }): Promise<void> {
2413
+ return contract.simulate.unpause(options) as Promise<void>;
2414
+ },
2415
+ /**
2416
+ * Simulate upgradeToAndCall
2417
+ * Returns gas estimate and result without sending transaction
2418
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2419
+ */
2420
+ async upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
2421
+ accessList?: import('viem').AccessList;
2422
+ authorizationList?: import('viem').AuthorizationList;
2423
+ chain?: import('viem').Chain | null;
2424
+ dataSuffix?: `0x${string}`;
2425
+ gas?: bigint;
2426
+ gasPrice?: bigint;
2427
+ maxFeePerGas?: bigint;
2428
+ maxPriorityFeePerGas?: bigint;
2429
+ nonce?: number;
2430
+ value?: bigint;
2431
+ }): Promise<void> {
2432
+ return contract.simulate.upgradeToAndCall([newImplementation, data] as const, options) as Promise<void>;
2433
+ }
2434
+ };
2435
+ }
2436
+
2437
+ /**
2438
+ * Watch contract events
2439
+ *
2440
+ * @example
2441
+ * // Watch all Transfer events
2442
+ * const unwatch = contract.watch.Transfer((event) => {
2443
+ * console.log('Transfer:', event);
2444
+ * });
2445
+ *
2446
+ * // Stop watching
2447
+ * unwatch();
2448
+ */
2449
+ get watch() {
2450
+ return {
2451
+ /**
2452
+ * Watch AccountFrozen events
2453
+ * @param callback Function to call when event is emitted
2454
+ * @param filter Optional filter for indexed parameters
2455
+ * @returns Unwatch function to stop listening
2456
+ */
2457
+ AccountFrozen: (callback: (event: { account: `0x${string}` }) => void, filter?: { account?: `0x${string}` | `0x${string}`[] | null }) => {
2458
+ return this.publicClient.watchContractEvent({
2459
+ address: this.contractAddress,
2460
+ abi: StablecoinAbi,
2461
+ eventName: 'AccountFrozen',
2462
+ args: filter as any,
2463
+ onLogs: (logs: any[]) => {
2464
+ logs.forEach((log: any) => {
2465
+ callback(log.args as any);
2466
+ });
2467
+ },
2468
+ }) as () => void;
2469
+ },
2470
+ /**
2471
+ * Watch AccountUnfrozen events
2472
+ * @param callback Function to call when event is emitted
2473
+ * @param filter Optional filter for indexed parameters
2474
+ * @returns Unwatch function to stop listening
2475
+ */
2476
+ AccountUnfrozen: (callback: (event: { account: `0x${string}` }) => void, filter?: { account?: `0x${string}` | `0x${string}`[] | null }) => {
2477
+ return this.publicClient.watchContractEvent({
2478
+ address: this.contractAddress,
2479
+ abi: StablecoinAbi,
2480
+ eventName: 'AccountUnfrozen',
2481
+ args: filter as any,
2482
+ onLogs: (logs: any[]) => {
2483
+ logs.forEach((log: any) => {
2484
+ callback(log.args as any);
2485
+ });
2486
+ },
2487
+ }) as () => void;
2488
+ },
2489
+ /**
2490
+ * Watch Approval events
2491
+ * @param callback Function to call when event is emitted
2492
+ * @param filter Optional filter for indexed parameters
2493
+ * @returns Unwatch function to stop listening
2494
+ */
2495
+ 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 }) => {
2496
+ return this.publicClient.watchContractEvent({
2497
+ address: this.contractAddress,
2498
+ abi: StablecoinAbi,
2499
+ eventName: 'Approval',
2500
+ args: filter as any,
2501
+ onLogs: (logs: any[]) => {
2502
+ logs.forEach((log: any) => {
2503
+ callback(log.args as any);
2504
+ });
2505
+ },
2506
+ }) as () => void;
2507
+ },
2508
+ /**
2509
+ * Watch Initialized events
2510
+ * @param callback Function to call when event is emitted
2511
+ * @param filter Optional filter for indexed parameters
2512
+ * @returns Unwatch function to stop listening
2513
+ */
2514
+ Initialized: (callback: (event: { version: bigint }) => void) => {
2515
+ return this.publicClient.watchContractEvent({
2516
+ address: this.contractAddress,
2517
+ abi: StablecoinAbi,
2518
+ eventName: 'Initialized',
2519
+
2520
+ onLogs: (logs: any[]) => {
2521
+ logs.forEach((log: any) => {
2522
+ callback(log.args as any);
2523
+ });
2524
+ },
2525
+ }) as () => void;
2526
+ },
2527
+ /**
2528
+ * Watch MinterAdded events
2529
+ * @param callback Function to call when event is emitted
2530
+ * @param filter Optional filter for indexed parameters
2531
+ * @returns Unwatch function to stop listening
2532
+ */
2533
+ MinterAdded: (callback: (event: { minter: `0x${string}`; allowance: bigint }) => void, filter?: { minter?: `0x${string}` | `0x${string}`[] | null }) => {
2534
+ return this.publicClient.watchContractEvent({
2535
+ address: this.contractAddress,
2536
+ abi: StablecoinAbi,
2537
+ eventName: 'MinterAdded',
2538
+ args: filter as any,
2539
+ onLogs: (logs: any[]) => {
2540
+ logs.forEach((log: any) => {
2541
+ callback(log.args as any);
2542
+ });
2543
+ },
2544
+ }) as () => void;
2545
+ },
2546
+ /**
2547
+ * Watch MinterAllowanceChanged events
2548
+ * @param callback Function to call when event is emitted
2549
+ * @param filter Optional filter for indexed parameters
2550
+ * @returns Unwatch function to stop listening
2551
+ */
2552
+ MinterAllowanceChanged: (callback: (event: { minter: `0x${string}`; oldAllowance: bigint; newAllowance: bigint }) => void, filter?: { minter?: `0x${string}` | `0x${string}`[] | null }) => {
2553
+ return this.publicClient.watchContractEvent({
2554
+ address: this.contractAddress,
2555
+ abi: StablecoinAbi,
2556
+ eventName: 'MinterAllowanceChanged',
2557
+ args: filter as any,
2558
+ onLogs: (logs: any[]) => {
2559
+ logs.forEach((log: any) => {
2560
+ callback(log.args as any);
2561
+ });
2562
+ },
2563
+ }) as () => void;
2564
+ },
2565
+ /**
2566
+ * Watch MinterRemoved events
2567
+ * @param callback Function to call when event is emitted
2568
+ * @param filter Optional filter for indexed parameters
2569
+ * @returns Unwatch function to stop listening
2570
+ */
2571
+ MinterRemoved: (callback: (event: { minter: `0x${string}` }) => void, filter?: { minter?: `0x${string}` | `0x${string}`[] | null }) => {
2572
+ return this.publicClient.watchContractEvent({
2573
+ address: this.contractAddress,
2574
+ abi: StablecoinAbi,
2575
+ eventName: 'MinterRemoved',
2576
+ args: filter as any,
2577
+ onLogs: (logs: any[]) => {
2578
+ logs.forEach((log: any) => {
2579
+ callback(log.args as any);
2580
+ });
2581
+ },
2582
+ }) as () => void;
2583
+ },
2584
+ /**
2585
+ * Watch Paused events
2586
+ * @param callback Function to call when event is emitted
2587
+ * @param filter Optional filter for indexed parameters
2588
+ * @returns Unwatch function to stop listening
2589
+ */
2590
+ Paused: (callback: (event: { account: `0x${string}` }) => void) => {
2591
+ return this.publicClient.watchContractEvent({
2592
+ address: this.contractAddress,
2593
+ abi: StablecoinAbi,
2594
+ eventName: 'Paused',
2595
+
2596
+ onLogs: (logs: any[]) => {
2597
+ logs.forEach((log: any) => {
2598
+ callback(log.args as any);
2599
+ });
2600
+ },
2601
+ }) as () => void;
2602
+ },
2603
+ /**
2604
+ * Watch RoleAdminChanged events
2605
+ * @param callback Function to call when event is emitted
2606
+ * @param filter Optional filter for indexed parameters
2607
+ * @returns Unwatch function to stop listening
2608
+ */
2609
+ RoleAdminChanged: (callback: (event: { role: `0x${string}`; previousAdminRole: `0x${string}`; newAdminRole: `0x${string}` }) => void, filter?: { role?: `0x${string}` | `0x${string}`[] | null; previousAdminRole?: `0x${string}` | `0x${string}`[] | null; newAdminRole?: `0x${string}` | `0x${string}`[] | null }) => {
2610
+ return this.publicClient.watchContractEvent({
2611
+ address: this.contractAddress,
2612
+ abi: StablecoinAbi,
2613
+ eventName: 'RoleAdminChanged',
2614
+ args: filter as any,
2615
+ onLogs: (logs: any[]) => {
2616
+ logs.forEach((log: any) => {
2617
+ callback(log.args as any);
2618
+ });
2619
+ },
2620
+ }) as () => void;
2621
+ },
2622
+ /**
2623
+ * Watch RoleGranted events
2624
+ * @param callback Function to call when event is emitted
2625
+ * @param filter Optional filter for indexed parameters
2626
+ * @returns Unwatch function to stop listening
2627
+ */
2628
+ RoleGranted: (callback: (event: { role: `0x${string}`; account: `0x${string}`; sender: `0x${string}` }) => void, filter?: { role?: `0x${string}` | `0x${string}`[] | null; account?: `0x${string}` | `0x${string}`[] | null; sender?: `0x${string}` | `0x${string}`[] | null }) => {
2629
+ return this.publicClient.watchContractEvent({
2630
+ address: this.contractAddress,
2631
+ abi: StablecoinAbi,
2632
+ eventName: 'RoleGranted',
2633
+ args: filter as any,
2634
+ onLogs: (logs: any[]) => {
2635
+ logs.forEach((log: any) => {
2636
+ callback(log.args as any);
2637
+ });
2638
+ },
2639
+ }) as () => void;
2640
+ },
2641
+ /**
2642
+ * Watch RoleRevoked events
2643
+ * @param callback Function to call when event is emitted
2644
+ * @param filter Optional filter for indexed parameters
2645
+ * @returns Unwatch function to stop listening
2646
+ */
2647
+ RoleRevoked: (callback: (event: { role: `0x${string}`; account: `0x${string}`; sender: `0x${string}` }) => void, filter?: { role?: `0x${string}` | `0x${string}`[] | null; account?: `0x${string}` | `0x${string}`[] | null; sender?: `0x${string}` | `0x${string}`[] | null }) => {
2648
+ return this.publicClient.watchContractEvent({
2649
+ address: this.contractAddress,
2650
+ abi: StablecoinAbi,
2651
+ eventName: 'RoleRevoked',
2652
+ args: filter as any,
2653
+ onLogs: (logs: any[]) => {
2654
+ logs.forEach((log: any) => {
2655
+ callback(log.args as any);
2656
+ });
2657
+ },
2658
+ }) as () => void;
2659
+ },
2660
+ /**
2661
+ * Watch Transfer events
2662
+ * @param callback Function to call when event is emitted
2663
+ * @param filter Optional filter for indexed parameters
2664
+ * @returns Unwatch function to stop listening
2665
+ */
2666
+ 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 }) => {
2667
+ return this.publicClient.watchContractEvent({
2668
+ address: this.contractAddress,
2669
+ abi: StablecoinAbi,
2670
+ eventName: 'Transfer',
2671
+ args: filter as any,
2672
+ onLogs: (logs: any[]) => {
2673
+ logs.forEach((log: any) => {
2674
+ callback(log.args as any);
2675
+ });
2676
+ },
2677
+ }) as () => void;
2678
+ },
2679
+ /**
2680
+ * Watch Unpaused events
2681
+ * @param callback Function to call when event is emitted
2682
+ * @param filter Optional filter for indexed parameters
2683
+ * @returns Unwatch function to stop listening
2684
+ */
2685
+ Unpaused: (callback: (event: { account: `0x${string}` }) => void) => {
2686
+ return this.publicClient.watchContractEvent({
2687
+ address: this.contractAddress,
2688
+ abi: StablecoinAbi,
2689
+ eventName: 'Unpaused',
2690
+
2691
+ onLogs: (logs: any[]) => {
2692
+ logs.forEach((log: any) => {
2693
+ callback(log.args as any);
2694
+ });
2695
+ },
2696
+ }) as () => void;
2697
+ },
2698
+ /**
2699
+ * Watch Upgraded events
2700
+ * @param callback Function to call when event is emitted
2701
+ * @param filter Optional filter for indexed parameters
2702
+ * @returns Unwatch function to stop listening
2703
+ */
2704
+ Upgraded: (callback: (event: { implementation: `0x${string}` }) => void, filter?: { implementation?: `0x${string}` | `0x${string}`[] | null }) => {
2705
+ return this.publicClient.watchContractEvent({
2706
+ address: this.contractAddress,
2707
+ abi: StablecoinAbi,
2708
+ eventName: 'Upgraded',
2709
+ args: filter as any,
2710
+ onLogs: (logs: any[]) => {
2711
+ logs.forEach((log: any) => {
2712
+ callback(log.args as any);
2713
+ });
2714
+ },
2715
+ }) as () => void;
2716
+ }
2717
+ };
2718
+ }
2719
+ }