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