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