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