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