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

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.
@@ -137,8 +137,9 @@ export interface RouterStaticInterface extends utils.Interface {
137
137
  "getPendleTokenType(address)": FunctionFragment;
138
138
  "getUserMarketInfo(address,address)": FunctionFragment;
139
139
  "getUserMarketPositions(address,address[])": FunctionFragment;
140
+ "getUserSCYInfo(address,address)": FunctionFragment;
140
141
  "getUserYOInfo(address,address)": FunctionFragment;
141
- "getUserYOPositionsByTokens(address,address[])": FunctionFragment;
142
+ "getUserYOPositionsByYOs(address,address[])": FunctionFragment;
142
143
  "getYO(address)": FunctionFragment;
143
144
  "getYOInfo(address)": FunctionFragment;
144
145
  "hasYOPosition((address,address,uint256,uint256,(address,uint256),(address,uint256)[]))": FunctionFragment;
@@ -174,12 +175,16 @@ export interface RouterStaticInterface extends utils.Interface {
174
175
  functionFragment: "getUserMarketPositions",
175
176
  values: [string, string[]]
176
177
  ): string;
178
+ encodeFunctionData(
179
+ functionFragment: "getUserSCYInfo",
180
+ values: [string, string]
181
+ ): string;
177
182
  encodeFunctionData(
178
183
  functionFragment: "getUserYOInfo",
179
184
  values: [string, string]
180
185
  ): string;
181
186
  encodeFunctionData(
182
- functionFragment: "getUserYOPositionsByTokens",
187
+ functionFragment: "getUserYOPositionsByYOs",
183
188
  values: [string, string[]]
184
189
  ): string;
185
190
  encodeFunctionData(functionFragment: "getYO", values: [string]): string;
@@ -234,12 +239,16 @@ export interface RouterStaticInterface extends utils.Interface {
234
239
  functionFragment: "getUserMarketPositions",
235
240
  data: BytesLike
236
241
  ): Result;
242
+ decodeFunctionResult(
243
+ functionFragment: "getUserSCYInfo",
244
+ data: BytesLike
245
+ ): Result;
237
246
  decodeFunctionResult(
238
247
  functionFragment: "getUserYOInfo",
239
248
  data: BytesLike
240
249
  ): Result;
241
250
  decodeFunctionResult(
242
- functionFragment: "getUserYOPositionsByTokens",
251
+ functionFragment: "getUserYOPositionsByYOs",
243
252
  data: BytesLike
244
253
  ): Result;
245
254
  decodeFunctionResult(functionFragment: "getYO", data: BytesLike): Result;
@@ -357,8 +366,19 @@ export interface RouterStatic extends BaseContract {
357
366
  }
358
367
  >;
359
368
 
369
+ getUserSCYInfo(
370
+ scy: string,
371
+ user: string,
372
+ overrides?: CallOverrides
373
+ ): Promise<
374
+ [BigNumber, IPRouterStatic.TokenAmountStructOutput[]] & {
375
+ balance: BigNumber;
376
+ rewards: IPRouterStatic.TokenAmountStructOutput[];
377
+ }
378
+ >;
379
+
360
380
  getUserYOInfo(
361
- token: string,
381
+ yo: string,
362
382
  user: string,
363
383
  overrides?: CallOverrides
364
384
  ): Promise<
@@ -367,9 +387,9 @@ export interface RouterStatic extends BaseContract {
367
387
  }
368
388
  >;
369
389
 
370
- getUserYOPositionsByTokens(
390
+ getUserYOPositionsByYOs(
371
391
  user: string,
372
- tokens: string[],
392
+ yos: string[],
373
393
  overrides?: CallOverrides
374
394
  ): Promise<
375
395
  [IPRouterStatic.UserYOInfoStructOutput[]] & {
@@ -378,12 +398,12 @@ export interface RouterStatic extends BaseContract {
378
398
  >;
379
399
 
380
400
  getYO(
381
- token: string,
401
+ yo: string,
382
402
  overrides?: CallOverrides
383
403
  ): Promise<[string, string] & { ot: string; yt: string }>;
384
404
 
385
405
  getYOInfo(
386
- token: string,
406
+ yo: string,
387
407
  overrides?: Overrides & { from?: string | Promise<string> }
388
408
  ): Promise<ContractTransaction>;
389
409
 
@@ -470,25 +490,36 @@ export interface RouterStatic extends BaseContract {
470
490
  overrides?: CallOverrides
471
491
  ): Promise<IPRouterStatic.UserMarketInfoStructOutput[]>;
472
492
 
493
+ getUserSCYInfo(
494
+ scy: string,
495
+ user: string,
496
+ overrides?: CallOverrides
497
+ ): Promise<
498
+ [BigNumber, IPRouterStatic.TokenAmountStructOutput[]] & {
499
+ balance: BigNumber;
500
+ rewards: IPRouterStatic.TokenAmountStructOutput[];
501
+ }
502
+ >;
503
+
473
504
  getUserYOInfo(
474
- token: string,
505
+ yo: string,
475
506
  user: string,
476
507
  overrides?: CallOverrides
477
508
  ): Promise<IPRouterStatic.UserYOInfoStructOutput>;
478
509
 
479
- getUserYOPositionsByTokens(
510
+ getUserYOPositionsByYOs(
480
511
  user: string,
481
- tokens: string[],
512
+ yos: string[],
482
513
  overrides?: CallOverrides
483
514
  ): Promise<IPRouterStatic.UserYOInfoStructOutput[]>;
484
515
 
485
516
  getYO(
486
- token: string,
517
+ yo: string,
487
518
  overrides?: CallOverrides
488
519
  ): Promise<[string, string] & { ot: string; yt: string }>;
489
520
 
490
521
  getYOInfo(
491
- token: string,
522
+ yo: string,
492
523
  overrides?: Overrides & { from?: string | Promise<string> }
493
524
  ): Promise<ContractTransaction>;
494
525
 
@@ -581,25 +612,36 @@ export interface RouterStatic extends BaseContract {
581
612
  overrides?: CallOverrides
582
613
  ): Promise<IPRouterStatic.UserMarketInfoStructOutput[]>;
583
614
 
615
+ getUserSCYInfo(
616
+ scy: string,
617
+ user: string,
618
+ overrides?: CallOverrides
619
+ ): Promise<
620
+ [BigNumber, IPRouterStatic.TokenAmountStructOutput[]] & {
621
+ balance: BigNumber;
622
+ rewards: IPRouterStatic.TokenAmountStructOutput[];
623
+ }
624
+ >;
625
+
584
626
  getUserYOInfo(
585
- token: string,
627
+ yo: string,
586
628
  user: string,
587
629
  overrides?: CallOverrides
588
630
  ): Promise<IPRouterStatic.UserYOInfoStructOutput>;
589
631
 
590
- getUserYOPositionsByTokens(
632
+ getUserYOPositionsByYOs(
591
633
  user: string,
592
- tokens: string[],
634
+ yos: string[],
593
635
  overrides?: CallOverrides
594
636
  ): Promise<IPRouterStatic.UserYOInfoStructOutput[]>;
595
637
 
596
638
  getYO(
597
- token: string,
639
+ yo: string,
598
640
  overrides?: CallOverrides
599
641
  ): Promise<[string, string] & { ot: string; yt: string }>;
600
642
 
601
643
  getYOInfo(
602
- token: string,
644
+ yo: string,
603
645
  overrides?: CallOverrides
604
646
  ): Promise<
605
647
  [BigNumber, BigNumber, IPRouterStatic.RewardIndexStructOutput[]] & {
@@ -682,22 +724,28 @@ export interface RouterStatic extends BaseContract {
682
724
  overrides?: CallOverrides
683
725
  ): Promise<BigNumber>;
684
726
 
727
+ getUserSCYInfo(
728
+ scy: string,
729
+ user: string,
730
+ overrides?: CallOverrides
731
+ ): Promise<BigNumber>;
732
+
685
733
  getUserYOInfo(
686
- token: string,
734
+ yo: string,
687
735
  user: string,
688
736
  overrides?: CallOverrides
689
737
  ): Promise<BigNumber>;
690
738
 
691
- getUserYOPositionsByTokens(
739
+ getUserYOPositionsByYOs(
692
740
  user: string,
693
- tokens: string[],
741
+ yos: string[],
694
742
  overrides?: CallOverrides
695
743
  ): Promise<BigNumber>;
696
744
 
697
- getYO(token: string, overrides?: CallOverrides): Promise<BigNumber>;
745
+ getYO(yo: string, overrides?: CallOverrides): Promise<BigNumber>;
698
746
 
699
747
  getYOInfo(
700
- token: string,
748
+ yo: string,
701
749
  overrides?: Overrides & { from?: string | Promise<string> }
702
750
  ): Promise<BigNumber>;
703
751
 
@@ -769,25 +817,28 @@ export interface RouterStatic extends BaseContract {
769
817
  overrides?: CallOverrides
770
818
  ): Promise<PopulatedTransaction>;
771
819
 
772
- getUserYOInfo(
773
- token: string,
820
+ getUserSCYInfo(
821
+ scy: string,
774
822
  user: string,
775
823
  overrides?: CallOverrides
776
824
  ): Promise<PopulatedTransaction>;
777
825
 
778
- getUserYOPositionsByTokens(
826
+ getUserYOInfo(
827
+ yo: string,
779
828
  user: string,
780
- tokens: string[],
781
829
  overrides?: CallOverrides
782
830
  ): Promise<PopulatedTransaction>;
783
831
 
784
- getYO(
785
- token: string,
832
+ getUserYOPositionsByYOs(
833
+ user: string,
834
+ yos: string[],
786
835
  overrides?: CallOverrides
787
836
  ): Promise<PopulatedTransaction>;
788
837
 
838
+ getYO(yo: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
839
+
789
840
  getYOInfo(
790
- token: string,
841
+ yo: string,
791
842
  overrides?: Overrides & { from?: string | Promise<string> }
792
843
  ): Promise<PopulatedTransaction>;
793
844
 
@@ -56,93 +56,6 @@ const _abi = [
56
56
  stateMutability: "nonpayable",
57
57
  type: "function",
58
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
59
  {
147
60
  inputs: [
148
61
  {
@@ -343,54 +256,6 @@ const _abi = [
343
256
  stateMutability: "nonpayable",
344
257
  type: "function",
345
258
  },
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
259
  {
395
260
  inputs: [
396
261
  {
@@ -792,35 +657,6 @@ const _abi = [
792
657
  stateMutability: "nonpayable",
793
658
  type: "function",
794
659
  },
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
660
  {
825
661
  inputs: [
826
662
  {
@@ -889,35 +725,6 @@ const _abi = [
889
725
  stateMutability: "nonpayable",
890
726
  type: "function",
891
727
  },
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
728
  {
922
729
  inputs: [
923
730
  {