@gitmyabi-stg/srusde 0.0.1

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