@pendle/core-v2 0.5.1-beta-4 → 0.6.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.
- package/contracts/SuperComposableYield/ISuperComposableYield.sol +2 -0
- package/contracts/SuperComposableYield/implementations/RewardManager.sol +35 -20
- package/contracts/SuperComposableYield/implementations/SCYBase.sol +39 -19
- package/contracts/SuperComposableYield/implementations/SCYBaseWithRewards.sol +26 -14
- package/contracts/core/PendleBaseToken.sol +2 -2
- package/contracts/core/PendleMarket.sol +145 -61
- package/contracts/core/PendleMarketFactory.sol +30 -19
- package/contracts/core/{PendleOwnershipToken.sol → PendlePrincipalToken.sol} +14 -2
- package/contracts/core/PendleRouter.sol +23 -9
- package/contracts/core/PendleSCYImpl/AaveV3/PendleAaveV3SCY.sol +21 -20
- package/contracts/core/PendleSCYImpl/PendleBenQiErc20SCY.sol +22 -16
- package/contracts/core/PendleSCYImpl/PendleBtrflySCY.sol +13 -13
- package/contracts/core/PendleSCYImpl/PendleStETHSCY.sol +107 -0
- package/contracts/core/PendleSCYImpl/PendleYearnVaultSCY.sol +14 -15
- package/contracts/core/PendleYieldContractFactory.sol +29 -14
- package/contracts/core/PendleYieldToken.sol +130 -76
- package/contracts/core/RouterStatic.sol +16 -157
- package/contracts/core/actions/ActionCallback.sol +36 -18
- package/contracts/core/actions/ActionCore.sol +41 -88
- package/contracts/core/actions/ActionRedeem.sol +36 -0
- package/contracts/core/actions/ActionYT.sol +41 -59
- package/contracts/core/actions/base/{ActionSCYAndOTBase.sol → ActionSCYAndPTBase.sol} +59 -45
- package/contracts/core/actions/base/{ActionSCYAndYOBase.sol → ActionSCYAndPYBase.sol} +57 -19
- package/contracts/core/actions/base/ActionSCYAndYTBase.sol +31 -21
- package/contracts/interfaces/IPActionCore.sol +21 -28
- package/contracts/interfaces/IPActionRedeem.sol +17 -0
- package/contracts/interfaces/IPActionYT.sol +5 -12
- package/contracts/interfaces/IPAllAction.sol +2 -2
- package/contracts/interfaces/IPMarket.sol +33 -10
- package/contracts/interfaces/IPMarketAddRemoveCallback.sol +2 -2
- package/contracts/interfaces/IPMarketFactory.sol +3 -1
- package/contracts/interfaces/IPMarketSwapCallback.sol +1 -1
- package/contracts/interfaces/{IPOwnershipToken.sol → IPPrincipalToken.sol} +1 -1
- package/contracts/interfaces/IPRouterStatic.sol +7 -82
- package/contracts/interfaces/IPYieldContractFactory.sol +10 -2
- package/contracts/interfaces/IPYieldToken.sol +14 -5
- package/contracts/interfaces/IWstETH.sol +10 -0
- package/contracts/libraries/JoeLibrary.sol +1 -1
- package/contracts/libraries/math/LogExpMath.sol +1 -1
- package/contracts/libraries/math/MarketApproxLib.sol +128 -88
- package/contracts/libraries/math/MarketMathAux.sol +13 -13
- package/contracts/libraries/math/MarketMathCore.sol +62 -93
- package/contracts/libraries/math/Math.sol +14 -2
- package/contracts/periphery/PendleGovernanceManager.sol +5 -3
- package/package.json +3 -2
- package/typechain-types/ActionCallback.ts +5 -5
- package/typechain-types/ActionCore.ts +312 -234
- package/typechain-types/ActionRedeem.ts +125 -0
- package/typechain-types/ActionSCYAndPYBase.ts +223 -0
- package/typechain-types/ActionSCYAndYOBase.ts +129 -3
- package/typechain-types/ActionSCYAndYTBase.ts +149 -3
- package/typechain-types/ActionYT.ts +192 -94
- package/typechain-types/IPActionCore.ts +183 -231
- package/typechain-types/IPActionRedeem.ts +125 -0
- package/typechain-types/IPActionYT.ts +43 -91
- package/typechain-types/IPAllAction.ts +258 -321
- package/typechain-types/IPMarket.ts +150 -50
- package/typechain-types/IPMarketAddRemoveCallback.ts +10 -10
- package/typechain-types/IPMarketFactory.ts +28 -6
- package/typechain-types/IPMarketSwapCallback.ts +5 -5
- package/typechain-types/{IPOwnershipToken.ts → IPPrincipalToken.ts} +5 -5
- package/typechain-types/IPRouterStatic.ts +50 -530
- package/typechain-types/IPYieldContractFactory.ts +85 -19
- package/typechain-types/IPYieldToken.ts +138 -37
- package/typechain-types/ISuperComposableYield.ts +13 -0
- package/typechain-types/IWstETH.ts +149 -0
- package/typechain-types/PendleAaveV3SCY.ts +110 -0
- package/typechain-types/PendleBaseToken.ts +1 -1
- package/typechain-types/PendleBenQiErc20SCY.ts +55 -12
- package/typechain-types/PendleBtrflyScy.ts +27 -23
- package/typechain-types/PendleGovernanceManager.ts +5 -5
- package/typechain-types/PendleMarket.ts +197 -100
- package/typechain-types/PendleMarketFactory.ts +96 -34
- package/typechain-types/{PendleOwnershipToken.ts → PendlePrincipalToken.ts} +15 -6
- package/typechain-types/PendleRouter.ts +19 -0
- package/typechain-types/PendleRouterRedeemUpg.ts +125 -0
- package/typechain-types/PendleStEthSCY.ts +872 -0
- package/typechain-types/PendleYearnVaultScy.ts +27 -23
- package/typechain-types/PendleYieldContractFactory.ts +94 -28
- package/typechain-types/PendleYieldToken.ts +142 -57
- package/typechain-types/RewardManager.ts +21 -0
- package/typechain-types/RouterStatic.ts +50 -530
- package/typechain-types/SCYBase.ts +25 -0
- package/typechain-types/SCYBaseWithRewards.ts +64 -0
- package/typechain-types/factories/ActionCallback__factory.ts +2 -2
- package/typechain-types/factories/ActionCore__factory.ts +263 -79
- package/typechain-types/factories/ActionRedeem__factory.ts +105 -0
- package/typechain-types/factories/ActionSCYAndPYBase__factory.ts +200 -0
- package/typechain-types/factories/ActionSCYAndYOBase__factory.ts +148 -0
- package/typechain-types/factories/ActionSCYAndYTBase__factory.ts +173 -0
- package/typechain-types/factories/ActionYT__factory.ts +265 -56
- package/typechain-types/factories/IPActionCore__factory.ts +114 -78
- package/typechain-types/factories/IPActionRedeem__factory.ts +70 -0
- package/typechain-types/factories/IPActionYT__factory.ts +90 -54
- package/typechain-types/factories/IPAllAction__factory.ts +254 -138
- package/typechain-types/factories/IPMarketAddRemoveCallback__factory.ts +2 -2
- package/typechain-types/factories/IPMarketFactory__factory.ts +26 -1
- package/typechain-types/factories/IPMarketSwapCallback__factory.ts +1 -1
- package/typechain-types/factories/IPMarket__factory.ts +125 -13
- package/typechain-types/factories/{IPOwnershipToken__factory.ts → IPPrincipalToken__factory.ts} +8 -8
- package/typechain-types/factories/IPRouterStatic__factory.ts +12 -628
- package/typechain-types/factories/IPYieldContractFactory__factory.ts +72 -2
- package/typechain-types/factories/IPYieldToken__factory.ts +93 -7
- package/typechain-types/factories/ISuperComposableYield__factory.ts +13 -0
- package/typechain-types/factories/IWstETH__factory.ts +74 -0
- package/typechain-types/factories/PendleAaveV3SCY__factory.ts +97 -3
- package/typechain-types/factories/PendleBaseToken__factory.ts +1 -1
- package/typechain-types/factories/PendleBenQiErc20SCY__factory.ts +62 -7
- package/typechain-types/factories/PendleBtrflyScy__factory.ts +42 -19
- package/typechain-types/factories/PendleGovernanceManager__factory.ts +2 -2
- package/typechain-types/factories/PendleMarketFactory__factory.ts +66 -15
- package/typechain-types/factories/PendleMarket__factory.ts +170 -53
- package/typechain-types/factories/PendlePrincipalToken__factory.ts +540 -0
- package/typechain-types/factories/PendleRouterRedeemUpg__factory.ts +112 -0
- package/typechain-types/factories/PendleRouter__factory.ts +23 -1
- package/typechain-types/factories/PendleStEthSCY__factory.ts +716 -0
- package/typechain-types/factories/PendleYearnVaultScy__factory.ts +41 -18
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +75 -5
- package/typechain-types/factories/PendleYieldToken__factory.ts +102 -33
- package/typechain-types/factories/RewardManager__factory.ts +13 -0
- package/typechain-types/factories/RouterStatic__factory.ts +13 -629
- package/typechain-types/factories/SCYBaseWithRewards__factory.ts +60 -2
- package/typechain-types/factories/SCYBase__factory.ts +28 -2
- package/typechain-types/hardhat.d.ts +52 -16
- package/typechain-types/index.ts +14 -6
- package/typechain-types/factories/PendleOwnershipToken__factory.ts +0 -527
|
@@ -7,6 +7,37 @@ import { Provider } from "@ethersproject/providers";
|
|
|
7
7
|
import type { IPMarket, IPMarketInterface } from "../IPMarket";
|
|
8
8
|
|
|
9
9
|
const _abi = [
|
|
10
|
+
{
|
|
11
|
+
anonymous: false,
|
|
12
|
+
inputs: [
|
|
13
|
+
{
|
|
14
|
+
indexed: true,
|
|
15
|
+
internalType: "address",
|
|
16
|
+
name: "receiver",
|
|
17
|
+
type: "address",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
indexed: false,
|
|
21
|
+
internalType: "uint256",
|
|
22
|
+
name: "lpToAccount",
|
|
23
|
+
type: "uint256",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
indexed: false,
|
|
27
|
+
internalType: "uint256",
|
|
28
|
+
name: "scyUsed",
|
|
29
|
+
type: "uint256",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
indexed: false,
|
|
33
|
+
internalType: "uint256",
|
|
34
|
+
name: "ptUsed",
|
|
35
|
+
type: "uint256",
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
name: "AddLiquidity",
|
|
39
|
+
type: "event",
|
|
40
|
+
},
|
|
10
41
|
{
|
|
11
42
|
anonymous: false,
|
|
12
43
|
inputs: [
|
|
@@ -32,6 +63,68 @@ const _abi = [
|
|
|
32
63
|
name: "Approval",
|
|
33
64
|
type: "event",
|
|
34
65
|
},
|
|
66
|
+
{
|
|
67
|
+
anonymous: false,
|
|
68
|
+
inputs: [
|
|
69
|
+
{
|
|
70
|
+
indexed: true,
|
|
71
|
+
internalType: "address",
|
|
72
|
+
name: "receiver",
|
|
73
|
+
type: "address",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
indexed: false,
|
|
77
|
+
internalType: "uint256",
|
|
78
|
+
name: "lpRemoved",
|
|
79
|
+
type: "uint256",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
indexed: false,
|
|
83
|
+
internalType: "uint256",
|
|
84
|
+
name: "scyToAccount",
|
|
85
|
+
type: "uint256",
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
indexed: false,
|
|
89
|
+
internalType: "uint256",
|
|
90
|
+
name: "ptToAccount",
|
|
91
|
+
type: "uint256",
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
name: "RemoveLiquidity",
|
|
95
|
+
type: "event",
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
anonymous: false,
|
|
99
|
+
inputs: [
|
|
100
|
+
{
|
|
101
|
+
indexed: true,
|
|
102
|
+
internalType: "address",
|
|
103
|
+
name: "receiver",
|
|
104
|
+
type: "address",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
indexed: false,
|
|
108
|
+
internalType: "int256",
|
|
109
|
+
name: "ptToAccount",
|
|
110
|
+
type: "int256",
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
indexed: false,
|
|
114
|
+
internalType: "int256",
|
|
115
|
+
name: "scyToAccount",
|
|
116
|
+
type: "int256",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
indexed: false,
|
|
120
|
+
internalType: "uint256",
|
|
121
|
+
name: "netScyToReserve",
|
|
122
|
+
type: "uint256",
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
name: "Swap",
|
|
126
|
+
type: "event",
|
|
127
|
+
},
|
|
35
128
|
{
|
|
36
129
|
anonymous: false,
|
|
37
130
|
inputs: [
|
|
@@ -57,9 +150,28 @@ const _abi = [
|
|
|
57
150
|
name: "Transfer",
|
|
58
151
|
type: "event",
|
|
59
152
|
},
|
|
153
|
+
{
|
|
154
|
+
anonymous: false,
|
|
155
|
+
inputs: [
|
|
156
|
+
{
|
|
157
|
+
indexed: true,
|
|
158
|
+
internalType: "uint256",
|
|
159
|
+
name: "timestamp",
|
|
160
|
+
type: "uint256",
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
indexed: false,
|
|
164
|
+
internalType: "uint256",
|
|
165
|
+
name: "lnLastImpliedRate",
|
|
166
|
+
type: "uint256",
|
|
167
|
+
},
|
|
168
|
+
],
|
|
169
|
+
name: "UpdateImpliedRate",
|
|
170
|
+
type: "event",
|
|
171
|
+
},
|
|
60
172
|
{
|
|
61
173
|
inputs: [],
|
|
62
|
-
name: "
|
|
174
|
+
name: "PT",
|
|
63
175
|
outputs: [
|
|
64
176
|
{
|
|
65
177
|
internalType: "address",
|
|
@@ -110,7 +222,7 @@ const _abi = [
|
|
|
110
222
|
},
|
|
111
223
|
{
|
|
112
224
|
internalType: "uint256",
|
|
113
|
-
name: "
|
|
225
|
+
name: "ptDesired",
|
|
114
226
|
type: "uint256",
|
|
115
227
|
},
|
|
116
228
|
{
|
|
@@ -133,7 +245,7 @@ const _abi = [
|
|
|
133
245
|
},
|
|
134
246
|
{
|
|
135
247
|
internalType: "uint256",
|
|
136
|
-
name: "
|
|
248
|
+
name: "ptUsed",
|
|
137
249
|
type: "uint256",
|
|
138
250
|
},
|
|
139
251
|
],
|
|
@@ -273,7 +385,7 @@ const _abi = [
|
|
|
273
385
|
components: [
|
|
274
386
|
{
|
|
275
387
|
internalType: "int256",
|
|
276
|
-
name: "
|
|
388
|
+
name: "totalPt",
|
|
277
389
|
type: "int256",
|
|
278
390
|
},
|
|
279
391
|
{
|
|
@@ -303,7 +415,7 @@ const _abi = [
|
|
|
303
415
|
},
|
|
304
416
|
{
|
|
305
417
|
internalType: "uint256",
|
|
306
|
-
name: "
|
|
418
|
+
name: "lnFeeRateRoot",
|
|
307
419
|
type: "uint256",
|
|
308
420
|
},
|
|
309
421
|
{
|
|
@@ -323,7 +435,7 @@ const _abi = [
|
|
|
323
435
|
},
|
|
324
436
|
{
|
|
325
437
|
internalType: "uint256",
|
|
326
|
-
name: "
|
|
438
|
+
name: "lastLnImpliedRate",
|
|
327
439
|
type: "uint256",
|
|
328
440
|
},
|
|
329
441
|
{
|
|
@@ -350,8 +462,8 @@ const _abi = [
|
|
|
350
462
|
type: "address",
|
|
351
463
|
},
|
|
352
464
|
{
|
|
353
|
-
internalType: "contract
|
|
354
|
-
name: "
|
|
465
|
+
internalType: "contract IPPrincipalToken",
|
|
466
|
+
name: "_PT",
|
|
355
467
|
type: "address",
|
|
356
468
|
},
|
|
357
469
|
{
|
|
@@ -390,7 +502,7 @@ const _abi = [
|
|
|
390
502
|
},
|
|
391
503
|
{
|
|
392
504
|
internalType: "uint256",
|
|
393
|
-
name: "
|
|
505
|
+
name: "ptToAccount",
|
|
394
506
|
type: "uint256",
|
|
395
507
|
},
|
|
396
508
|
],
|
|
@@ -406,7 +518,7 @@ const _abi = [
|
|
|
406
518
|
},
|
|
407
519
|
{
|
|
408
520
|
internalType: "uint256",
|
|
409
|
-
name: "
|
|
521
|
+
name: "exactPtIn",
|
|
410
522
|
type: "uint256",
|
|
411
523
|
},
|
|
412
524
|
{
|
|
@@ -420,7 +532,7 @@ const _abi = [
|
|
|
420
532
|
type: "bytes",
|
|
421
533
|
},
|
|
422
534
|
],
|
|
423
|
-
name: "
|
|
535
|
+
name: "swapExactPtForScy",
|
|
424
536
|
outputs: [
|
|
425
537
|
{
|
|
426
538
|
internalType: "uint256",
|
|
@@ -445,7 +557,7 @@ const _abi = [
|
|
|
445
557
|
},
|
|
446
558
|
{
|
|
447
559
|
internalType: "uint256",
|
|
448
|
-
name: "
|
|
560
|
+
name: "exactPtOut",
|
|
449
561
|
type: "uint256",
|
|
450
562
|
},
|
|
451
563
|
{
|
|
@@ -459,7 +571,7 @@ const _abi = [
|
|
|
459
571
|
type: "bytes",
|
|
460
572
|
},
|
|
461
573
|
],
|
|
462
|
-
name: "
|
|
574
|
+
name: "swapScyForExactPt",
|
|
463
575
|
outputs: [
|
|
464
576
|
{
|
|
465
577
|
internalType: "uint256",
|
package/typechain-types/factories/{IPOwnershipToken__factory.ts → IPPrincipalToken__factory.ts}
RENAMED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import { Contract, Signer, utils } from "ethers";
|
|
6
6
|
import { Provider } from "@ethersproject/providers";
|
|
7
7
|
import type {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from "../
|
|
8
|
+
IPPrincipalToken,
|
|
9
|
+
IPPrincipalTokenInterface,
|
|
10
|
+
} from "../IPPrincipalToken";
|
|
11
11
|
|
|
12
12
|
const _abi = [
|
|
13
13
|
{
|
|
@@ -335,15 +335,15 @@ const _abi = [
|
|
|
335
335
|
},
|
|
336
336
|
];
|
|
337
337
|
|
|
338
|
-
export class
|
|
338
|
+
export class IPPrincipalToken__factory {
|
|
339
339
|
static readonly abi = _abi;
|
|
340
|
-
static createInterface():
|
|
341
|
-
return new utils.Interface(_abi) as
|
|
340
|
+
static createInterface(): IPPrincipalTokenInterface {
|
|
341
|
+
return new utils.Interface(_abi) as IPPrincipalTokenInterface;
|
|
342
342
|
}
|
|
343
343
|
static connect(
|
|
344
344
|
address: string,
|
|
345
345
|
signerOrProvider: Signer | Provider
|
|
346
|
-
):
|
|
347
|
-
return new Contract(address, _abi, signerOrProvider) as
|
|
346
|
+
): IPPrincipalToken {
|
|
347
|
+
return new Contract(address, _abi, signerOrProvider) as IPPrincipalToken;
|
|
348
348
|
}
|
|
349
349
|
}
|