@pendle/core-v2 0.3.0 → 0.5.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.
Files changed (104) hide show
  1. package/contracts/SuperComposableYield/ISuperComposableYield.sol +14 -0
  2. package/contracts/SuperComposableYield/implementations/IRewardManager.sol +16 -0
  3. package/contracts/SuperComposableYield/implementations/RewardManager.sol +24 -5
  4. package/contracts/SuperComposableYield/implementations/SCYBase.sol +21 -1
  5. package/contracts/core/PendleMarket.sol +10 -18
  6. package/contracts/core/PendleMarketFactory.sol +49 -22
  7. package/contracts/core/PendleRouter.sol +74 -0
  8. package/contracts/core/PendleYieldToken.sol +20 -12
  9. package/contracts/core/{router/PendleRouterStaticUpg.sol → RouterStatic.sol} +6 -6
  10. package/contracts/core/actions/ActionCallback.sol +101 -0
  11. package/contracts/core/{router/PendleRouterCoreUpg.sol → actions/ActionCore.sol} +6 -10
  12. package/contracts/core/{router/PendleRouterYTUpg.sol → actions/ActionYT.sol} +6 -11
  13. package/contracts/core/{router/base/PendleRouterOTBaseUpg.sol → actions/base/ActionSCYAndOTBase.sol} +1 -5
  14. package/contracts/core/{router/base/PendleRouterSCYAndForgeBaseUpg.sol → actions/base/ActionSCYAndYOBase.sol} +6 -8
  15. package/contracts/core/{router/base/PendleRouterYTBaseUpg.sol → actions/base/ActionSCYAndYTBase.sol} +7 -99
  16. package/contracts/core/actions/base/ActionType.sol +11 -0
  17. package/contracts/interfaces/{IPRouterCore.sol → IPActionCore.sol} +1 -1
  18. package/contracts/interfaces/{IPRouterYT.sol → IPActionYT.sol} +1 -3
  19. package/contracts/interfaces/IPAllAction.sol +9 -0
  20. package/contracts/interfaces/IPMarketFactory.sol +11 -0
  21. package/contracts/interfaces/IPYieldToken.sol +21 -3
  22. package/contracts/libraries/math/MarketMathCore.sol +3 -2
  23. package/package.json +1 -1
  24. package/typechain-types/{PendleRouterYTBaseUpg.ts → ActionCallback.ts} +5 -5
  25. package/typechain-types/{PendleRouterCoreUpg.ts → ActionCore.ts} +5 -5
  26. package/typechain-types/{PendleRouterSCYAndForgeBaseUpg.ts → ActionSCYAndYOBase.ts} +5 -6
  27. package/typechain-types/{BoringOwnableData.ts → ActionSCYAndYTBase.ts} +21 -24
  28. package/typechain-types/{PendleRouterStaticUpg.ts → ActionStatic.ts} +5 -5
  29. package/typechain-types/{IPRouterYT.ts → ActionYT.ts} +27 -42
  30. package/typechain-types/IPActionAll.ts +1431 -0
  31. package/typechain-types/{IPRouterCore.ts → IPActionCore.ts} +5 -5
  32. package/typechain-types/{IPRouterView.ts → IPActionStatic.ts} +57 -5
  33. package/typechain-types/{PendleRouterYTUpg.ts → IPActionYT.ts} +5 -97
  34. package/typechain-types/IPAllAction.ts +1431 -0
  35. package/typechain-types/IPMarket.ts +3 -0
  36. package/typechain-types/IPMarketFactory.ts +46 -0
  37. package/typechain-types/IPYieldToken.ts +342 -14
  38. package/typechain-types/IRewardManager.ts +178 -0
  39. package/typechain-types/ISuperComposableYield.ts +97 -2
  40. package/typechain-types/PendleAaveV3SCY.ts +167 -66
  41. package/typechain-types/PendleBenQiErc20SCY.ts +167 -66
  42. package/typechain-types/PendleBtrflyScy.ts +97 -2
  43. package/typechain-types/PendleMarket.ts +3 -59
  44. package/typechain-types/PendleMarketFactory.ts +150 -24
  45. package/typechain-types/{PendleRouterProxy.ts → PendleRouter.ts} +29 -39
  46. package/typechain-types/PendleYearnVaultScy.ts +97 -2
  47. package/typechain-types/PendleYieldToken.ts +116 -101
  48. package/typechain-types/RewardManager.ts +48 -42
  49. package/typechain-types/RouterStatic.ts +828 -0
  50. package/typechain-types/SCYBase.ts +97 -2
  51. package/typechain-types/SCYBaseWithRewards.ts +167 -66
  52. package/typechain-types/factories/ActionCallback__factory.ts +116 -0
  53. package/typechain-types/factories/ActionCore__factory.ts +632 -0
  54. package/typechain-types/factories/{PendleRouterSCYAndForgeBaseUpg__factory.ts → ActionSCYAndYOBase__factory.ts} +8 -12
  55. package/typechain-types/factories/ActionSCYAndYTBase__factory.ts +52 -0
  56. package/typechain-types/factories/ActionStatic__factory.ts +308 -0
  57. package/typechain-types/factories/ActionYT__factory.ts +370 -0
  58. package/typechain-types/factories/IPActionAll__factory.ts +983 -0
  59. package/typechain-types/factories/{IPRouterCore__factory.ts → IPActionCore__factory.ts} +6 -6
  60. package/typechain-types/factories/{IPRouterView__factory.ts → IPActionStatic__factory.ts} +38 -6
  61. package/typechain-types/factories/{IPRouterYT__factory.ts → IPActionYT__factory.ts} +6 -29
  62. package/typechain-types/factories/IPAllAction__factory.ts +983 -0
  63. package/typechain-types/factories/IPMarketFactory__factory.ts +28 -0
  64. package/typechain-types/factories/IPMarket__factory.ts +7 -2
  65. package/typechain-types/factories/IPYieldToken__factory.ts +158 -1
  66. package/typechain-types/factories/IRewardManager__factory.ts +92 -0
  67. package/typechain-types/factories/ISuperComposableYield__factory.ts +68 -0
  68. package/typechain-types/factories/PendleAaveV3SCY__factory.ts +102 -34
  69. package/typechain-types/factories/PendleBenQiErc20SCY__factory.ts +102 -34
  70. package/typechain-types/factories/PendleBtrflyScy__factory.ts +69 -1
  71. package/typechain-types/factories/PendleMarketFactory__factory.ts +112 -17
  72. package/typechain-types/factories/PendleMarket__factory.ts +8 -69
  73. package/typechain-types/factories/PendleRouter__factory.ts +282 -0
  74. package/typechain-types/factories/PendleYearnVaultScy__factory.ts +69 -1
  75. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
  76. package/typechain-types/factories/PendleYieldToken__factory.ts +58 -58
  77. package/typechain-types/factories/RewardManager__factory.ts +18 -18
  78. package/typechain-types/factories/RouterStatic__factory.ts +883 -0
  79. package/typechain-types/factories/SCYBaseWithRewards__factory.ts +101 -33
  80. package/typechain-types/factories/SCYBase__factory.ts +68 -0
  81. package/typechain-types/hardhat.d.ts +93 -75
  82. package/typechain-types/index.ts +22 -18
  83. package/contracts/core/router/PendleRouterProxy.sol +0 -84
  84. package/contracts/interfaces/IPFlashCallBack.sol +0 -10
  85. package/typechain-types/BoringOwnable.ts +0 -194
  86. package/typechain-types/BoringOwnableUpg.ts +0 -194
  87. package/typechain-types/BoringOwnableUpgData.ts +0 -100
  88. package/typechain-types/IPFlashCallback.ts +0 -115
  89. package/typechain-types/IPermissionsV2.ts +0 -87
  90. package/typechain-types/PendleRouterViewUpg.ts +0 -307
  91. package/typechain-types/PermissionsV2.ts +0 -87
  92. package/typechain-types/factories/BoringOwnableData__factory.ts +0 -90
  93. package/typechain-types/factories/BoringOwnableUpgData__factory.ts +0 -94
  94. package/typechain-types/factories/BoringOwnableUpg__factory.ts +0 -139
  95. package/typechain-types/factories/BoringOwnable__factory.ts +0 -149
  96. package/typechain-types/factories/IPFlashCallback__factory.ts +0 -49
  97. package/typechain-types/factories/IPermissionsV2__factory.ts +0 -39
  98. package/typechain-types/factories/PendleRouterCoreUpg__factory.ts +0 -635
  99. package/typechain-types/factories/PendleRouterProxy__factory.ts +0 -285
  100. package/typechain-types/factories/PendleRouterStaticUpg__factory.ts +0 -315
  101. package/typechain-types/factories/PendleRouterViewUpg__factory.ts +0 -265
  102. package/typechain-types/factories/PendleRouterYTBaseUpg__factory.ts +0 -66
  103. package/typechain-types/factories/PendleRouterYTUpg__factory.ts +0 -422
  104. package/typechain-types/factories/PermissionsV2__factory.ts +0 -36
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { Contract, Signer, utils } from "ethers";
6
6
  import { Provider } from "@ethersproject/providers";
