@pendle/core-v2 0.4.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 (96) hide show
  1. package/contracts/SuperComposableYield/implementations/IRewardManager.sol +16 -0
  2. package/contracts/SuperComposableYield/implementations/RewardManager.sol +24 -5
  3. package/contracts/core/PendleMarket.sol +10 -18
  4. package/contracts/core/PendleMarketFactory.sol +49 -22
  5. package/contracts/core/PendleRouter.sol +74 -0
  6. package/contracts/core/PendleYieldToken.sol +20 -12
  7. package/contracts/core/{router/PendleRouterStaticUpg.sol → RouterStatic.sol} +6 -6
  8. package/contracts/core/actions/ActionCallback.sol +101 -0
  9. package/contracts/core/{router/PendleRouterCoreUpg.sol → actions/ActionCore.sol} +6 -10
  10. package/contracts/core/{router/PendleRouterYTUpg.sol → actions/ActionYT.sol} +6 -11
  11. package/contracts/core/{router/base/PendleRouterOTBaseUpg.sol → actions/base/ActionSCYAndOTBase.sol} +1 -5
  12. package/contracts/core/{router/base/PendleRouterSCYAndForgeBaseUpg.sol → actions/base/ActionSCYAndYOBase.sol} +3 -5
  13. package/contracts/core/{router/base/PendleRouterYTBaseUpg.sol → actions/base/ActionSCYAndYTBase.sol} +7 -99
  14. package/contracts/core/actions/base/ActionType.sol +11 -0
  15. package/contracts/interfaces/{IPRouterCore.sol → IPActionCore.sol} +1 -1
  16. package/contracts/interfaces/{IPRouterYT.sol → IPActionYT.sol} +1 -3
  17. package/contracts/interfaces/IPAllAction.sol +9 -0
  18. package/contracts/interfaces/IPMarketFactory.sol +11 -0
  19. package/contracts/interfaces/IPYieldToken.sol +21 -3
  20. package/contracts/libraries/math/MarketMathCore.sol +3 -2
  21. package/package.json +1 -1
  22. package/typechain-types/{PendleRouterYTBaseUpg.ts → ActionCallback.ts} +5 -5
  23. package/typechain-types/{PendleRouterCoreUpg.ts → ActionCore.ts} +5 -5
  24. package/typechain-types/{PendleRouterSCYAndForgeBaseUpg.ts → ActionSCYAndYOBase.ts} +5 -6
  25. package/typechain-types/{BoringOwnableData.ts → ActionSCYAndYTBase.ts} +21 -24
  26. package/typechain-types/{PendleRouterStaticUpg.ts → ActionStatic.ts} +5 -5
  27. package/typechain-types/{IPRouterYT.ts → ActionYT.ts} +27 -42
  28. package/typechain-types/IPActionAll.ts +1431 -0
  29. package/typechain-types/{IPRouterCore.ts → IPActionCore.ts} +5 -5
  30. package/typechain-types/{IPRouterView.ts → IPActionStatic.ts} +57 -5
  31. package/typechain-types/{PendleRouterYTUpg.ts → IPActionYT.ts} +5 -97
  32. package/typechain-types/IPAllAction.ts +1431 -0
  33. package/typechain-types/IPMarket.ts +3 -0
  34. package/typechain-types/IPMarketFactory.ts +46 -0
  35. package/typechain-types/IPYieldToken.ts +342 -14
  36. package/typechain-types/IRewardManager.ts +178 -0
  37. package/typechain-types/PendleAaveV3SCY.ts +70 -64
  38. package/typechain-types/PendleBenQiErc20SCY.ts +70 -64
  39. package/typechain-types/PendleMarket.ts +3 -59
  40. package/typechain-types/PendleMarketFactory.ts +150 -24
  41. package/typechain-types/{PendleRouterProxy.ts → PendleRouter.ts} +29 -39
  42. package/typechain-types/PendleYieldToken.ts +116 -101
  43. package/typechain-types/RewardManager.ts +48 -42
  44. package/typechain-types/RouterStatic.ts +828 -0
  45. package/typechain-types/SCYBaseWithRewards.ts +70 -64
  46. package/typechain-types/factories/ActionCallback__factory.ts +116 -0
  47. package/typechain-types/factories/ActionCore__factory.ts +632 -0
  48. package/typechain-types/factories/{PendleRouterSCYAndForgeBaseUpg__factory.ts → ActionSCYAndYOBase__factory.ts} +8 -12
  49. package/typechain-types/factories/ActionSCYAndYTBase__factory.ts +52 -0
  50. package/typechain-types/factories/ActionStatic__factory.ts +308 -0
  51. package/typechain-types/factories/ActionYT__factory.ts +370 -0
  52. package/typechain-types/factories/IPActionAll__factory.ts +983 -0
  53. package/typechain-types/factories/{IPRouterCore__factory.ts → IPActionCore__factory.ts} +6 -6
  54. package/typechain-types/factories/{IPRouterView__factory.ts → IPActionStatic__factory.ts} +38 -6
  55. package/typechain-types/factories/{IPRouterYT__factory.ts → IPActionYT__factory.ts} +6 -29
  56. package/typechain-types/factories/IPAllAction__factory.ts +983 -0
  57. package/typechain-types/factories/IPMarketFactory__factory.ts +28 -0
  58. package/typechain-types/factories/IPMarket__factory.ts +7 -2
  59. package/typechain-types/factories/IPYieldToken__factory.ts +158 -1
  60. package/typechain-types/factories/IRewardManager__factory.ts +92 -0
  61. package/typechain-types/factories/PendleAaveV3SCY__factory.ts +34 -34
  62. package/typechain-types/factories/PendleBenQiErc20SCY__factory.ts +34 -34
  63. package/typechain-types/factories/PendleBtrflyScy__factory.ts +1 -1
  64. package/typechain-types/factories/PendleMarketFactory__factory.ts +112 -17
  65. package/typechain-types/factories/PendleMarket__factory.ts +8 -69
  66. package/typechain-types/factories/PendleRouter__factory.ts +282 -0
  67. package/typechain-types/factories/PendleYearnVaultScy__factory.ts +1 -1
  68. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
  69. package/typechain-types/factories/PendleYieldToken__factory.ts +58 -58
  70. package/typechain-types/factories/RewardManager__factory.ts +18 -18
  71. package/typechain-types/factories/RouterStatic__factory.ts +883 -0
  72. package/typechain-types/factories/SCYBaseWithRewards__factory.ts +33 -33
  73. package/typechain-types/hardhat.d.ts +93 -75
  74. package/typechain-types/index.ts +22 -18
  75. package/contracts/core/router/PendleRouterProxy.sol +0 -84
  76. package/contracts/interfaces/IPFlashCallBack.sol +0 -10
  77. package/typechain-types/BoringOwnable.ts +0 -194
  78. package/typechain-types/BoringOwnableUpg.ts +0 -194
  79. package/typechain-types/BoringOwnableUpgData.ts +0 -100
  80. package/typechain-types/IPFlashCallback.ts +0 -115
  81. package/typechain-types/IPermissionsV2.ts +0 -87
  82. package/typechain-types/PendleRouterViewUpg.ts +0 -307
  83. package/typechain-types/PermissionsV2.ts +0 -87
  84. package/typechain-types/factories/BoringOwnableData__factory.ts +0 -90
  85. package/typechain-types/factories/BoringOwnableUpgData__factory.ts +0 -94
  86. package/typechain-types/factories/BoringOwnableUpg__factory.ts +0 -139
  87. package/typechain-types/factories/BoringOwnable__factory.ts +0 -149
  88. package/typechain-types/factories/IPFlashCallback__factory.ts +0 -49
  89. package/typechain-types/factories/IPermissionsV2__factory.ts +0 -39
  90. package/typechain-types/factories/PendleRouterCoreUpg__factory.ts +0 -635
  91. package/typechain-types/factories/PendleRouterProxy__factory.ts +0 -285
  92. package/typechain-types/factories/PendleRouterStaticUpg__factory.ts +0 -315
  93. package/typechain-types/factories/PendleRouterViewUpg__factory.ts +0 -265
  94. package/typechain-types/factories/PendleRouterYTBaseUpg__factory.ts +0 -66
  95. package/typechain-types/factories/PendleRouterYTUpg__factory.ts +0 -422
  96. 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
  }