@pendle/core-v2 0.5.0 → 0.5.1-beta-2

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.
@@ -1,983 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
-
5
- import { Contract, Signer, utils } from "ethers";
6
- import { Provider } from "@ethersproject/providers";
7
- import type { IPActionAll, IPActionAllInterface } from "../IPActionAll";
8
-
9
- const _abi = [
10
- {
11
- inputs: [
12
- {
13
- internalType: "address",
14
- name: "receiver",
15
- type: "address",
16
- },
17
- {
18
- internalType: "address",
19
- name: "market",
20
- type: "address",
21
- },
22
- {
23
- internalType: "uint256",
24
- name: "scyDesired",
25
- type: "uint256",
26
- },
27
- {
28
- internalType: "uint256",
29
- name: "otDesired",
30
- type: "uint256",
31
- },
32
- {
33
- internalType: "uint256",
34
- name: "minLpOut",
35
- type: "uint256",
36
- },
37
- ],
38
- name: "addLiquidity",
39
- outputs: [
40
- {
41
- internalType: "uint256",
42
- name: "",
43
- type: "uint256",
44
- },
45
- {
46
- internalType: "uint256",
47
- name: "",
48
- type: "uint256",
49
- },
50
- {
51
- internalType: "uint256",
52
- name: "",
53
- type: "uint256",
54
- },
55
- ],
56
- stateMutability: "nonpayable",
57
- type: "function",
58
- },
59
- {
60
- inputs: [
61
- {
62
- internalType: "address",
63
- name: "market",
64
- type: "address",
65
- },
66
- {
67
- internalType: "uint256",
68
- name: "scyDesired",
69
- type: "uint256",
70
- },
71
- {
72
- internalType: "uint256",
73
- name: "otDesired",
74
- type: "uint256",
75
- },
76
- ],
77
- name: "addLiquidityStatic",
78
- outputs: [
79
- {
80
- internalType: "uint256",
81
- name: "netLpOut",
82
- type: "uint256",
83
- },
84
- {
85
- internalType: "uint256",
86
- name: "scyUsed",
87
- type: "uint256",
88
- },
89
- {
90
- internalType: "uint256",
91
- name: "otUsed",
92
- type: "uint256",
93
- },
94
- ],
95
- stateMutability: "nonpayable",
96
- type: "function",
97
- },
98
- {
99
- inputs: [
100
- {
101
- internalType: "address",
102
- name: "market",
103
- type: "address",
104
- },
105
- ],
106
- name: "getOtImpliedYield",
107
- outputs: [
108
- {
109
- internalType: "int256",
110
- name: "",
111
- type: "int256",
112
- },
113
- ],
114
- stateMutability: "view",
115
- type: "function",
116
- },
117
- {
118
- inputs: [
119
- {
120
- internalType: "address",
121
- name: "token",
122
- type: "address",
123
- },
124
- ],
125
- name: "getPendleTokenType",
126
- outputs: [
127
- {
128
- internalType: "bool",
129
- name: "isOT",
130
- type: "bool",
131
- },
132
- {
133
- internalType: "bool",
134
- name: "isYT",
135
- type: "bool",
136
- },
137
- {
138
- internalType: "bool",
139
- name: "isMarket",
140
- type: "bool",
141
- },
142
- ],
143
- stateMutability: "view",
144
- type: "function",
145
- },
146
- {
147
- inputs: [
148
- {
149
- internalType: "uint256",
150
- name: "netRawTokenIn",
151
- type: "uint256",
152
- },
153
- {
154
- internalType: "address",
155
- name: "SCY",
156
- type: "address",
157
- },
158
- {
159
- internalType: "uint256",
160
- name: "minScyOut",
161
- type: "uint256",
162
- },
163
- {
164
- internalType: "address",
165
- name: "receiver",
166
- type: "address",
167
- },
168
- {
169
- internalType: "address[]",
170
- name: "path",
171
- type: "address[]",
172
- },
173
- ],
174
- name: "mintScyFromRawToken",
175
- outputs: [
176
- {
177
- internalType: "uint256",
178
- name: "",
179
- type: "uint256",
180
- },
181
- ],
182
- stateMutability: "nonpayable",
183
- type: "function",
184
- },
185
- {
186
- inputs: [
187
- {
188
- internalType: "uint256",
189
- name: "netRawTokenIn",
190
- type: "uint256",
191
- },
192
- {
193
- internalType: "address",
194
- name: "YT",
195
- type: "address",
196
- },
197
- {
198
- internalType: "uint256",
199
- name: "minYoOut",
200
- type: "uint256",
201
- },
202
- {
203
- internalType: "address",
204
- name: "receiver",
205
- type: "address",
206
- },
207
- {
208
- internalType: "address[]",
209
- name: "path",
210
- type: "address[]",
211
- },
212
- ],
213
- name: "mintYoFromRawToken",
214
- outputs: [
215
- {
216
- internalType: "uint256",
217
- name: "",
218
- type: "uint256",
219
- },
220
- ],
221
- stateMutability: "nonpayable",
222
- type: "function",
223
- },
224
- {
225
- inputs: [
226
- {
227
- internalType: "address",
228
- name: "SCY",
229
- type: "address",
230
- },
231
- {
232
- internalType: "uint256",
233
- name: "netScyIn",
234
- type: "uint256",
235
- },
236
- {
237
- internalType: "uint256",
238
- name: "minRawTokenOut",
239
- type: "uint256",
240
- },
241
- {
242
- internalType: "address",
243
- name: "receiver",
244
- type: "address",
245
- },
246
- {
247
- internalType: "address[]",
248
- name: "path",
249
- type: "address[]",
250
- },
251
- ],
252
- name: "redeemScyToRawToken",
253
- outputs: [
254
- {
255
- internalType: "uint256",
256
- name: "",
257
- type: "uint256",
258
- },
259
- ],
260
- stateMutability: "nonpayable",
261
- type: "function",
262
- },
263
- {
264
- inputs: [
265
- {
266
- internalType: "address",
267
- name: "YT",
268
- type: "address",
269
- },
270
- {
271
- internalType: "uint256",
272
- name: "netYoIn",
273
- type: "uint256",
274
- },
275
- {
276
- internalType: "uint256",
277
- name: "minRawTokenOut",
278
- type: "uint256",
279
- },
280
- {
281
- internalType: "address",
282
- name: "receiver",
283
- type: "address",
284
- },
285
- {
286
- internalType: "address[]",
287
- name: "path",
288
- type: "address[]",
289
- },
290
- ],
291
- name: "redeemYoToRawToken",
292
- outputs: [
293
- {
294
- internalType: "uint256",
295
- name: "",
296
- type: "uint256",
297
- },
298
- ],
299
- stateMutability: "nonpayable",
300
- type: "function",
301
- },
302
- {
303
- inputs: [
304
- {
305
- internalType: "address",
306
- name: "receiver",
307
- type: "address",
308
- },
309
- {
310
- internalType: "address",
311
- name: "market",
312
- type: "address",
313
- },
314
- {
315
- internalType: "uint256",
316
- name: "lpToRemove",
317
- type: "uint256",
318
- },
319
- {
320
- internalType: "uint256",
321
- name: "scyOutMin",
322
- type: "uint256",
323
- },
324
- {
325
- internalType: "uint256",
326
- name: "otOutMin",
327
- type: "uint256",
328
- },
329
- ],
330
- name: "removeLiquidity",
331
- outputs: [
332
- {
333
- internalType: "uint256",
334
- name: "",
335
- type: "uint256",
336
- },
337
- {
338
- internalType: "uint256",
339
- name: "",
340
- type: "uint256",
341
- },
342
- ],
343
- stateMutability: "nonpayable",
344
- type: "function",
345
- },
346
- {
347
- inputs: [
348
- {
349
- internalType: "address",
350
- name: "market",
351
- type: "address",
352
- },
353
- {
354
- internalType: "uint256",
355
- name: "lpToRemove",
356
- type: "uint256",
357
- },
358
- ],
359
- name: "removeLiquidityStatic",
360
- outputs: [
361
- {
362
- internalType: "uint256",
363
- name: "netScyOut",
364
- type: "uint256",
365
- },
366
- {
367
- internalType: "uint256",
368
- name: "netOtOut",
369
- type: "uint256",
370
- },
371
- ],
372
- stateMutability: "view",
373
- type: "function",
374
- },
375
- {
376
- inputs: [
377
- {
378
- internalType: "address",
379
- name: "market",
380
- type: "address",
381
- },
382
- ],
383
- name: "scyIndex",
384
- outputs: [
385
- {
386
- internalType: "SCYIndex",
387
- name: "index",
388
- type: "uint256",
389
- },
390
- ],
391
- stateMutability: "nonpayable",
392
- type: "function",
393
- },
394
- {
395
- inputs: [
396
- {
397
- internalType: "uint256",
398
- name: "exactOtIn",
399
- type: "uint256",
400
- },
401
- {
402
- internalType: "address",
403
- name: "receiver",
404
- type: "address",
405
- },
406
- {
407
- internalType: "address[]",
408
- name: "path",
409
- type: "address[]",
410
- },
411
- {
412
- internalType: "address",
413
- name: "market",
414
- type: "address",
415
- },
416
- {
417
- internalType: "uint256",
418
- name: "minRawTokenOut",
419
- type: "uint256",
420
- },
421
- ],
422
- name: "swapExactOtForRawToken",
423
- outputs: [
424
- {
425
- internalType: "uint256",
426
- name: "netRawTokenOut",
427
- type: "uint256",
428
- },
429
- ],
430
- stateMutability: "nonpayable",
431
- type: "function",
432
- },
433
- {
434
- inputs: [
435
- {
436
- internalType: "address",
437
- name: "receiver",
438
- type: "address",
439
- },
440
- {
441
- internalType: "address",
442
- name: "market",
443
- type: "address",
444
- },
445
- {
446
- internalType: "uint256",
447
- name: "exactOtIn",
448
- type: "uint256",
449
- },
450
- {
451
- internalType: "uint256",
452
- name: "minScyOut",
453
- type: "uint256",
454
- },
455
- ],
456
- name: "swapExactOtForScy",
457
- outputs: [
458
- {
459
- internalType: "uint256",
460
- name: "",
461
- type: "uint256",
462
- },
463
- ],
464
- stateMutability: "nonpayable",
465
- type: "function",
466
- },
467
- {
468
- inputs: [
469
- {
470
- internalType: "uint256",
471
- name: "exactRawTokenIn",
472
- type: "uint256",
473
- },
474
- {
475
- internalType: "address",
476
- name: "receiver",
477
- type: "address",
478
- },
479
- {
480
- internalType: "address[]",
481
- name: "path",
482
- type: "address[]",
483
- },
484
- {
485
- internalType: "address",
486
- name: "market",
487
- type: "address",
488
- },
489
- {
490
- internalType: "uint256",
491
- name: "otOutguessMin",
492
- type: "uint256",
493
- },
494
- {
495
- internalType: "uint256",
496
- name: "otOutguessMax",
497
- type: "uint256",
498
- },
499
- {
500
- internalType: "uint256",
501
- name: "maxIteration",
502
- type: "uint256",
503
- },
504
- {
505
- internalType: "uint256",
506
- name: "eps",
507
- type: "uint256",
508
- },
509
- ],
510
- name: "swapExactRawTokenForOt",
511
- outputs: [
512
- {
513
- internalType: "uint256",
514
- name: "netOtOut",
515
- type: "uint256",
516
- },
517
- ],
518
- stateMutability: "nonpayable",
519
- type: "function",
520
- },
521
- {
522
- inputs: [
523
- {
524
- internalType: "uint256",
525
- name: "exactRawTokenIn",
526
- type: "uint256",
527
- },
528
- {
529
- internalType: "address",
530
- name: "receiver",
531
- type: "address",
532
- },
533
- {
534
- internalType: "address[]",
535
- name: "path",
536
- type: "address[]",
537
- },
538
- {
539
- internalType: "address",
540
- name: "market",
541
- type: "address",
542
- },
543
- {
544
- internalType: "uint256",
545
- name: "netYtOutGuessMin",
546
- type: "uint256",
547
- },
548
- {
549
- internalType: "uint256",
550
- name: "netYtOutGuessMax",
551
- type: "uint256",
552
- },
553
- {
554
- internalType: "uint256",
555
- name: "maxIteration",
556
- type: "uint256",
557
- },
558
- {
559
- internalType: "uint256",
560
- name: "eps",
561
- type: "uint256",
562
- },
563
- ],
564
- name: "swapExactRawTokenForYt",
565
- outputs: [
566
- {
567
- internalType: "uint256",
568
- name: "netYtOut",
569
- type: "uint256",
570
- },
571
- ],
572
- stateMutability: "nonpayable",
573
- type: "function",
574
- },
575
- {
576
- inputs: [
577
- {
578
- internalType: "address",
579
- name: "receiver",
580
- type: "address",
581
- },
582
- {
583
- internalType: "address",
584
- name: "market",
585
- type: "address",
586
- },
587
- {
588
- internalType: "uint256",
589
- name: "exactScyIn",
590
- type: "uint256",
591
- },
592
- {
593
- internalType: "uint256",
594
- name: "otOutguessMin",
595
- type: "uint256",
596
- },
597
- {
598
- internalType: "uint256",
599
- name: "otOutguessMax",
600
- type: "uint256",
601
- },
602
- {
603
- internalType: "uint256",
604
- name: "maxIteration",
605
- type: "uint256",
606
- },
607
- {
608
- internalType: "uint256",
609
- name: "eps",
610
- type: "uint256",
611
- },
612
- ],
613
- name: "swapExactScyForOt",
614
- outputs: [
615
- {
616
- internalType: "uint256",
617
- name: "",
618
- type: "uint256",
619
- },
620
- ],
621
- stateMutability: "nonpayable",
622
- type: "function",
623
- },
624
- {
625
- inputs: [
626
- {
627
- internalType: "address",
628
- name: "receiver",
629
- type: "address",
630
- },
631
- {
632
- internalType: "address",
633
- name: "market",
634
- type: "address",
635
- },
636
- {
637
- internalType: "uint256",
638
- name: "exactScyIn",
639
- type: "uint256",
640
- },
641
- {
642
- internalType: "uint256",
643
- name: "netYtOutGuessMin",
644
- type: "uint256",
645
- },
646
- {
647
- internalType: "uint256",
648
- name: "netYtOutGuessMax",
649
- type: "uint256",
650
- },
651
- {
652
- internalType: "uint256",
653
- name: "maxIteration",
654
- type: "uint256",
655
- },
656
- {
657
- internalType: "uint256",
658
- name: "eps",
659
- type: "uint256",
660
- },
661
- ],
662
- name: "swapExactScyForYt",
663
- outputs: [
664
- {
665
- internalType: "uint256",
666
- name: "netYtOut",
667
- type: "uint256",
668
- },
669
- ],
670
- stateMutability: "nonpayable",
671
- type: "function",
672
- },
673
- {
674
- inputs: [
675
- {
676
- internalType: "uint256",
677
- name: "exactYtIn",
678
- type: "uint256",
679
- },
680
- {
681
- internalType: "address",
682
- name: "receiver",
683
- type: "address",
684
- },
685
- {
686
- internalType: "address[]",
687
- name: "path",
688
- type: "address[]",
689
- },
690
- {
691
- internalType: "address",
692
- name: "market",
693
- type: "address",
694
- },
695
- {
696
- internalType: "uint256",
697
- name: "minRawTokenOut",
698
- type: "uint256",
699
- },
700
- ],
701
- name: "swapExactYtForRawToken",
702
- outputs: [
703
- {
704
- internalType: "uint256",
705
- name: "netRawTokenOut",
706
- type: "uint256",
707
- },
708
- ],
709
- stateMutability: "nonpayable",
710
- type: "function",
711
- },
712
- {
713
- inputs: [
714
- {
715
- internalType: "address",
716
- name: "receiver",
717
- type: "address",
718
- },
719
- {
720
- internalType: "address",
721
- name: "market",
722
- type: "address",
723
- },
724
- {
725
- internalType: "uint256",
726
- name: "exactYtIn",
727
- type: "uint256",
728
- },
729
- {
730
- internalType: "uint256",
731
- name: "minScyOut",
732
- type: "uint256",
733
- },
734
- ],
735
- name: "swapExactYtForScy",
736
- outputs: [
737
- {
738
- internalType: "uint256",
739
- name: "netScyOut",
740
- type: "uint256",
741
- },
742
- ],
743
- stateMutability: "nonpayable",
744
- type: "function",
745
- },
746
- {
747
- inputs: [
748
- {
749
- internalType: "address",
750
- name: "receiver",
751
- type: "address",
752
- },
753
- {
754
- internalType: "address",
755
- name: "market",
756
- type: "address",
757
- },
758
- {
759
- internalType: "uint256",
760
- name: "exactScyOut",
761
- type: "uint256",
762
- },
763
- {
764
- internalType: "uint256",
765
- name: "otInGuessMin",
766
- type: "uint256",
767
- },
768
- {
769
- internalType: "uint256",
770
- name: "otInGuessMax",
771
- type: "uint256",
772
- },
773
- {
774
- internalType: "uint256",
775
- name: "maxIteration",
776
- type: "uint256",
777
- },
778
- {
779
- internalType: "uint256",
780
- name: "eps",
781
- type: "uint256",
782
- },
783
- ],
784
- name: "swapOtForExactScy",
785
- outputs: [
786
- {
787
- internalType: "uint256",
788
- name: "",
789
- type: "uint256",
790
- },
791
- ],
792
- stateMutability: "nonpayable",
793
- type: "function",
794
- },
795
- {
796
- inputs: [
797
- {
798
- internalType: "address",
799
- name: "market",
800
- type: "address",
801
- },
802
- {
803
- internalType: "uint256",
804
- name: "exactOtIn",
805
- type: "uint256",
806
- },
807
- ],
808
- name: "swapOtForScyStatic",
809
- outputs: [
810
- {
811
- internalType: "uint256",
812
- name: "netScyOut",
813
- type: "uint256",
814
- },
815
- {
816
- internalType: "uint256",
817
- name: "netScyFee",
818
- type: "uint256",
819
- },
820
- ],
821
- stateMutability: "nonpayable",
822
- type: "function",
823
- },
824
- {
825
- inputs: [
826
- {
827
- internalType: "address",
828
- name: "receiver",
829
- type: "address",
830
- },
831
- {
832
- internalType: "address",
833
- name: "market",
834
- type: "address",
835
- },
836
- {
837
- internalType: "uint256",
838
- name: "exactOtOut",
839
- type: "uint256",
840
- },
841
- {
842
- internalType: "uint256",
843
- name: "maxScyIn",
844
- type: "uint256",
845
- },
846
- ],
847
- name: "swapScyForExactOt",
848
- outputs: [
849
- {
850
- internalType: "uint256",
851
- name: "",
852
- type: "uint256",
853
- },
854
- ],
855
- stateMutability: "nonpayable",
856
- type: "function",
857
- },
858
- {
859
- inputs: [
860
- {
861
- internalType: "address",
862
- name: "receiver",
863
- type: "address",
864
- },
865
- {
866
- internalType: "address",
867
- name: "market",
868
- type: "address",
869
- },
870
- {
871
- internalType: "uint256",
872
- name: "exactYtOut",
873
- type: "uint256",
874
- },
875
- {
876
- internalType: "uint256",
877
- name: "maxScyIn",
878
- type: "uint256",
879
- },
880
- ],
881
- name: "swapScyForExactYt",
882
- outputs: [
883
- {
884
- internalType: "uint256",
885
- name: "netScyIn",
886
- type: "uint256",
887
- },
888
- ],
889
- stateMutability: "nonpayable",
890
- type: "function",
891
- },
892
- {
893
- inputs: [
894
- {
895
- internalType: "address",
896
- name: "market",
897
- type: "address",
898
- },
899
- {
900
- internalType: "uint256",
901
- name: "exactOtOut",
902
- type: "uint256",
903
- },
904
- ],
905
- name: "swapScyForOtStatic",
906
- outputs: [
907
- {
908
- internalType: "uint256",
909
- name: "netScyIn",
910
- type: "uint256",
911
- },
912
- {
913
- internalType: "uint256",
914
- name: "netScyFee",
915
- type: "uint256",
916
- },
917
- ],
918
- stateMutability: "nonpayable",
919
- type: "function",
920
- },
921
- {
922
- inputs: [
923
- {
924
- internalType: "address",
925
- name: "receiver",
926
- type: "address",
927
- },
928
- {
929
- internalType: "address",
930
- name: "market",
931
- type: "address",
932
- },
933
- {
934
- internalType: "uint256",
935
- name: "exactScyOut",
936
- type: "uint256",
937
- },
938
- {
939
- internalType: "uint256",
940
- name: "netYtInGuessMin",
941
- type: "uint256",
942
- },
943
- {
944
- internalType: "uint256",
945
- name: "netYtInGuessMax",
946
- type: "uint256",
947
- },
948
- {
949
- internalType: "uint256",
950
- name: "maxIteration",
951
- type: "uint256",
952
- },
953
- {
954
- internalType: "uint256",
955
- name: "eps",
956
- type: "uint256",
957
- },
958
- ],
959
- name: "swapYtForExactScy",
960
- outputs: [
961
- {
962
- internalType: "uint256",
963
- name: "netYtIn",
964
- type: "uint256",
965
- },
966
- ],
967
- stateMutability: "nonpayable",
968
- type: "function",
969
- },
970
- ];
971
-
972
- export class IPActionAll__factory {
973
- static readonly abi = _abi;
974
- static createInterface(): IPActionAllInterface {
975
- return new utils.Interface(_abi) as IPActionAllInterface;
976
- }
977
- static connect(
978
- address: string,
979
- signerOrProvider: Signer | Provider
980
- ): IPActionAll {
981
- return new Contract(address, _abi, signerOrProvider) as IPActionAll;
982
- }
983
- }