7
- import type { IPRouterCore, IPRouterCoreInterface } from "../IPRouterCore";
7
+ import type { IPActionCore, IPActionCoreInterface } from "../IPActionCore";
8
8
 
9
9
  const _abi = [
10
10
  {
@@ -517,15 +517,15 @@ const _abi = [
517
517
  },
518
518
  ];
519
519
 
520
- export class IPRouterCore__factory {
520
+ export class IPActionCore__factory {
521
521
  static readonly abi = _abi;
522
- static createInterface(): IPRouterCoreInterface {
523
- return new utils.Interface(_abi) as IPRouterCoreInterface;
522
+ static createInterface(): IPActionCoreInterface {
523
+ return new utils.Interface(_abi) as IPActionCoreInterface;
524
524
  }
525
525
  static connect(
526
526
  address: string,
527
527
  signerOrProvider: Signer | Provider
528
- ): IPRouterCore {
529
- return new Contract(address, _abi, signerOrProvider) as IPRouterCore;
528
+ ): IPActionCore {
529
+ return new Contract(address, _abi, signerOrProvider) as IPActionCore;
530
530
  }
531
531
  }
@@ -4,7 +4,10 @@
4
4
 
5
5
  import { Contract, Signer, utils } from "ethers";
6
6
  import { Provider } from "@ethersproject/providers";
7
- import type { IPRouterView, IPRouterViewInterface } from "../IPRouterView";
7
+ import type {
8
+ IPActionStatic,
9
+ IPActionStaticInterface,
10
+ } from "../IPActionStatic";
8
11
 
9
12
  const _abi = [
10
13
  {
@@ -65,6 +68,35 @@ const _abi = [
65
68
  stateMutability: "view",
66
69
  type: "function",
67
70
  },
71
+ {
72
+ inputs: [
73
+ {
74
+ internalType: "address",
75
+ name: "token",
76
+ type: "address",
77
+ },
78
+ ],
79
+ name: "getPendleTokenType",
80
+ outputs: [
81
+ {
82
+ internalType: "bool",
83
+ name: "isOT",
84
+ type: "bool",
85
+ },
86
+ {
87
+ internalType: "bool",
88
+ name: "isYT",
89
+ type: "bool",
90
+ },
91
+ {
92
+ internalType: "bool",
93
+ name: "isMarket",
94
+ type: "bool",
95
+ },
96
+ ],
97
+ stateMutability: "view",
98
+ type: "function",
99
+ },
68
100
  {
69
101
  inputs: [
70
102
  {
@@ -173,15 +205,15 @@ const _abi = [
173
205
  },
174
206
  ];
175
207
 
176
- export class IPRouterView__factory {
208
+ export class IPActionStatic__factory {
177
209
  static readonly abi = _abi;
178
- static createInterface(): IPRouterViewInterface {
179
- return new utils.Interface(_abi) as IPRouterViewInterface;
210
+ static createInterface(): IPActionStaticInterface {
211
+ return new utils.Interface(_abi) as IPActionStaticInterface;
180
212
  }
181
213
  static connect(
182
214
  address: string,
183
215
  signerOrProvider: Signer | Provider
184
- ): IPRouterView {
185
- return new Contract(address, _abi, signerOrProvider) as IPRouterView;
216
+ ): IPActionStatic {
217
+ return new Contract(address, _abi, signerOrProvider) as IPActionStatic;
186
218
  }
187
219
  }
@@ -4,32 +4,9 @@
4
4
 
5
5
  import { Contract, Signer, utils } from "ethers";
6
6
  import { Provider } from "@ethersproject/providers";
7
- import type { IPRouterYT, IPRouterYTInterface } from "../IPRouterYT";
7
+ import type { IPActionYT, IPActionYTInterface } from "../IPActionYT";
8
8
 
9
9
  const _abi = [
10
- {
11
- inputs: [
12
- {
13
- internalType: "int256",
14
- name: "otToAccount",
15
- type: "int256",
16
- },
17
- {
18
- internalType: "int256",
19
- name: "scyToAccount",
20
- type: "int256",
21
- },
22
- {
23
- internalType: "bytes",
24
- name: "data",
25
- type: "bytes",
26
- },
27
- ],
28
- name: "swapCallback",
29
- outputs: [],
30
- stateMutability: "nonpayable",
31
- type: "function",
32
- },
33
10
  {
34
11
  inputs: [
35
12
  {
@@ -291,15 +268,15 @@ const _abi = [
291
268
  },
292
269
  ];
293
270
 
294
- export class IPRouterYT__factory {
271
+ export class IPActionYT__factory {
295
272
  static readonly abi = _abi;
296
- static createInterface(): IPRouterYTInterface {
297
- return new utils.Interface(_abi) as IPRouterYTInterface;
273
+ static createInterface(): IPActionYTInterface {
274
+ return new utils.Interface(_abi) as IPActionYTInterface;
298
275
  }
299
276
  static connect(
300
277
  address: string,
301
278
  signerOrProvider: Signer | Provider
302
- ): IPRouterYT {
303
- return new Contract(address, _abi, signerOrProvider) as IPRouterYT;
279
+ ): IPActionYT {
280
+ return new Contract(address, _abi, signerOrProvider) as IPActionYT;
304
281
  }
305
282
  }