@pendle/core-v2 0.2.3 → 0.4.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 +15 -5
- package/contracts/SuperComposableYield/implementations/RewardManager.sol +2 -2
- package/contracts/SuperComposableYield/implementations/SCYBase.sol +23 -3
- package/contracts/SuperComposableYield/implementations/SCYBaseWithRewards.sol +4 -7
- package/contracts/core/PendleMarket.sol +24 -22
- package/contracts/core/PendleMarketFactory.sol +7 -6
- package/contracts/core/PendleSCYImpl/PendleBenQiErc20SCY.sol +1 -1
- package/contracts/core/PendleSCYImpl/PendleBtrflySCY.sol +2 -7
- package/contracts/core/PendleSCYImpl/PendleYearnVaultSCY.sol +2 -7
- package/contracts/core/PendleYieldContractFactory.sol +12 -7
- package/contracts/core/PendleYieldToken.sol +93 -55
- package/contracts/core/router/PendleRouterCoreUpg.sol +35 -21
- package/contracts/core/router/PendleRouterProxy.sol +12 -6
- package/contracts/core/router/PendleRouterStaticUpg.sol +43 -18
- package/contracts/core/router/PendleRouterYTUpg.sol +47 -13
- package/contracts/core/router/base/PendleRouterOTBaseUpg.sol +22 -32
- package/contracts/core/router/base/PendleRouterSCYAndForgeBaseUpg.sol +4 -4
- package/contracts/core/router/base/PendleRouterYTBaseUpg.sol +62 -43
- package/contracts/interfaces/IPMarket.sol +4 -2
- package/contracts/interfaces/{IPPermissionsV2.sol → IPPermissionsV2Upg.sol} +1 -1
- package/contracts/interfaces/IPRouterCore.sol +24 -21
- package/contracts/interfaces/IPRouterStatic.sol +10 -1
- package/contracts/interfaces/IPRouterYT.sol +16 -4
- package/contracts/interfaces/IPYieldContractFactory.sol +4 -0
- package/contracts/interfaces/IPYieldToken.sol +2 -4
- package/contracts/libraries/SCYIndex.sol +3 -3
- package/contracts/libraries/math/LogExpMath.sol +1 -90
- package/contracts/libraries/math/MarketApproxLib.sol +336 -94
- package/contracts/libraries/math/MarketMathAux.sol +101 -0
- package/contracts/libraries/math/MarketMathCore.sol +423 -0
- package/contracts/libraries/math/Math.sol +144 -0
- package/contracts/{core/misc → periphery}/PendleJoeSwapHelperUpg.sol +2 -2
- package/contracts/periphery/{PermissionsV2.sol → PermissionsV2Upg.sol} +2 -2
- package/package.json +1 -1
- package/typechain-types/IPMarket.ts +22 -11
- package/typechain-types/IPRouterCore.ts +68 -58
- package/typechain-types/IPRouterStatic.ts +52 -0
- package/typechain-types/IPRouterYT.ts +96 -12
- package/typechain-types/IPYieldContractFactory.ts +32 -0
- package/typechain-types/IPYieldToken.ts +14 -48
- package/typechain-types/IPermissionsV2Upg.ts +87 -0
- package/typechain-types/ISuperComposableYield.ts +98 -11
- package/typechain-types/OwnableUpgradeable.ts +165 -0
- package/typechain-types/PendleAaveV3SCY.ts +98 -11
- package/typechain-types/PendleBenQiErc20SCY.ts +98 -11
- package/typechain-types/PendleBtrflyScy.ts +98 -11
- package/typechain-types/PendleMarket.ts +22 -11
- package/typechain-types/PendleRouterCoreUpg.ts +66 -48
- package/typechain-types/PendleRouterProxy.ts +15 -118
- package/typechain-types/PendleRouterStaticUpg.ts +92 -0
- package/typechain-types/PendleRouterYTUpg.ts +96 -12
- package/typechain-types/PendleYearnVaultScy.ts +98 -11
- package/typechain-types/PendleYieldContractFactory.ts +40 -113
- package/typechain-types/PendleYieldToken.ts +106 -7
- package/typechain-types/PermissionsV2Upg.ts +87 -0
- package/typechain-types/SCYBase.ts +98 -11
- package/typechain-types/SCYBaseWithRewards.ts +98 -11
- package/typechain-types/factories/IPMarket__factory.ts +8 -2
- package/typechain-types/factories/IPRouterCore__factory.ts +38 -23
- package/typechain-types/factories/IPRouterStatic__factory.ts +29 -0
- package/typechain-types/factories/IPRouterYT__factory.ts +65 -6
- package/typechain-types/factories/IPYieldContractFactory__factory.ts +38 -0
- package/typechain-types/factories/IPYieldToken__factory.ts +1 -20
- package/typechain-types/factories/IPermissionsV2Upg__factory.ts +39 -0
- package/typechain-types/factories/ISuperComposableYield__factory.ts +65 -2
- package/typechain-types/factories/OwnableUpgradeable__factory.ts +78 -0
- package/typechain-types/factories/PendleAaveV3SCY__factory.ts +66 -3
- package/typechain-types/factories/PendleBenQiErc20SCY__factory.ts +66 -3
- package/typechain-types/factories/PendleBtrflyScy__factory.ts +66 -3
- package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleMarket__factory.ts +9 -3
- package/typechain-types/factories/PendleRouterCoreUpg__factory.ts +26 -11
- package/typechain-types/factories/PendleRouterProxy__factory.ts +14 -67
- package/typechain-types/factories/PendleRouterStaticUpg__factory.ts +63 -17
- package/typechain-types/factories/PendleRouterYTUpg__factory.ts +66 -7
- package/typechain-types/factories/PendleYearnVaultScy__factory.ts +66 -3
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +39 -54
- package/typechain-types/factories/PendleYieldToken__factory.ts +53 -2
- package/typechain-types/factories/PermissionsV2Upg__factory.ts +39 -0
- package/typechain-types/factories/SCYBaseWithRewards__factory.ts +65 -2
- package/typechain-types/factories/SCYBase__factory.ts +65 -2
- package/typechain-types/hardhat.d.ts +26 -53
- package/typechain-types/index.ts +8 -14
- package/contracts/core/misc/BoringOwnable.sol +0 -62
- package/contracts/core/misc/BoringOwnableUpg.sol +0 -64
- package/contracts/libraries/math/FixedPoint.sol +0 -205
- package/contracts/libraries/math/MarketMathLib.sol +0 -614
|
@@ -282,6 +282,11 @@ const _abi = [
|
|
|
282
282
|
name: "baseTokenIn",
|
|
283
283
|
type: "address",
|
|
284
284
|
},
|
|
285
|
+
{
|
|
286
|
+
internalType: "uint256",
|
|
287
|
+
name: "amountBaseToPull",
|
|
288
|
+
type: "uint256",
|
|
289
|
+
},
|
|
285
290
|
{
|
|
286
291
|
internalType: "uint256",
|
|
287
292
|
name: "minAmountScyOut",
|
|
@@ -299,6 +304,35 @@ const _abi = [
|
|
|
299
304
|
stateMutability: "nonpayable",
|
|
300
305
|
type: "function",
|
|
301
306
|
},
|
|
307
|
+
{
|
|
308
|
+
inputs: [
|
|
309
|
+
{
|
|
310
|
+
internalType: "address",
|
|
311
|
+
name: "receiver",
|
|
312
|
+
type: "address",
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
internalType: "address",
|
|
316
|
+
name: "baseTokenIn",
|
|
317
|
+
type: "address",
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
internalType: "uint256",
|
|
321
|
+
name: "minAmountScyOut",
|
|
322
|
+
type: "uint256",
|
|
323
|
+
},
|
|
324
|
+
],
|
|
325
|
+
name: "mintNoPull",
|
|
326
|
+
outputs: [
|
|
327
|
+
{
|
|
328
|
+
internalType: "uint256",
|
|
329
|
+
name: "amountScyOut",
|
|
330
|
+
type: "uint256",
|
|
331
|
+
},
|
|
332
|
+
],
|
|
333
|
+
stateMutability: "nonpayable",
|
|
334
|
+
type: "function",
|
|
335
|
+
},
|
|
302
336
|
{
|
|
303
337
|
inputs: [],
|
|
304
338
|
name: "name",
|
|
@@ -324,6 +358,11 @@ const _abi = [
|
|
|
324
358
|
name: "baseTokenOut",
|
|
325
359
|
type: "address",
|
|
326
360
|
},
|
|
361
|
+
{
|
|
362
|
+
internalType: "uint256",
|
|
363
|
+
name: "amountScyToPull",
|
|
364
|
+
type: "uint256",
|
|
365
|
+
},
|
|
327
366
|
{
|
|
328
367
|
internalType: "uint256",
|
|
329
368
|
name: "minAmountBaseOut",
|
|
@@ -345,12 +384,36 @@ const _abi = [
|
|
|
345
384
|
inputs: [
|
|
346
385
|
{
|
|
347
386
|
internalType: "address",
|
|
348
|
-
name: "
|
|
387
|
+
name: "receiver",
|
|
349
388
|
type: "address",
|
|
350
389
|
},
|
|
351
390
|
{
|
|
352
391
|
internalType: "address",
|
|
353
|
-
name: "
|
|
392
|
+
name: "baseTokenOut",
|
|
393
|
+
type: "address",
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
internalType: "uint256",
|
|
397
|
+
name: "minAmountBaseOut",
|
|
398
|
+
type: "uint256",
|
|
399
|
+
},
|
|
400
|
+
],
|
|
401
|
+
name: "redeemNoPull",
|
|
402
|
+
outputs: [
|
|
403
|
+
{
|
|
404
|
+
internalType: "uint256",
|
|
405
|
+
name: "amountBaseOut",
|
|
406
|
+
type: "uint256",
|
|
407
|
+
},
|
|
408
|
+
],
|
|
409
|
+
stateMutability: "nonpayable",
|
|
410
|
+
type: "function",
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
inputs: [
|
|
414
|
+
{
|
|
415
|
+
internalType: "address",
|
|
416
|
+
name: "user",
|
|
354
417
|
type: "address",
|
|
355
418
|
},
|
|
356
419
|
],
|
|
@@ -255,6 +255,11 @@ const _abi = [
|
|
|
255
255
|
name: "baseTokenIn",
|
|
256
256
|
type: "address",
|
|
257
257
|
},
|
|
258
|
+
{
|
|
259
|
+
internalType: "uint256",
|
|
260
|
+
name: "amountBaseToPull",
|
|
261
|
+
type: "uint256",
|
|
262
|
+
},
|
|
258
263
|
{
|
|
259
264
|
internalType: "uint256",
|
|
260
265
|
name: "minAmountScyOut",
|
|
@@ -272,6 +277,35 @@ const _abi = [
|
|
|
272
277
|
stateMutability: "nonpayable",
|
|
273
278
|
type: "function",
|
|
274
279
|
},
|
|
280
|
+
{
|
|
281
|
+
inputs: [
|
|
282
|
+
{
|
|
283
|
+
internalType: "address",
|
|
284
|
+
name: "receiver",
|
|
285
|
+
type: "address",
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
internalType: "address",
|
|
289
|
+
name: "baseTokenIn",
|
|
290
|
+
type: "address",
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
internalType: "uint256",
|
|
294
|
+
name: "minAmountScyOut",
|
|
295
|
+
type: "uint256",
|
|
296
|
+
},
|
|
297
|
+
],
|
|
298
|
+
name: "mintNoPull",
|
|
299
|
+
outputs: [
|
|
300
|
+
{
|
|
301
|
+
internalType: "uint256",
|
|
302
|
+
name: "amountScyOut",
|
|
303
|
+
type: "uint256",
|
|
304
|
+
},
|
|
305
|
+
],
|
|
306
|
+
stateMutability: "nonpayable",
|
|
307
|
+
type: "function",
|
|
308
|
+
},
|
|
275
309
|
{
|
|
276
310
|
inputs: [],
|
|
277
311
|
name: "name",
|
|
@@ -297,6 +331,11 @@ const _abi = [
|
|
|
297
331
|
name: "baseTokenOut",
|
|
298
332
|
type: "address",
|
|
299
333
|
},
|
|
334
|
+
{
|
|
335
|
+
internalType: "uint256",
|
|
336
|
+
name: "amountScyToPull",
|
|
337
|
+
type: "uint256",
|
|
338
|
+
},
|
|
300
339
|
{
|
|
301
340
|
internalType: "uint256",
|
|
302
341
|
name: "minAmountBaseOut",
|
|
@@ -318,12 +357,36 @@ const _abi = [
|
|
|
318
357
|
inputs: [
|
|
319
358
|
{
|
|
320
359
|
internalType: "address",
|
|
321
|
-
name: "
|
|
360
|
+
name: "receiver",
|
|
322
361
|
type: "address",
|
|
323
362
|
},
|
|
324
363
|
{
|
|
325
364
|
internalType: "address",
|
|
326
|
-
name: "
|
|
365
|
+
name: "baseTokenOut",
|
|
366
|
+
type: "address",
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
internalType: "uint256",
|
|
370
|
+
name: "minAmountBaseOut",
|
|
371
|
+
type: "uint256",
|
|
372
|
+
},
|
|
373
|
+
],
|
|
374
|
+
name: "redeemNoPull",
|
|
375
|
+
outputs: [
|
|
376
|
+
{
|
|
377
|
+
internalType: "uint256",
|
|
378
|
+
name: "amountBaseOut",
|
|
379
|
+
type: "uint256",
|
|
380
|
+
},
|
|
381
|
+
],
|
|
382
|
+
stateMutability: "nonpayable",
|
|
383
|
+
type: "function",
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
inputs: [
|
|
387
|
+
{
|
|
388
|
+
internalType: "address",
|
|
389
|
+
name: "user",
|
|
327
390
|
type: "address",
|
|
328
391
|
},
|
|
329
392
|
],
|
|
@@ -12,6 +12,10 @@ import * as Contracts from ".";
|
|
|
12
12
|
|
|
13
13
|
declare module "hardhat/types/runtime" {
|
|
14
14
|
interface HardhatEthersHelpers extends HardhatEthersHelpersBase {
|
|
15
|
+
getContractFactory(
|
|
16
|
+
name: "OwnableUpgradeable",
|
|
17
|
+
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
18
|
+
): Promise<Contracts.OwnableUpgradeable__factory>;
|
|
15
19
|
getContractFactory(
|
|
16
20
|
name: "IERC1822ProxiableUpgradeable",
|
|
17
21
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
@@ -44,26 +48,6 @@ declare module "hardhat/types/runtime" {
|
|
|
44
48
|
name: "IERC20",
|
|
45
49
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
46
50
|
): Promise<Contracts.IERC20__factory>;
|
|
47
|
-
getContractFactory(
|
|
48
|
-
name: "BoringOwnable",
|
|
49
|
-
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
50
|
-
): Promise<Contracts.BoringOwnable__factory>;
|
|
51
|
-
getContractFactory(
|
|
52
|
-
name: "BoringOwnableData",
|
|
53
|
-
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
54
|
-
): Promise<Contracts.BoringOwnableData__factory>;
|
|
55
|
-
getContractFactory(
|
|
56
|
-
name: "BoringOwnableUpg",
|
|
57
|
-
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
58
|
-
): Promise<Contracts.BoringOwnableUpg__factory>;
|
|
59
|
-
getContractFactory(
|
|
60
|
-
name: "BoringOwnableUpgData",
|
|
61
|
-
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
62
|
-
): Promise<Contracts.BoringOwnableUpgData__factory>;
|
|
63
|
-
getContractFactory(
|
|
64
|
-
name: "PendleJoeSwapHelperUpg",
|
|
65
|
-
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
66
|
-
): Promise<Contracts.PendleJoeSwapHelperUpg__factory>;
|
|
67
51
|
getContractFactory(
|
|
68
52
|
name: "PendleBaseToken",
|
|
69
53
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
@@ -185,9 +169,9 @@ declare module "hardhat/types/runtime" {
|
|
|
185
169
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
186
170
|
): Promise<Contracts.IPOwnershipToken__factory>;
|
|
187
171
|
getContractFactory(
|
|
188
|
-
name: "
|
|
172
|
+
name: "IPermissionsV2Upg",
|
|
189
173
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
190
|
-
): Promise<Contracts.
|
|
174
|
+
): Promise<Contracts.IPermissionsV2Upg__factory>;
|
|
191
175
|
getContractFactory(
|
|
192
176
|
name: "IPRouterCore",
|
|
193
177
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
@@ -237,9 +221,13 @@ declare module "hardhat/types/runtime" {
|
|
|
237
221
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
238
222
|
): Promise<Contracts.PendleGovernanceManager__factory>;
|
|
239
223
|
getContractFactory(
|
|
240
|
-
name: "
|
|
224
|
+
name: "PendleJoeSwapHelperUpg",
|
|
241
225
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
242
|
-
): Promise<Contracts.
|
|
226
|
+
): Promise<Contracts.PendleJoeSwapHelperUpg__factory>;
|
|
227
|
+
getContractFactory(
|
|
228
|
+
name: "PermissionsV2Upg",
|
|
229
|
+
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
230
|
+
): Promise<Contracts.PermissionsV2Upg__factory>;
|
|
243
231
|
getContractFactory(
|
|
244
232
|
name: "RewardManager",
|
|
245
233
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
@@ -257,6 +245,11 @@ declare module "hardhat/types/runtime" {
|
|
|
257
245
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
258
246
|
): Promise<Contracts.ISuperComposableYield__factory>;
|
|
259
247
|
|
|
248
|
+
getContractAt(
|
|
249
|
+
name: "OwnableUpgradeable",
|
|
250
|
+
address: string,
|
|
251
|
+
signer?: ethers.Signer
|
|
252
|
+
): Promise<Contracts.OwnableUpgradeable>;
|
|
260
253
|
getContractAt(
|
|
261
254
|
name: "IERC1822ProxiableUpgradeable",
|
|
262
255
|
address: string,
|
|
@@ -297,31 +290,6 @@ declare module "hardhat/types/runtime" {
|
|
|
297
290
|
address: string,
|
|
298
291
|
signer?: ethers.Signer
|
|
299
292
|
): Promise<Contracts.IERC20>;
|
|
300
|
-
getContractAt(
|
|
301
|
-
name: "BoringOwnable",
|
|
302
|
-
address: string,
|
|
303
|
-
signer?: ethers.Signer
|
|
304
|
-
): Promise<Contracts.BoringOwnable>;
|
|
305
|
-
getContractAt(
|
|
306
|
-
name: "BoringOwnableData",
|
|
307
|
-
address: string,
|
|
308
|
-
signer?: ethers.Signer
|
|
309
|
-
): Promise<Contracts.BoringOwnableData>;
|
|
310
|
-
getContractAt(
|
|
311
|
-
name: "BoringOwnableUpg",
|
|
312
|
-
address: string,
|
|
313
|
-
signer?: ethers.Signer
|
|
314
|
-
): Promise<Contracts.BoringOwnableUpg>;
|
|
315
|
-
getContractAt(
|
|
316
|
-
name: "BoringOwnableUpgData",
|
|
317
|
-
address: string,
|
|
318
|
-
signer?: ethers.Signer
|
|
319
|
-
): Promise<Contracts.BoringOwnableUpgData>;
|
|
320
|
-
getContractAt(
|
|
321
|
-
name: "PendleJoeSwapHelperUpg",
|
|
322
|
-
address: string,
|
|
323
|
-
signer?: ethers.Signer
|
|
324
|
-
): Promise<Contracts.PendleJoeSwapHelperUpg>;
|
|
325
293
|
getContractAt(
|
|
326
294
|
name: "PendleBaseToken",
|
|
327
295
|
address: string,
|
|
@@ -473,10 +441,10 @@ declare module "hardhat/types/runtime" {
|
|
|
473
441
|
signer?: ethers.Signer
|
|
474
442
|
): Promise<Contracts.IPOwnershipToken>;
|
|
475
443
|
getContractAt(
|
|
476
|
-
name: "
|
|
444
|
+
name: "IPermissionsV2Upg",
|
|
477
445
|
address: string,
|
|
478
446
|
signer?: ethers.Signer
|
|
479
|
-
): Promise<Contracts.
|
|
447
|
+
): Promise<Contracts.IPermissionsV2Upg>;
|
|
480
448
|
getContractAt(
|
|
481
449
|
name: "IPRouterCore",
|
|
482
450
|
address: string,
|
|
@@ -538,10 +506,15 @@ declare module "hardhat/types/runtime" {
|
|
|
538
506
|
signer?: ethers.Signer
|
|
539
507
|
): Promise<Contracts.PendleGovernanceManager>;
|
|
540
508
|
getContractAt(
|
|
541
|
-
name: "
|
|
509
|
+
name: "PendleJoeSwapHelperUpg",
|
|
510
|
+
address: string,
|
|
511
|
+
signer?: ethers.Signer
|
|
512
|
+
): Promise<Contracts.PendleJoeSwapHelperUpg>;
|
|
513
|
+
getContractAt(
|
|
514
|
+
name: "PermissionsV2Upg",
|
|
542
515
|
address: string,
|
|
543
516
|
signer?: ethers.Signer
|
|
544
|
-
): Promise<Contracts.
|
|
517
|
+
): Promise<Contracts.PermissionsV2Upg>;
|
|
545
518
|
getContractAt(
|
|
546
519
|
name: "RewardManager",
|
|
547
520
|
address: string,
|
package/typechain-types/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* Autogenerated file. Do not edit manually. */
|
|
2
2
|
/* tslint:disable */
|
|
3
3
|
/* eslint-disable */
|
|
4
|
+
export type { OwnableUpgradeable } from "./OwnableUpgradeable";
|
|
4
5
|
export type { IERC1822ProxiableUpgradeable } from "./IERC1822ProxiableUpgradeable";
|
|
5
6
|
export type { IBeaconUpgradeable } from "./IBeaconUpgradeable";
|
|
6
7
|
export type { ERC1967UpgradeUpgradeable } from "./ERC1967UpgradeUpgradeable";
|
|
@@ -9,11 +10,6 @@ export type { Proxy } from "./Proxy";
|
|
|
9
10
|
export type { ERC20 } from "./ERC20";
|
|
10
11
|
export type { IERC20Metadata } from "./IERC20Metadata";
|
|
11
12
|
export type { IERC20 } from "./IERC20";
|
|
12
|
-
export type { BoringOwnable } from "./BoringOwnable";
|
|
13
|
-
export type { BoringOwnableData } from "./BoringOwnableData";
|
|
14
|
-
export type { BoringOwnableUpg } from "./BoringOwnableUpg";
|
|
15
|
-
export type { BoringOwnableUpgData } from "./BoringOwnableUpgData";
|
|
16
|
-
export type { PendleJoeSwapHelperUpg } from "./PendleJoeSwapHelperUpg";
|
|
17
13
|
export type { PendleBaseToken } from "./PendleBaseToken";
|
|
18
14
|
export type { PendleMarket } from "./PendleMarket";
|
|
19
15
|
export type { PendleMarketFactory } from "./PendleMarketFactory";
|
|
@@ -44,7 +40,7 @@ export type { IPMarketAddRemoveCallback } from "./IPMarketAddRemoveCallback";
|
|
|
44
40
|
export type { IPMarketFactory } from "./IPMarketFactory";
|
|
45
41
|
export type { IPMarketSwapCallback } from "./IPMarketSwapCallback";
|
|
46
42
|
export type { IPOwnershipToken } from "./IPOwnershipToken";
|
|
47
|
-
export type {
|
|
43
|
+
export type { IPermissionsV2Upg } from "./IPermissionsV2Upg";
|
|
48
44
|
export type { IPRouterCore } from "./IPRouterCore";
|
|
49
45
|
export type { IPRouterStatic } from "./IPRouterStatic";
|
|
50
46
|
export type { IPRouterYT } from "./IPRouterYT";
|
|
@@ -57,12 +53,14 @@ export type { IWETH } from "./IWETH";
|
|
|
57
53
|
export type { IWXBTRFLY } from "./IWXBTRFLY";
|
|
58
54
|
export type { IYearnVault } from "./IYearnVault";
|
|
59
55
|
export type { PendleGovernanceManager } from "./PendleGovernanceManager";
|
|
60
|
-
export type {
|
|
56
|
+
export type { PendleJoeSwapHelperUpg } from "./PendleJoeSwapHelperUpg";
|
|
57
|
+
export type { PermissionsV2Upg } from "./PermissionsV2Upg";
|
|
61
58
|
export type { RewardManager } from "./RewardManager";
|
|
62
59
|
export type { SCYBase } from "./SCYBase";
|
|
63
60
|
export type { SCYBaseWithRewards } from "./SCYBaseWithRewards";
|
|
64
61
|
export type { ISuperComposableYield } from "./ISuperComposableYield";
|
|
65
62
|
|
|
63
|
+
export { OwnableUpgradeable__factory } from "./factories/OwnableUpgradeable__factory";
|
|
66
64
|
export { IERC1822ProxiableUpgradeable__factory } from "./factories/IERC1822ProxiableUpgradeable__factory";
|
|
67
65
|
export { IBeaconUpgradeable__factory } from "./factories/IBeaconUpgradeable__factory";
|
|
68
66
|
export { ERC1967UpgradeUpgradeable__factory } from "./factories/ERC1967UpgradeUpgradeable__factory";
|
|
@@ -71,11 +69,6 @@ export { Proxy__factory } from "./factories/Proxy__factory";
|
|
|
71
69
|
export { ERC20__factory } from "./factories/ERC20__factory";
|
|
72
70
|
export { IERC20Metadata__factory } from "./factories/IERC20Metadata__factory";
|
|
73
71
|
export { IERC20__factory } from "./factories/IERC20__factory";
|
|
74
|
-
export { BoringOwnable__factory } from "./factories/BoringOwnable__factory";
|
|
75
|
-
export { BoringOwnableData__factory } from "./factories/BoringOwnableData__factory";
|
|
76
|
-
export { BoringOwnableUpg__factory } from "./factories/BoringOwnableUpg__factory";
|
|
77
|
-
export { BoringOwnableUpgData__factory } from "./factories/BoringOwnableUpgData__factory";
|
|
78
|
-
export { PendleJoeSwapHelperUpg__factory } from "./factories/PendleJoeSwapHelperUpg__factory";
|
|
79
72
|
export { PendleBaseToken__factory } from "./factories/PendleBaseToken__factory";
|
|
80
73
|
export { PendleMarket__factory } from "./factories/PendleMarket__factory";
|
|
81
74
|
export { PendleMarketFactory__factory } from "./factories/PendleMarketFactory__factory";
|
|
@@ -106,7 +99,7 @@ export { IPMarketAddRemoveCallback__factory } from "./factories/IPMarketAddRemov
|
|
|
106
99
|
export { IPMarketFactory__factory } from "./factories/IPMarketFactory__factory";
|
|
107
100
|
export { IPMarketSwapCallback__factory } from "./factories/IPMarketSwapCallback__factory";
|
|
108
101
|
export { IPOwnershipToken__factory } from "./factories/IPOwnershipToken__factory";
|
|
109
|
-
export {
|
|
102
|
+
export { IPermissionsV2Upg__factory } from "./factories/IPermissionsV2Upg__factory";
|
|
110
103
|
export { IPRouterCore__factory } from "./factories/IPRouterCore__factory";
|
|
111
104
|
export { IPRouterStatic__factory } from "./factories/IPRouterStatic__factory";
|
|
112
105
|
export { IPRouterYT__factory } from "./factories/IPRouterYT__factory";
|
|
@@ -119,7 +112,8 @@ export { IWETH__factory } from "./factories/IWETH__factory";
|
|
|
119
112
|
export { IWXBTRFLY__factory } from "./factories/IWXBTRFLY__factory";
|
|
120
113
|
export { IYearnVault__factory } from "./factories/IYearnVault__factory";
|
|
121
114
|
export { PendleGovernanceManager__factory } from "./factories/PendleGovernanceManager__factory";
|
|
122
|
-
export {
|
|
115
|
+
export { PendleJoeSwapHelperUpg__factory } from "./factories/PendleJoeSwapHelperUpg__factory";
|
|
116
|
+
export { PermissionsV2Upg__factory } from "./factories/PermissionsV2Upg__factory";
|
|
123
117
|
export { RewardManager__factory } from "./factories/RewardManager__factory";
|
|
124
118
|
export { SCYBase__factory } from "./factories/SCYBase__factory";
|
|
125
119
|
export { SCYBaseWithRewards__factory } from "./factories/SCYBaseWithRewards__factory";
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.9;
|
|
3
|
-
|
|
4
|
-
// Audit on 5-Jan-2021 by Keno and BoringCrypto
|
|
5
|
-
// Source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol + Claimable.sol
|
|
6
|
-
// Edited by BoringCrypto
|
|
7
|
-
|
|
8
|
-
contract BoringOwnableData {
|
|
9
|
-
address public owner;
|
|
10
|
-
address public pendingOwner;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
contract BoringOwnable is BoringOwnableData {
|
|
14
|
-
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
|
|
15
|
-
|
|
16
|
-
/// @notice Only allows the `owner` to execute the function.
|
|
17
|
-
modifier onlyOwner() {
|
|
18
|
-
require(msg.sender == owner, "Ownable: caller is not the owner");
|
|
19
|
-
_;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
constructor(address _owner) {
|
|
23
|
-
owner = _owner;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/// @notice Transfers ownership to `newOwner`. Either directly or claimable by the new pending owner.
|
|
27
|
-
/// Can only be invoked by the current `owner`.
|
|
28
|
-
/// @param newOwner Address of the new owner.
|
|
29
|
-
/// @param direct True if `newOwner` should be set immediately. False if `newOwner` needs to use `claimOwnership`.
|
|
30
|
-
/// @param renounce Allows the `newOwner` to be `address(0)` if `direct` and `renounce` is True. Has no effect otherwise.
|
|
31
|
-
function transferOwnership(
|
|
32
|
-
address newOwner,
|
|
33
|
-
bool direct,
|
|
34
|
-
bool renounce
|
|
35
|
-
) public onlyOwner {
|
|
36
|
-
if (direct) {
|
|
37
|
-
// Checks
|
|
38
|
-
require(newOwner != address(0) || renounce, "Ownable: zero address");
|
|
39
|
-
|
|
40
|
-
// Effects
|
|
41
|
-
emit OwnershipTransferred(owner, newOwner);
|
|
42
|
-
owner = newOwner;
|
|
43
|
-
pendingOwner = address(0);
|
|
44
|
-
} else {
|
|
45
|
-
// Effects
|
|
46
|
-
pendingOwner = newOwner;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/// @notice Needs to be called by `pendingOwner` to claim ownership.
|
|
51
|
-
function claimOwnership() public {
|
|
52
|
-
address _pendingOwner = pendingOwner;
|
|
53
|
-
|
|
54
|
-
// Checks
|
|
55
|
-
require(msg.sender == _pendingOwner, "Ownable: caller != pending owner");
|
|
56
|
-
|
|
57
|
-
// Effects
|
|
58
|
-
emit OwnershipTransferred(owner, _pendingOwner);
|
|
59
|
-
owner = _pendingOwner;
|
|
60
|
-
pendingOwner = address(0);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.9;
|
|
3
|
-
|
|
4
|
-
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
|
|
5
|
-
|
|
6
|
-
/// Modified by the Pendle team, needs to audit
|
|
7
|
-
|
|
8
|
-
contract BoringOwnableUpgData {
|
|
9
|
-
address public owner;
|
|
10
|
-
address public pendingOwner;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
contract BoringOwnableUpg is BoringOwnableUpgData, Initializable {
|
|
14
|
-
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
|
|
15
|
-
|
|
16
|
-
function __BoringOwnable_init() internal onlyInitializing {
|
|
17
|
-
owner = msg.sender;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/// @notice Transfers ownership to `newOwner`. Either directly or claimable by the new pending owner.
|
|
21
|
-
/// Can only be invoked by the current `owner`.
|
|
22
|
-
/// @param newOwner Address of the new owner.
|
|
23
|
-
/// @param direct True if `newOwner` should be set immediately. False if `newOwner` needs to use `claimOwnership`.
|
|
24
|
-
/// @param renounce Allows the `newOwner` to be `address(0)` if `direct` and `renounce` is True. Has no effect otherwise.
|
|
25
|
-
function transferOwnership(
|
|
26
|
-
address newOwner,
|
|
27
|
-
bool direct,
|
|
28
|
-
bool renounce
|
|
29
|
-
) public onlyOwner {
|
|
30
|
-
if (direct) {
|
|
31
|
-
// Checks
|
|
32
|
-
require(newOwner != address(0) || renounce, "Ownable: zero address");
|
|
33
|
-
|
|
34
|
-
// Effects
|
|
35
|
-
emit OwnershipTransferred(owner, newOwner);
|
|
36
|
-
owner = newOwner;
|
|
37
|
-
pendingOwner = address(0);
|
|
38
|
-
} else {
|
|
39
|
-
// Effects
|
|
40
|
-
pendingOwner = newOwner;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/// @notice Needs to be called by `pendingOwner` to claim ownership.
|
|
45
|
-
function claimOwnership() public {
|
|
46
|
-
address _pendingOwner = pendingOwner;
|
|
47
|
-
|
|
48
|
-
// Checks
|
|
49
|
-
require(msg.sender == _pendingOwner, "Ownable: caller != pending owner");
|
|
50
|
-
|
|
51
|
-
// Effects
|
|
52
|
-
emit OwnershipTransferred(owner, _pendingOwner);
|
|
53
|
-
owner = _pendingOwner;
|
|
54
|
-
pendingOwner = address(0);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/// @notice Only allows the `owner` to execute the function.
|
|
58
|
-
modifier onlyOwner() {
|
|
59
|
-
require(msg.sender == owner, "Ownable: caller is not the owner");
|
|
60
|
-
_;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
uint256[48] private __gap;
|
|
64
|
-
}
|