@gitmyabi/yspendle-lpt 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,1575 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PendleLPCompounder_json = exports.PendleLPCompounder_jsonAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * PendleLPCompounder_json ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.PendleLPCompounder_jsonAbi = [
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "address",
15
+ "name": "_asset",
16
+ "type": "address"
17
+ },
18
+ {
19
+ "internalType": "address",
20
+ "name": "_pendleStaking",
21
+ "type": "address"
22
+ },
23
+ {
24
+ "internalType": "address",
25
+ "name": "_PENDLE",
26
+ "type": "address"
27
+ },
28
+ {
29
+ "internalType": "uint24",
30
+ "name": "_feePENDLEtoBase",
31
+ "type": "uint24"
32
+ },
33
+ {
34
+ "internalType": "address",
35
+ "name": "_base",
36
+ "type": "address"
37
+ },
38
+ {
39
+ "internalType": "uint24",
40
+ "name": "_feeBaseToTargetToken",
41
+ "type": "uint24"
42
+ },
43
+ {
44
+ "internalType": "address",
45
+ "name": "_targetToken",
46
+ "type": "address"
47
+ },
48
+ {
49
+ "internalType": "address",
50
+ "name": "_GOV",
51
+ "type": "address"
52
+ },
53
+ {
54
+ "internalType": "string",
55
+ "name": "_name",
56
+ "type": "string"
57
+ }
58
+ ],
59
+ "stateMutability": "nonpayable",
60
+ "type": "constructor"
61
+ },
62
+ {
63
+ "stateMutability": "nonpayable",
64
+ "type": "fallback"
65
+ },
66
+ {
67
+ "inputs": [],
68
+ "name": "GOV",
69
+ "outputs": [
70
+ {
71
+ "internalType": "address",
72
+ "name": "",
73
+ "type": "address"
74
+ }
75
+ ],
76
+ "stateMutability": "view",
77
+ "type": "function"
78
+ },
79
+ {
80
+ "inputs": [
81
+ {
82
+ "internalType": "address",
83
+ "name": "_rewardToken",
84
+ "type": "address"
85
+ },
86
+ {
87
+ "internalType": "uint24",
88
+ "name": "_feeRewardTokenToBase",
89
+ "type": "uint24"
90
+ }
91
+ ],
92
+ "name": "addReward",
93
+ "outputs": [],
94
+ "stateMutability": "nonpayable",
95
+ "type": "function"
96
+ },
97
+ {
98
+ "inputs": [],
99
+ "name": "auction",
100
+ "outputs": [
101
+ {
102
+ "internalType": "address",
103
+ "name": "",
104
+ "type": "address"
105
+ }
106
+ ],
107
+ "stateMutability": "view",
108
+ "type": "function"
109
+ },
110
+ {
111
+ "inputs": [],
112
+ "name": "auctionFactory",
113
+ "outputs": [
114
+ {
115
+ "internalType": "address",
116
+ "name": "",
117
+ "type": "address"
118
+ }
119
+ ],
120
+ "stateMutability": "view",
121
+ "type": "function"
122
+ },
123
+ {
124
+ "inputs": [
125
+ {
126
+ "internalType": "address",
127
+ "name": "_token",
128
+ "type": "address"
129
+ }
130
+ ],
131
+ "name": "auctionKicked",
132
+ "outputs": [
133
+ {
134
+ "internalType": "uint256",
135
+ "name": "",
136
+ "type": "uint256"
137
+ }
138
+ ],
139
+ "stateMutability": "nonpayable",
140
+ "type": "function"
141
+ },
142
+ {
143
+ "inputs": [],
144
+ "name": "autocompound",
145
+ "outputs": [
146
+ {
147
+ "internalType": "bool",
148
+ "name": "",
149
+ "type": "bool"
150
+ }
151
+ ],
152
+ "stateMutability": "view",
153
+ "type": "function"
154
+ },
155
+ {
156
+ "inputs": [
157
+ {
158
+ "internalType": "address",
159
+ "name": "",
160
+ "type": "address"
161
+ }
162
+ ],
163
+ "name": "availableDepositLimit",
164
+ "outputs": [
165
+ {
166
+ "internalType": "uint256",
167
+ "name": "",
168
+ "type": "uint256"
169
+ }
170
+ ],
171
+ "stateMutability": "view",
172
+ "type": "function"
173
+ },
174
+ {
175
+ "inputs": [
176
+ {
177
+ "internalType": "address",
178
+ "name": "",
179
+ "type": "address"
180
+ }
181
+ ],
182
+ "name": "availableWithdrawLimit",
183
+ "outputs": [
184
+ {
185
+ "internalType": "uint256",
186
+ "name": "",
187
+ "type": "uint256"
188
+ }
189
+ ],
190
+ "stateMutability": "view",
191
+ "type": "function"
192
+ },
193
+ {
194
+ "inputs": [],
195
+ "name": "balanceAsset",
196
+ "outputs": [
197
+ {
198
+ "internalType": "uint256",
199
+ "name": "",
200
+ "type": "uint256"
201
+ }
202
+ ],
203
+ "stateMutability": "view",
204
+ "type": "function"
205
+ },
206
+ {
207
+ "inputs": [],
208
+ "name": "balanceStaked",
209
+ "outputs": [
210
+ {
211
+ "internalType": "uint256",
212
+ "name": "",
213
+ "type": "uint256"
214
+ }
215
+ ],
216
+ "stateMutability": "view",
217
+ "type": "function"
218
+ },
219
+ {
220
+ "inputs": [],
221
+ "name": "base",
222
+ "outputs": [
223
+ {
224
+ "internalType": "address",
225
+ "name": "",
226
+ "type": "address"
227
+ }
228
+ ],
229
+ "stateMutability": "view",
230
+ "type": "function"
231
+ },
232
+ {
233
+ "inputs": [],
234
+ "name": "claimRewards",
235
+ "outputs": [],
236
+ "stateMutability": "nonpayable",
237
+ "type": "function"
238
+ },
239
+ {
240
+ "inputs": [
241
+ {
242
+ "internalType": "uint256",
243
+ "name": "_amount",
244
+ "type": "uint256"
245
+ }
246
+ ],
247
+ "name": "deployFunds",
248
+ "outputs": [],
249
+ "stateMutability": "nonpayable",
250
+ "type": "function"
251
+ },
252
+ {
253
+ "inputs": [],
254
+ "name": "doHealthCheck",
255
+ "outputs": [
256
+ {
257
+ "internalType": "bool",
258
+ "name": "",
259
+ "type": "bool"
260
+ }
261
+ ],
262
+ "stateMutability": "view",
263
+ "type": "function"
264
+ },
265
+ {
266
+ "inputs": [
267
+ {
268
+ "internalType": "uint256",
269
+ "name": "_amount",
270
+ "type": "uint256"
271
+ }
272
+ ],
273
+ "name": "freeFunds",
274
+ "outputs": [],
275
+ "stateMutability": "nonpayable",
276
+ "type": "function"
277
+ },
278
+ {
279
+ "inputs": [],
280
+ "name": "harvestAndReport",
281
+ "outputs": [
282
+ {
283
+ "internalType": "uint256",
284
+ "name": "_totalAssets",
285
+ "type": "uint256"
286
+ }
287
+ ],
288
+ "stateMutability": "nonpayable",
289
+ "type": "function"
290
+ },
291
+ {
292
+ "inputs": [],
293
+ "name": "isExpired",
294
+ "outputs": [
295
+ {
296
+ "internalType": "bool",
297
+ "name": "",
298
+ "type": "bool"
299
+ }
300
+ ],
301
+ "stateMutability": "view",
302
+ "type": "function"
303
+ },
304
+ {
305
+ "inputs": [
306
+ {
307
+ "internalType": "address",
308
+ "name": "_token",
309
+ "type": "address"
310
+ }
311
+ ],
312
+ "name": "kickable",
313
+ "outputs": [
314
+ {
315
+ "internalType": "uint256",
316
+ "name": "",
317
+ "type": "uint256"
318
+ }
319
+ ],
320
+ "stateMutability": "view",
321
+ "type": "function"
322
+ },
323
+ {
324
+ "inputs": [],
325
+ "name": "lossLimitRatio",
326
+ "outputs": [
327
+ {
328
+ "internalType": "uint256",
329
+ "name": "",
330
+ "type": "uint256"
331
+ }
332
+ ],
333
+ "stateMutability": "view",
334
+ "type": "function"
335
+ },
336
+ {
337
+ "inputs": [],
338
+ "name": "minAmountToSell",
339
+ "outputs": [
340
+ {
341
+ "internalType": "uint256",
342
+ "name": "",
343
+ "type": "uint256"
344
+ }
345
+ ],
346
+ "stateMutability": "view",
347
+ "type": "function"
348
+ },
349
+ {
350
+ "inputs": [
351
+ {
352
+ "internalType": "address",
353
+ "name": "",
354
+ "type": "address"
355
+ }
356
+ ],
357
+ "name": "minAmountToSellMapping",
358
+ "outputs": [
359
+ {
360
+ "internalType": "uint256",
361
+ "name": "",
362
+ "type": "uint256"
363
+ }
364
+ ],
365
+ "stateMutability": "view",
366
+ "type": "function"
367
+ },
368
+ {
369
+ "inputs": [
370
+ {
371
+ "internalType": "address",
372
+ "name": "_token",
373
+ "type": "address"
374
+ },
375
+ {
376
+ "internalType": "uint256",
377
+ "name": "_amountTaken",
378
+ "type": "uint256"
379
+ },
380
+ {
381
+ "internalType": "uint256",
382
+ "name": "_amountPayed",
383
+ "type": "uint256"
384
+ }
385
+ ],
386
+ "name": "postTake",
387
+ "outputs": [],
388
+ "stateMutability": "nonpayable",
389
+ "type": "function"
390
+ },
391
+ {
392
+ "inputs": [
393
+ {
394
+ "internalType": "address",
395
+ "name": "_token",
396
+ "type": "address"
397
+ },
398
+ {
399
+ "internalType": "uint256",
400
+ "name": "_amountToTake",
401
+ "type": "uint256"
402
+ },
403
+ {
404
+ "internalType": "uint256",
405
+ "name": "_amountToPay",
406
+ "type": "uint256"
407
+ }
408
+ ],
409
+ "name": "preTake",
410
+ "outputs": [],
411
+ "stateMutability": "nonpayable",
412
+ "type": "function"
413
+ },
414
+ {
415
+ "inputs": [],
416
+ "name": "profitLimitRatio",
417
+ "outputs": [
418
+ {
419
+ "internalType": "uint256",
420
+ "name": "",
421
+ "type": "uint256"
422
+ }
423
+ ],
424
+ "stateMutability": "view",
425
+ "type": "function"
426
+ },
427
+ {
428
+ "inputs": [
429
+ {
430
+ "internalType": "address",
431
+ "name": "_rewardToken",
432
+ "type": "address"
433
+ }
434
+ ],
435
+ "name": "removeReward",
436
+ "outputs": [],
437
+ "stateMutability": "nonpayable",
438
+ "type": "function"
439
+ },
440
+ {
441
+ "inputs": [],
442
+ "name": "removeTradeFactory",
443
+ "outputs": [],
444
+ "stateMutability": "nonpayable",
445
+ "type": "function"
446
+ },
447
+ {
448
+ "inputs": [],
449
+ "name": "rewardTokens",
450
+ "outputs": [
451
+ {
452
+ "internalType": "address[]",
453
+ "name": "",
454
+ "type": "address[]"
455
+ }
456
+ ],
457
+ "stateMutability": "view",
458
+ "type": "function"
459
+ },
460
+ {
461
+ "inputs": [],
462
+ "name": "router",
463
+ "outputs": [
464
+ {
465
+ "internalType": "address",
466
+ "name": "",
467
+ "type": "address"
468
+ }
469
+ ],
470
+ "stateMutability": "view",
471
+ "type": "function"
472
+ },
473
+ {
474
+ "inputs": [],
475
+ "name": "routerParams",
476
+ "outputs": [
477
+ {
478
+ "internalType": "uint256",
479
+ "name": "guessMin",
480
+ "type": "uint256"
481
+ },
482
+ {
483
+ "internalType": "uint256",
484
+ "name": "guessMax",
485
+ "type": "uint256"
486
+ },
487
+ {
488
+ "internalType": "uint256",
489
+ "name": "guessOffchain",
490
+ "type": "uint256"
491
+ },
492
+ {
493
+ "internalType": "uint256",
494
+ "name": "maxIteration",
495
+ "type": "uint256"
496
+ },
497
+ {
498
+ "internalType": "uint256",
499
+ "name": "eps",
500
+ "type": "uint256"
501
+ }
502
+ ],
503
+ "stateMutability": "view",
504
+ "type": "function"
505
+ },
506
+ {
507
+ "inputs": [
508
+ {
509
+ "internalType": "address",
510
+ "name": "_auction",
511
+ "type": "address"
512
+ }
513
+ ],
514
+ "name": "setAuction",
515
+ "outputs": [],
516
+ "stateMutability": "nonpayable",
517
+ "type": "function"
518
+ },
519
+ {
520
+ "inputs": [
521
+ {
522
+ "internalType": "bool",
523
+ "name": "_autocompound",
524
+ "type": "bool"
525
+ }
526
+ ],
527
+ "name": "setAutocompound",
528
+ "outputs": [],
529
+ "stateMutability": "nonpayable",
530
+ "type": "function"
531
+ },
532
+ {
533
+ "inputs": [
534
+ {
535
+ "internalType": "bool",
536
+ "name": "_doHealthCheck",
537
+ "type": "bool"
538
+ }
539
+ ],
540
+ "name": "setDoHealthCheck",
541
+ "outputs": [],
542
+ "stateMutability": "nonpayable",
543
+ "type": "function"
544
+ },
545
+ {
546
+ "inputs": [
547
+ {
548
+ "internalType": "uint256",
549
+ "name": "_newLossLimitRatio",
550
+ "type": "uint256"
551
+ }
552
+ ],
553
+ "name": "setLossLimitRatio",
554
+ "outputs": [],
555
+ "stateMutability": "nonpayable",
556
+ "type": "function"
557
+ },
558
+ {
559
+ "inputs": [
560
+ {
561
+ "internalType": "address",
562
+ "name": "_token",
563
+ "type": "address"
564
+ },
565
+ {
566
+ "internalType": "uint256",
567
+ "name": "_amount",
568
+ "type": "uint256"
569
+ }
570
+ ],
571
+ "name": "setMinAmountToSellMapping",
572
+ "outputs": [],
573
+ "stateMutability": "nonpayable",
574
+ "type": "function"
575
+ },
576
+ {
577
+ "inputs": [
578
+ {
579
+ "internalType": "uint256",
580
+ "name": "_newProfitLimitRatio",
581
+ "type": "uint256"
582
+ }
583
+ ],
584
+ "name": "setProfitLimitRatio",
585
+ "outputs": [],
586
+ "stateMutability": "nonpayable",
587
+ "type": "function"
588
+ },
589
+ {
590
+ "inputs": [
591
+ {
592
+ "internalType": "uint256",
593
+ "name": "_guessMin",
594
+ "type": "uint256"
595
+ },
596
+ {
597
+ "internalType": "uint256",
598
+ "name": "_guessMax",
599
+ "type": "uint256"
600
+ },
601
+ {
602
+ "internalType": "uint256",
603
+ "name": "_maxIteration",
604
+ "type": "uint256"
605
+ },
606
+ {
607
+ "internalType": "uint256",
608
+ "name": "_eps",
609
+ "type": "uint256"
610
+ }
611
+ ],
612
+ "name": "setRouterParams",
613
+ "outputs": [],
614
+ "stateMutability": "nonpayable",
615
+ "type": "function"
616
+ },
617
+ {
618
+ "inputs": [
619
+ {
620
+ "internalType": "address",
621
+ "name": "_tradeFactory",
622
+ "type": "address"
623
+ },
624
+ {
625
+ "internalType": "bool",
626
+ "name": "_useTradeFactory",
627
+ "type": "bool"
628
+ }
629
+ ],
630
+ "name": "setTradeFactory",
631
+ "outputs": [],
632
+ "stateMutability": "nonpayable",
633
+ "type": "function"
634
+ },
635
+ {
636
+ "inputs": [
637
+ {
638
+ "internalType": "address",
639
+ "name": "_token0",
640
+ "type": "address"
641
+ },
642
+ {
643
+ "internalType": "address",
644
+ "name": "_token1",
645
+ "type": "address"
646
+ },
647
+ {
648
+ "internalType": "uint24",
649
+ "name": "_fee",
650
+ "type": "uint24"
651
+ }
652
+ ],
653
+ "name": "setUniFees",
654
+ "outputs": [],
655
+ "stateMutability": "nonpayable",
656
+ "type": "function"
657
+ },
658
+ {
659
+ "inputs": [
660
+ {
661
+ "internalType": "bool",
662
+ "name": "_useAuction",
663
+ "type": "bool"
664
+ }
665
+ ],
666
+ "name": "setUseAuction",
667
+ "outputs": [],
668
+ "stateMutability": "nonpayable",
669
+ "type": "function"
670
+ },
671
+ {
672
+ "inputs": [
673
+ {
674
+ "internalType": "bool",
675
+ "name": "_useTradeFactory",
676
+ "type": "bool"
677
+ }
678
+ ],
679
+ "name": "setUseTradeFactory",
680
+ "outputs": [],
681
+ "stateMutability": "nonpayable",
682
+ "type": "function"
683
+ },
684
+ {
685
+ "inputs": [
686
+ {
687
+ "internalType": "uint256",
688
+ "name": "_amount",
689
+ "type": "uint256"
690
+ }
691
+ ],
692
+ "name": "shutdownWithdraw",
693
+ "outputs": [],
694
+ "stateMutability": "nonpayable",
695
+ "type": "function"
696
+ },
697
+ {
698
+ "inputs": [
699
+ {
700
+ "internalType": "address",
701
+ "name": "_token",
702
+ "type": "address"
703
+ }
704
+ ],
705
+ "name": "sweep",
706
+ "outputs": [],
707
+ "stateMutability": "nonpayable",
708
+ "type": "function"
709
+ },
710
+ {
711
+ "inputs": [],
712
+ "name": "targetToken",
713
+ "outputs": [
714
+ {
715
+ "internalType": "address",
716
+ "name": "",
717
+ "type": "address"
718
+ }
719
+ ],
720
+ "stateMutability": "view",
721
+ "type": "function"
722
+ },
723
+ {
724
+ "inputs": [
725
+ {
726
+ "internalType": "uint256",
727
+ "name": "_totalIdle",
728
+ "type": "uint256"
729
+ }
730
+ ],
731
+ "name": "tendThis",
732
+ "outputs": [],
733
+ "stateMutability": "nonpayable",
734
+ "type": "function"
735
+ },
736
+ {
737
+ "inputs": [],
738
+ "name": "tendTrigger",
739
+ "outputs": [
740
+ {
741
+ "internalType": "bool",
742
+ "name": "",
743
+ "type": "bool"
744
+ },
745
+ {
746
+ "internalType": "bytes",
747
+ "name": "",
748
+ "type": "bytes"
749
+ }
750
+ ],
751
+ "stateMutability": "view",
752
+ "type": "function"
753
+ },
754
+ {
755
+ "inputs": [],
756
+ "name": "tokenizedStrategyAddress",
757
+ "outputs": [
758
+ {
759
+ "internalType": "address",
760
+ "name": "",
761
+ "type": "address"
762
+ }
763
+ ],
764
+ "stateMutability": "view",
765
+ "type": "function"
766
+ },
767
+ {
768
+ "inputs": [],
769
+ "name": "tradeFactory",
770
+ "outputs": [
771
+ {
772
+ "internalType": "address",
773
+ "name": "",
774
+ "type": "address"
775
+ }
776
+ ],
777
+ "stateMutability": "view",
778
+ "type": "function"
779
+ },
780
+ {
781
+ "inputs": [
782
+ {
783
+ "internalType": "address",
784
+ "name": "",
785
+ "type": "address"
786
+ },
787
+ {
788
+ "internalType": "address",
789
+ "name": "",
790
+ "type": "address"
791
+ }
792
+ ],
793
+ "name": "uniFees",
794
+ "outputs": [
795
+ {
796
+ "internalType": "uint24",
797
+ "name": "",
798
+ "type": "uint24"
799
+ }
800
+ ],
801
+ "stateMutability": "view",
802
+ "type": "function"
803
+ },
804
+ {
805
+ "inputs": [],
806
+ "name": "unwrapTargetTokenToSY",
807
+ "outputs": [
808
+ {
809
+ "internalType": "bool",
810
+ "name": "",
811
+ "type": "bool"
812
+ }
813
+ ],
814
+ "stateMutability": "view",
815
+ "type": "function"
816
+ },
817
+ {
818
+ "inputs": [],
819
+ "name": "useAuction",
820
+ "outputs": [
821
+ {
822
+ "internalType": "bool",
823
+ "name": "",
824
+ "type": "bool"
825
+ }
826
+ ],
827
+ "stateMutability": "view",
828
+ "type": "function"
829
+ },
830
+ {
831
+ "inputs": [],
832
+ "name": "useTradeFactory",
833
+ "outputs": [
834
+ {
835
+ "internalType": "bool",
836
+ "name": "",
837
+ "type": "bool"
838
+ }
839
+ ],
840
+ "stateMutability": "view",
841
+ "type": "function"
842
+ },
843
+ {
844
+ "stateMutability": "payable",
845
+ "type": "receive"
846
+ }
847
+ ];
848
+ /**
849
+ * PendleLPCompounder_json Contract Class
850
+ *
851
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
852
+ *
853
+ * @example
854
+ * ```typescript
855
+ * import { createPublicClient, createWalletClient, http } from 'viem';
856
+ * import { mainnet } from 'viem/chains';
857
+ * import { PendleLPCompounder_json } from 'PendleLPCompounder_json';
858
+ *
859
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
860
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
861
+ *
862
+ * const contract = new PendleLPCompounder_json('0x...', { publicClient, walletClient });
863
+ *
864
+ * // Read functions
865
+ * const result = await contract.balanceOf('0x...');
866
+ *
867
+ * // Write functions
868
+ * const hash = await contract.transfer('0x...', 1000n);
869
+ *
870
+ * // Simulate transactions (dry-run)
871
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
872
+ * console.log('Gas estimate:', simulation.request.gas);
873
+ *
874
+ * // Watch events
875
+ * const unwatch = contract.watch.Transfer((event) => {
876
+ * console.log('Transfer event:', event);
877
+ * });
878
+ * ```
879
+ */
880
+ class PendleLPCompounder_json {
881
+ constructor(address, clients) {
882
+ this.contractAddress = address;
883
+ this.publicClient = clients.publicClient;
884
+ this.contract = (0, viem_1.getContract)({
885
+ address,
886
+ abi: exports.PendleLPCompounder_jsonAbi,
887
+ client: {
888
+ public: clients.publicClient,
889
+ wallet: clients.walletClient,
890
+ },
891
+ });
892
+ }
893
+ /**
894
+ * Get the contract address
895
+ */
896
+ get address() {
897
+ return this.contractAddress;
898
+ }
899
+ /**
900
+ * Get the underlying viem contract instance
901
+ */
902
+ getContract() {
903
+ return this.contract;
904
+ }
905
+ /**
906
+ * GOV
907
+ * view
908
+ */
909
+ async GOV() {
910
+ return this.contract.read.GOV();
911
+ }
912
+ /**
913
+ * auction
914
+ * view
915
+ */
916
+ async auction() {
917
+ return this.contract.read.auction();
918
+ }
919
+ /**
920
+ * auctionFactory
921
+ * view
922
+ */
923
+ async auctionFactory() {
924
+ return this.contract.read.auctionFactory();
925
+ }
926
+ /**
927
+ * autocompound
928
+ * view
929
+ */
930
+ async autocompound() {
931
+ return this.contract.read.autocompound();
932
+ }
933
+ /**
934
+ * availableDepositLimit
935
+ * view
936
+ */
937
+ async availableDepositLimit(arg0) {
938
+ return this.contract.read.availableDepositLimit([arg0]);
939
+ }
940
+ /**
941
+ * availableWithdrawLimit
942
+ * view
943
+ */
944
+ async availableWithdrawLimit(arg0) {
945
+ return this.contract.read.availableWithdrawLimit([arg0]);
946
+ }
947
+ /**
948
+ * balanceAsset
949
+ * view
950
+ */
951
+ async balanceAsset() {
952
+ return this.contract.read.balanceAsset();
953
+ }
954
+ /**
955
+ * balanceStaked
956
+ * view
957
+ */
958
+ async balanceStaked() {
959
+ return this.contract.read.balanceStaked();
960
+ }
961
+ /**
962
+ * base
963
+ * view
964
+ */
965
+ async base() {
966
+ return this.contract.read.base();
967
+ }
968
+ /**
969
+ * doHealthCheck
970
+ * view
971
+ */
972
+ async doHealthCheck() {
973
+ return this.contract.read.doHealthCheck();
974
+ }
975
+ /**
976
+ * isExpired
977
+ * view
978
+ */
979
+ async isExpired() {
980
+ return this.contract.read.isExpired();
981
+ }
982
+ /**
983
+ * kickable
984
+ * view
985
+ */
986
+ async kickable(_token) {
987
+ return this.contract.read.kickable([_token]);
988
+ }
989
+ /**
990
+ * lossLimitRatio
991
+ * view
992
+ */
993
+ async lossLimitRatio() {
994
+ return this.contract.read.lossLimitRatio();
995
+ }
996
+ /**
997
+ * minAmountToSell
998
+ * view
999
+ */
1000
+ async minAmountToSell() {
1001
+ return this.contract.read.minAmountToSell();
1002
+ }
1003
+ /**
1004
+ * minAmountToSellMapping
1005
+ * view
1006
+ */
1007
+ async minAmountToSellMapping(arg0) {
1008
+ return this.contract.read.minAmountToSellMapping([arg0]);
1009
+ }
1010
+ /**
1011
+ * profitLimitRatio
1012
+ * view
1013
+ */
1014
+ async profitLimitRatio() {
1015
+ return this.contract.read.profitLimitRatio();
1016
+ }
1017
+ /**
1018
+ * rewardTokens
1019
+ * view
1020
+ */
1021
+ async rewardTokens() {
1022
+ return this.contract.read.rewardTokens();
1023
+ }
1024
+ /**
1025
+ * router
1026
+ * view
1027
+ */
1028
+ async router() {
1029
+ return this.contract.read.router();
1030
+ }
1031
+ /**
1032
+ * routerParams
1033
+ * view
1034
+ */
1035
+ async routerParams() {
1036
+ return this.contract.read.routerParams();
1037
+ }
1038
+ /**
1039
+ * targetToken
1040
+ * view
1041
+ */
1042
+ async targetToken() {
1043
+ return this.contract.read.targetToken();
1044
+ }
1045
+ /**
1046
+ * tendTrigger
1047
+ * view
1048
+ */
1049
+ async tendTrigger() {
1050
+ return this.contract.read.tendTrigger();
1051
+ }
1052
+ /**
1053
+ * tokenizedStrategyAddress
1054
+ * view
1055
+ */
1056
+ async tokenizedStrategyAddress() {
1057
+ return this.contract.read.tokenizedStrategyAddress();
1058
+ }
1059
+ /**
1060
+ * tradeFactory
1061
+ * view
1062
+ */
1063
+ async tradeFactory() {
1064
+ return this.contract.read.tradeFactory();
1065
+ }
1066
+ /**
1067
+ * uniFees
1068
+ * view
1069
+ */
1070
+ async uniFees(arg0, arg1) {
1071
+ return this.contract.read.uniFees([arg0, arg1]);
1072
+ }
1073
+ /**
1074
+ * unwrapTargetTokenToSY
1075
+ * view
1076
+ */
1077
+ async unwrapTargetTokenToSY() {
1078
+ return this.contract.read.unwrapTargetTokenToSY();
1079
+ }
1080
+ /**
1081
+ * useAuction
1082
+ * view
1083
+ */
1084
+ async useAuction() {
1085
+ return this.contract.read.useAuction();
1086
+ }
1087
+ /**
1088
+ * useTradeFactory
1089
+ * view
1090
+ */
1091
+ async useTradeFactory() {
1092
+ return this.contract.read.useTradeFactory();
1093
+ }
1094
+ /**
1095
+ * addReward
1096
+ * nonpayable
1097
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1098
+ */
1099
+ async addReward(_rewardToken, _feeRewardTokenToBase, options) {
1100
+ if (!this.contract.write) {
1101
+ throw new Error('Wallet client is required for write operations');
1102
+ }
1103
+ return this.contract.write.addReward([_rewardToken, _feeRewardTokenToBase], options);
1104
+ }
1105
+ /**
1106
+ * auctionKicked
1107
+ * nonpayable
1108
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1109
+ */
1110
+ async auctionKicked(_token, options) {
1111
+ if (!this.contract.write) {
1112
+ throw new Error('Wallet client is required for write operations');
1113
+ }
1114
+ return this.contract.write.auctionKicked([_token], options);
1115
+ }
1116
+ /**
1117
+ * claimRewards
1118
+ * nonpayable
1119
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1120
+ */
1121
+ async claimRewards(options) {
1122
+ if (!this.contract.write) {
1123
+ throw new Error('Wallet client is required for write operations');
1124
+ }
1125
+ return this.contract.write.claimRewards(options);
1126
+ }
1127
+ /**
1128
+ * deployFunds
1129
+ * nonpayable
1130
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1131
+ */
1132
+ async deployFunds(_amount, options) {
1133
+ if (!this.contract.write) {
1134
+ throw new Error('Wallet client is required for write operations');
1135
+ }
1136
+ return this.contract.write.deployFunds([_amount], options);
1137
+ }
1138
+ /**
1139
+ * freeFunds
1140
+ * nonpayable
1141
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1142
+ */
1143
+ async freeFunds(_amount, options) {
1144
+ if (!this.contract.write) {
1145
+ throw new Error('Wallet client is required for write operations');
1146
+ }
1147
+ return this.contract.write.freeFunds([_amount], options);
1148
+ }
1149
+ /**
1150
+ * harvestAndReport
1151
+ * nonpayable
1152
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1153
+ */
1154
+ async harvestAndReport(options) {
1155
+ if (!this.contract.write) {
1156
+ throw new Error('Wallet client is required for write operations');
1157
+ }
1158
+ return this.contract.write.harvestAndReport(options);
1159
+ }
1160
+ /**
1161
+ * postTake
1162
+ * nonpayable
1163
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1164
+ */
1165
+ async postTake(_token, _amountTaken, _amountPayed, options) {
1166
+ if (!this.contract.write) {
1167
+ throw new Error('Wallet client is required for write operations');
1168
+ }
1169
+ return this.contract.write.postTake([_token, _amountTaken, _amountPayed], options);
1170
+ }
1171
+ /**
1172
+ * preTake
1173
+ * nonpayable
1174
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1175
+ */
1176
+ async preTake(_token, _amountToTake, _amountToPay, options) {
1177
+ if (!this.contract.write) {
1178
+ throw new Error('Wallet client is required for write operations');
1179
+ }
1180
+ return this.contract.write.preTake([_token, _amountToTake, _amountToPay], options);
1181
+ }
1182
+ /**
1183
+ * removeReward
1184
+ * nonpayable
1185
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1186
+ */
1187
+ async removeReward(_rewardToken, options) {
1188
+ if (!this.contract.write) {
1189
+ throw new Error('Wallet client is required for write operations');
1190
+ }
1191
+ return this.contract.write.removeReward([_rewardToken], options);
1192
+ }
1193
+ /**
1194
+ * removeTradeFactory
1195
+ * nonpayable
1196
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1197
+ */
1198
+ async removeTradeFactory(options) {
1199
+ if (!this.contract.write) {
1200
+ throw new Error('Wallet client is required for write operations');
1201
+ }
1202
+ return this.contract.write.removeTradeFactory(options);
1203
+ }
1204
+ /**
1205
+ * setAuction
1206
+ * nonpayable
1207
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1208
+ */
1209
+ async setAuction(_auction, options) {
1210
+ if (!this.contract.write) {
1211
+ throw new Error('Wallet client is required for write operations');
1212
+ }
1213
+ return this.contract.write.setAuction([_auction], options);
1214
+ }
1215
+ /**
1216
+ * setAutocompound
1217
+ * nonpayable
1218
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1219
+ */
1220
+ async setAutocompound(_autocompound, options) {
1221
+ if (!this.contract.write) {
1222
+ throw new Error('Wallet client is required for write operations');
1223
+ }
1224
+ return this.contract.write.setAutocompound([_autocompound], options);
1225
+ }
1226
+ /**
1227
+ * setDoHealthCheck
1228
+ * nonpayable
1229
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1230
+ */
1231
+ async setDoHealthCheck(_doHealthCheck, options) {
1232
+ if (!this.contract.write) {
1233
+ throw new Error('Wallet client is required for write operations');
1234
+ }
1235
+ return this.contract.write.setDoHealthCheck([_doHealthCheck], options);
1236
+ }
1237
+ /**
1238
+ * setLossLimitRatio
1239
+ * nonpayable
1240
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1241
+ */
1242
+ async setLossLimitRatio(_newLossLimitRatio, options) {
1243
+ if (!this.contract.write) {
1244
+ throw new Error('Wallet client is required for write operations');
1245
+ }
1246
+ return this.contract.write.setLossLimitRatio([_newLossLimitRatio], options);
1247
+ }
1248
+ /**
1249
+ * setMinAmountToSellMapping
1250
+ * nonpayable
1251
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1252
+ */
1253
+ async setMinAmountToSellMapping(_token, _amount, options) {
1254
+ if (!this.contract.write) {
1255
+ throw new Error('Wallet client is required for write operations');
1256
+ }
1257
+ return this.contract.write.setMinAmountToSellMapping([_token, _amount], options);
1258
+ }
1259
+ /**
1260
+ * setProfitLimitRatio
1261
+ * nonpayable
1262
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1263
+ */
1264
+ async setProfitLimitRatio(_newProfitLimitRatio, options) {
1265
+ if (!this.contract.write) {
1266
+ throw new Error('Wallet client is required for write operations');
1267
+ }
1268
+ return this.contract.write.setProfitLimitRatio([_newProfitLimitRatio], options);
1269
+ }
1270
+ /**
1271
+ * setRouterParams
1272
+ * nonpayable
1273
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1274
+ */
1275
+ async setRouterParams(_guessMin, _guessMax, _maxIteration, _eps, options) {
1276
+ if (!this.contract.write) {
1277
+ throw new Error('Wallet client is required for write operations');
1278
+ }
1279
+ return this.contract.write.setRouterParams([_guessMin, _guessMax, _maxIteration, _eps], options);
1280
+ }
1281
+ /**
1282
+ * setTradeFactory
1283
+ * nonpayable
1284
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1285
+ */
1286
+ async setTradeFactory(_tradeFactory, _useTradeFactory, options) {
1287
+ if (!this.contract.write) {
1288
+ throw new Error('Wallet client is required for write operations');
1289
+ }
1290
+ return this.contract.write.setTradeFactory([_tradeFactory, _useTradeFactory], options);
1291
+ }
1292
+ /**
1293
+ * setUniFees
1294
+ * nonpayable
1295
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1296
+ */
1297
+ async setUniFees(_token0, _token1, _fee, options) {
1298
+ if (!this.contract.write) {
1299
+ throw new Error('Wallet client is required for write operations');
1300
+ }
1301
+ return this.contract.write.setUniFees([_token0, _token1, _fee], options);
1302
+ }
1303
+ /**
1304
+ * setUseAuction
1305
+ * nonpayable
1306
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1307
+ */
1308
+ async setUseAuction(_useAuction, options) {
1309
+ if (!this.contract.write) {
1310
+ throw new Error('Wallet client is required for write operations');
1311
+ }
1312
+ return this.contract.write.setUseAuction([_useAuction], options);
1313
+ }
1314
+ /**
1315
+ * setUseTradeFactory
1316
+ * nonpayable
1317
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1318
+ */
1319
+ async setUseTradeFactory(_useTradeFactory, options) {
1320
+ if (!this.contract.write) {
1321
+ throw new Error('Wallet client is required for write operations');
1322
+ }
1323
+ return this.contract.write.setUseTradeFactory([_useTradeFactory], options);
1324
+ }
1325
+ /**
1326
+ * shutdownWithdraw
1327
+ * nonpayable
1328
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1329
+ */
1330
+ async shutdownWithdraw(_amount, options) {
1331
+ if (!this.contract.write) {
1332
+ throw new Error('Wallet client is required for write operations');
1333
+ }
1334
+ return this.contract.write.shutdownWithdraw([_amount], options);
1335
+ }
1336
+ /**
1337
+ * sweep
1338
+ * nonpayable
1339
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1340
+ */
1341
+ async sweep(_token, options) {
1342
+ if (!this.contract.write) {
1343
+ throw new Error('Wallet client is required for write operations');
1344
+ }
1345
+ return this.contract.write.sweep([_token], options);
1346
+ }
1347
+ /**
1348
+ * tendThis
1349
+ * nonpayable
1350
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1351
+ */
1352
+ async tendThis(_totalIdle, options) {
1353
+ if (!this.contract.write) {
1354
+ throw new Error('Wallet client is required for write operations');
1355
+ }
1356
+ return this.contract.write.tendThis([_totalIdle], options);
1357
+ }
1358
+ /**
1359
+ * Simulate contract write operations (dry-run without sending transaction)
1360
+ *
1361
+ * @example
1362
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1363
+ * console.log('Gas estimate:', result.request.gas);
1364
+ * console.log('Would succeed:', result.result);
1365
+ */
1366
+ get simulate() {
1367
+ const contract = this.contract;
1368
+ if (!contract.simulate) {
1369
+ throw new Error('Public client is required for simulation');
1370
+ }
1371
+ return {
1372
+ /**
1373
+ * Simulate addReward
1374
+ * Returns gas estimate and result without sending transaction
1375
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1376
+ */
1377
+ async addReward(_rewardToken, _feeRewardTokenToBase, options) {
1378
+ return contract.simulate.addReward([_rewardToken, _feeRewardTokenToBase], options);
1379
+ },
1380
+ /**
1381
+ * Simulate auctionKicked
1382
+ * Returns gas estimate and result without sending transaction
1383
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1384
+ */
1385
+ async auctionKicked(_token, options) {
1386
+ return contract.simulate.auctionKicked([_token], options);
1387
+ },
1388
+ /**
1389
+ * Simulate claimRewards
1390
+ * Returns gas estimate and result without sending transaction
1391
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1392
+ */
1393
+ async claimRewards(options) {
1394
+ return contract.simulate.claimRewards(options);
1395
+ },
1396
+ /**
1397
+ * Simulate deployFunds
1398
+ * Returns gas estimate and result without sending transaction
1399
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1400
+ */
1401
+ async deployFunds(_amount, options) {
1402
+ return contract.simulate.deployFunds([_amount], options);
1403
+ },
1404
+ /**
1405
+ * Simulate freeFunds
1406
+ * Returns gas estimate and result without sending transaction
1407
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1408
+ */
1409
+ async freeFunds(_amount, options) {
1410
+ return contract.simulate.freeFunds([_amount], options);
1411
+ },
1412
+ /**
1413
+ * Simulate harvestAndReport
1414
+ * Returns gas estimate and result without sending transaction
1415
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1416
+ */
1417
+ async harvestAndReport(options) {
1418
+ return contract.simulate.harvestAndReport(options);
1419
+ },
1420
+ /**
1421
+ * Simulate postTake
1422
+ * Returns gas estimate and result without sending transaction
1423
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1424
+ */
1425
+ async postTake(_token, _amountTaken, _amountPayed, options) {
1426
+ return contract.simulate.postTake([_token, _amountTaken, _amountPayed], options);
1427
+ },
1428
+ /**
1429
+ * Simulate preTake
1430
+ * Returns gas estimate and result without sending transaction
1431
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1432
+ */
1433
+ async preTake(_token, _amountToTake, _amountToPay, options) {
1434
+ return contract.simulate.preTake([_token, _amountToTake, _amountToPay], options);
1435
+ },
1436
+ /**
1437
+ * Simulate removeReward
1438
+ * Returns gas estimate and result without sending transaction
1439
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1440
+ */
1441
+ async removeReward(_rewardToken, options) {
1442
+ return contract.simulate.removeReward([_rewardToken], options);
1443
+ },
1444
+ /**
1445
+ * Simulate removeTradeFactory
1446
+ * Returns gas estimate and result without sending transaction
1447
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1448
+ */
1449
+ async removeTradeFactory(options) {
1450
+ return contract.simulate.removeTradeFactory(options);
1451
+ },
1452
+ /**
1453
+ * Simulate setAuction
1454
+ * Returns gas estimate and result without sending transaction
1455
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1456
+ */
1457
+ async setAuction(_auction, options) {
1458
+ return contract.simulate.setAuction([_auction], options);
1459
+ },
1460
+ /**
1461
+ * Simulate setAutocompound
1462
+ * Returns gas estimate and result without sending transaction
1463
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1464
+ */
1465
+ async setAutocompound(_autocompound, options) {
1466
+ return contract.simulate.setAutocompound([_autocompound], options);
1467
+ },
1468
+ /**
1469
+ * Simulate setDoHealthCheck
1470
+ * Returns gas estimate and result without sending transaction
1471
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1472
+ */
1473
+ async setDoHealthCheck(_doHealthCheck, options) {
1474
+ return contract.simulate.setDoHealthCheck([_doHealthCheck], options);
1475
+ },
1476
+ /**
1477
+ * Simulate setLossLimitRatio
1478
+ * Returns gas estimate and result without sending transaction
1479
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1480
+ */
1481
+ async setLossLimitRatio(_newLossLimitRatio, options) {
1482
+ return contract.simulate.setLossLimitRatio([_newLossLimitRatio], options);
1483
+ },
1484
+ /**
1485
+ * Simulate setMinAmountToSellMapping
1486
+ * Returns gas estimate and result without sending transaction
1487
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1488
+ */
1489
+ async setMinAmountToSellMapping(_token, _amount, options) {
1490
+ return contract.simulate.setMinAmountToSellMapping([_token, _amount], options);
1491
+ },
1492
+ /**
1493
+ * Simulate setProfitLimitRatio
1494
+ * Returns gas estimate and result without sending transaction
1495
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1496
+ */
1497
+ async setProfitLimitRatio(_newProfitLimitRatio, options) {
1498
+ return contract.simulate.setProfitLimitRatio([_newProfitLimitRatio], options);
1499
+ },
1500
+ /**
1501
+ * Simulate setRouterParams
1502
+ * Returns gas estimate and result without sending transaction
1503
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1504
+ */
1505
+ async setRouterParams(_guessMin, _guessMax, _maxIteration, _eps, options) {
1506
+ return contract.simulate.setRouterParams([_guessMin, _guessMax, _maxIteration, _eps], options);
1507
+ },
1508
+ /**
1509
+ * Simulate setTradeFactory
1510
+ * Returns gas estimate and result without sending transaction
1511
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1512
+ */
1513
+ async setTradeFactory(_tradeFactory, _useTradeFactory, options) {
1514
+ return contract.simulate.setTradeFactory([_tradeFactory, _useTradeFactory], options);
1515
+ },
1516
+ /**
1517
+ * Simulate setUniFees
1518
+ * Returns gas estimate and result without sending transaction
1519
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1520
+ */
1521
+ async setUniFees(_token0, _token1, _fee, options) {
1522
+ return contract.simulate.setUniFees([_token0, _token1, _fee], options);
1523
+ },
1524
+ /**
1525
+ * Simulate setUseAuction
1526
+ * Returns gas estimate and result without sending transaction
1527
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1528
+ */
1529
+ async setUseAuction(_useAuction, options) {
1530
+ return contract.simulate.setUseAuction([_useAuction], options);
1531
+ },
1532
+ /**
1533
+ * Simulate setUseTradeFactory
1534
+ * Returns gas estimate and result without sending transaction
1535
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1536
+ */
1537
+ async setUseTradeFactory(_useTradeFactory, options) {
1538
+ return contract.simulate.setUseTradeFactory([_useTradeFactory], options);
1539
+ },
1540
+ /**
1541
+ * Simulate shutdownWithdraw
1542
+ * Returns gas estimate and result without sending transaction
1543
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1544
+ */
1545
+ async shutdownWithdraw(_amount, options) {
1546
+ return contract.simulate.shutdownWithdraw([_amount], options);
1547
+ },
1548
+ /**
1549
+ * Simulate sweep
1550
+ * Returns gas estimate and result without sending transaction
1551
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1552
+ */
1553
+ async sweep(_token, options) {
1554
+ return contract.simulate.sweep([_token], options);
1555
+ },
1556
+ /**
1557
+ * Simulate tendThis
1558
+ * Returns gas estimate and result without sending transaction
1559
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1560
+ */
1561
+ async tendThis(_totalIdle, options) {
1562
+ return contract.simulate.tendThis([_totalIdle], options);
1563
+ }
1564
+ };
1565
+ }
1566
+ /**
1567
+ * Watch contract events
1568
+ *
1569
+ * Note: This contract has no events, so watch returns an empty object.
1570
+ */
1571
+ get watch() {
1572
+ return {};
1573
+ }
1574
+ }
1575
+ exports.PendleLPCompounder_json = PendleLPCompounder_json;