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