@gitmyabi-stg/frax 0.0.1

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