@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
@@ -1,139 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
5
- import { Provider, TransactionRequest } from "@ethersproject/providers";
6
- import type {
7
- BoringOwnableUpg,
8
- BoringOwnableUpgInterface,
9
- } from "../BoringOwnableUpg";
10
-
11
- const _abi = [
12
- {
13
- anonymous: false,
14
- inputs: [
15
- {
16
- indexed: true,
17
- internalType: "address",
18
- name: "previousOwner",
19
- type: "address",
20
- },
21
- {
22
- indexed: true,
23
- internalType: "address",
24
- name: "newOwner",
25
- type: "address",
26
- },
27
- ],
28
- name: "OwnershipTransferred",
29
- type: "event",
30
- },
31
- {
32
- inputs: [],
33
- name: "claimOwnership",
34
- outputs: [],
35
- stateMutability: "nonpayable",
36
- type: "function",
37
- },
38
- {
39
- inputs: [],
40
- name: "owner",
41
- outputs: [
42
- {
43
- internalType: "address",
44
- name: "",
45
- type: "address",
46
- },
47
- ],
48
- stateMutability: "view",
49
- type: "function",
50
- },
51
- {
52
- inputs: [],
53
- name: "pendingOwner",
54
- outputs: [
55
- {
56
- internalType: "address",
57
- name: "",
58
- type: "address",
59
- },
60
- ],
61
- stateMutability: "view",
62
- type: "function",
63
- },
64
- {
65
- inputs: [
66
- {
67
- internalType: "address",
68
- name: "newOwner",
69
- type: "address",
70
- },
71
- {
72
- internalType: "bool",
73
- name: "direct",
74
- type: "bool",
75
- },
76
- {
77
- internalType: "bool",
78
- name: "renounce",
79
- type: "bool",
80
- },
81
- ],
82
- name: "transferOwnership",
83
- outputs: [],
84
- stateMutability: "nonpayable",
85
- type: "function",
86
- },
87
- ];
88
-
89
- const _bytecode =
90
- "0x608060405234801561001057600080fd5b50610349806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063078dfbe7146100515780634e71e0c8146100665780638da5cb5b1461006e578063e30c39781461009d575b600080fd5b61006461005f3660046102a2565b6100b0565b005b6100646101e2565b600054610081906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b600154610081906001600160a01b031681565b6000546001600160a01b0316331461010f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b81156101c0576001600160a01b0383161515806101295750805b61016d5760405162461bcd60e51b81526020600482015260156024820152744f776e61626c653a207a65726f206164647265737360581b6044820152606401610106565b600080546040516001600160a01b03808716939216916000805160206102f483398151915291a3600080546001600160a01b0385166001600160a01b031991821617909155600180549091169055505050565b600180546001600160a01b0385166001600160a01b0319909116179055505050565b6001546001600160a01b031633811461023d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e65726044820152606401610106565b600080546040516001600160a01b03808516939216916000805160206102f483398151915291a3600080546001600160a01b039092166001600160a01b0319928316179055600180549091169055565b8035801515811461029d57600080fd5b919050565b6000806000606084860312156102b757600080fd5b83356001600160a01b03811681146102ce57600080fd5b92506102dc6020850161028d565b91506102ea6040850161028d565b9050925092509256fe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220f8917a38ea34ea625adc8e5b0a0b0569d79a229b0972f25153dd992dc32f2ed164736f6c63430008090033";
91
-
92
- type BoringOwnableUpgConstructorParams =
93
- | [signer?: Signer]
94
- | ConstructorParameters<typeof ContractFactory>;
95
-
96
- const isSuperArgs = (
97
- xs: BoringOwnableUpgConstructorParams
98
- ): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
99
-
100
- export class BoringOwnableUpg__factory extends ContractFactory {
101
- constructor(...args: BoringOwnableUpgConstructorParams) {
102
- if (isSuperArgs(args)) {
103
- super(...args);
104
- } else {
105
- super(_abi, _bytecode, args[0]);
106
- }
107
- this.contractName = "BoringOwnableUpg";
108
- }
109
-
110
- deploy(
111
- overrides?: Overrides & { from?: string | Promise<string> }
112
- ): Promise<BoringOwnableUpg> {
113
- return super.deploy(overrides || {}) as Promise<BoringOwnableUpg>;
114
- }
115
- getDeployTransaction(
116
- overrides?: Overrides & { from?: string | Promise<string> }
117
- ): TransactionRequest {
118
- return super.getDeployTransaction(overrides || {});
119
- }
120
- attach(address: string): BoringOwnableUpg {
121
- return super.attach(address) as BoringOwnableUpg;
122
- }
123
- connect(signer: Signer): BoringOwnableUpg__factory {
124
- return super.connect(signer) as BoringOwnableUpg__factory;
125
- }
126
- static readonly contractName: "BoringOwnableUpg";
127
- public readonly contractName: "BoringOwnableUpg";
128
- static readonly bytecode = _bytecode;
129
- static readonly abi = _abi;
130
- static createInterface(): BoringOwnableUpgInterface {
131
- return new utils.Interface(_abi) as BoringOwnableUpgInterface;
132
- }
133
- static connect(
134
- address: string,
135
- signerOrProvider: Signer | Provider
136
- ): BoringOwnableUpg {
137
- return new Contract(address, _abi, signerOrProvider) as BoringOwnableUpg;
138
- }
139
- }
@@ -1,149 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
5
- import { Provider, TransactionRequest } from "@ethersproject/providers";
6
- import type { BoringOwnable, BoringOwnableInterface } from "../BoringOwnable";
7
-
8
- const _abi = [
9
- {
10
- inputs: [
11
- {
12
- internalType: "address",
13
- name: "_owner",
14
- type: "address",
15
- },
16
- ],
17
- stateMutability: "nonpayable",
18
- type: "constructor",
19
- },
20
- {
21
- anonymous: false,
22
- inputs: [
23
- {
24
- indexed: true,
25
- internalType: "address",
26
- name: "previousOwner",
27
- type: "address",
28
- },
29
- {
30
- indexed: true,
31
- internalType: "address",
32
- name: "newOwner",
33
- type: "address",
34
- },
35
- ],
36
- name: "OwnershipTransferred",
37
- type: "event",
38
- },
39
- {
40
- inputs: [],
41
- name: "claimOwnership",
42
- outputs: [],
43
- stateMutability: "nonpayable",
44
- type: "function",
45
- },
46
- {
47
- inputs: [],
48
- name: "owner",
49
- outputs: [
50
- {
51
- internalType: "address",
52
- name: "",
53
- type: "address",
54
- },
55
- ],
56
- stateMutability: "view",
57
- type: "function",
58
- },
59
- {
60
- inputs: [],
61
- name: "pendingOwner",
62
- outputs: [
63
- {
64
- internalType: "address",
65
- name: "",
66
- type: "address",
67
- },
68
- ],
69
- stateMutability: "view",
70
- type: "function",
71
- },
72
- {
73
- inputs: [
74
- {
75
- internalType: "address",
76
- name: "newOwner",
77
- type: "address",
78
- },
79
- {
80
- internalType: "bool",
81
- name: "direct",
82
- type: "bool",
83
- },
84
- {
85
- internalType: "bool",
86
- name: "renounce",
87
- type: "bool",
88
- },
89
- ],
90
- name: "transferOwnership",
91
- outputs: [],
92
- stateMutability: "nonpayable",
93
- type: "function",
94
- },
95
- ];
96
-
97
- const _bytecode =
98
- "0x608060405234801561001057600080fd5b506040516103dc3803806103dc83398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b610349806100936000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063078dfbe7146100515780634e71e0c8146100665780638da5cb5b1461006e578063e30c39781461009d575b600080fd5b61006461005f3660046102a2565b6100b0565b005b6100646101e2565b600054610081906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b600154610081906001600160a01b031681565b6000546001600160a01b0316331461010f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b81156101c0576001600160a01b0383161515806101295750805b61016d5760405162461bcd60e51b81526020600482015260156024820152744f776e61626c653a207a65726f206164647265737360581b6044820152606401610106565b600080546040516001600160a01b03808716939216916000805160206102f483398151915291a3600080546001600160a01b0385166001600160a01b031991821617909155600180549091169055505050565b600180546001600160a01b0385166001600160a01b0319909116179055505050565b6001546001600160a01b031633811461023d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e65726044820152606401610106565b600080546040516001600160a01b03808516939216916000805160206102f483398151915291a3600080546001600160a01b039092166001600160a01b0319928316179055600180549091169055565b8035801515811461029d57600080fd5b919050565b6000806000606084860312156102b757600080fd5b83356001600160a01b03811681146102ce57600080fd5b92506102dc6020850161028d565b91506102ea6040850161028d565b9050925092509256fe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220e92a944d53918d6f08f7f96f21a17d6a48aff9621f93b45f63d06e386e56258864736f6c63430008090033";
99
-
100
- type BoringOwnableConstructorParams =
101
- | [signer?: Signer]
102
- | ConstructorParameters<typeof ContractFactory>;
103
-
104
- const isSuperArgs = (
105
- xs: BoringOwnableConstructorParams
106
- ): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
107
-
108
- export class BoringOwnable__factory extends ContractFactory {
109
- constructor(...args: BoringOwnableConstructorParams) {
110
- if (isSuperArgs(args)) {
111
- super(...args);
112
- } else {
113
- super(_abi, _bytecode, args[0]);
114
- }
115
- this.contractName = "BoringOwnable";
116
- }
117
-
118
- deploy(
119
- _owner: string,
120
- overrides?: Overrides & { from?: string | Promise<string> }
121
- ): Promise<BoringOwnable> {
122
- return super.deploy(_owner, overrides || {}) as Promise<BoringOwnable>;
123
- }
124
- getDeployTransaction(
125
- _owner: string,
126
- overrides?: Overrides & { from?: string | Promise<string> }
127
- ): TransactionRequest {
128
- return super.getDeployTransaction(_owner, overrides || {});
129
- }
130
- attach(address: string): BoringOwnable {
131
- return super.attach(address) as BoringOwnable;
132
- }
133
- connect(signer: Signer): BoringOwnable__factory {
134
- return super.connect(signer) as BoringOwnable__factory;
135
- }
136
- static readonly contractName: "BoringOwnable";
137
- public readonly contractName: "BoringOwnable";
138
- static readonly bytecode = _bytecode;
139
- static readonly abi = _abi;
140
- static createInterface(): BoringOwnableInterface {
141
- return new utils.Interface(_abi) as BoringOwnableInterface;
142
- }
143
- static connect(
144
- address: string,
145
- signerOrProvider: Signer | Provider
146
- ): BoringOwnable {
147
- return new Contract(address, _abi, signerOrProvider) as BoringOwnable;
148
- }
149
- }
@@ -1,49 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
-
5
- import { Contract, Signer, utils } from "ethers";
6
- import { Provider } from "@ethersproject/providers";
7
- import type {
8
- IPFlashCallback,
9
- IPFlashCallbackInterface,
10
- } from "../IPFlashCallback";
11
-
12
- const _abi = [
13
- {
14
- inputs: [
15
- {
16
- internalType: "address[]",
17
- name: "tokens",
18
- type: "address[]",
19
- },
20
- {
21
- internalType: "uint256[]",
22
- name: "amountsToPay",
23
- type: "uint256[]",
24
- },
25
- {
26
- internalType: "bytes",
27
- name: "data",
28
- type: "bytes",
29
- },
30
- ],
31
- name: "pendleFlashCallback",
32
- outputs: [],
33
- stateMutability: "nonpayable",
34
- type: "function",
35
- },
36
- ];
37
-
38
- export class IPFlashCallback__factory {
39
- static readonly abi = _abi;
40
- static createInterface(): IPFlashCallbackInterface {
41
- return new utils.Interface(_abi) as IPFlashCallbackInterface;
42
- }
43
- static connect(
44
- address: string,
45
- signerOrProvider: Signer | Provider
46
- ): IPFlashCallback {
47
- return new Contract(address, _abi, signerOrProvider) as IPFlashCallback;
48
- }
49
- }
@@ -1,39 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
-
5
- import { Contract, Signer, utils } from "ethers";
6
- import { Provider } from "@ethersproject/providers";
7
- import type {
8
- IPermissionsV2,
9
- IPermissionsV2Interface,
10
- } from "../IPermissionsV2";
11
-
12
- const _abi = [
13
- {
14
- inputs: [],
15
- name: "governanceManager",
16
- outputs: [
17
- {
18
- internalType: "address",
19
- name: "",
20
- type: "address",
21
- },
22
- ],
23
- stateMutability: "view",
24
- type: "function",
25
- },
26
- ];
27
-
28
- export class IPermissionsV2__factory {
29
- static readonly abi = _abi;
30
- static createInterface(): IPermissionsV2Interface {
31
- return new utils.Interface(_abi) as IPermissionsV2Interface;
32
- }
33
- static connect(
34
- address: string,
35
- signerOrProvider: Signer | Provider
36
- ): IPermissionsV2 {
37
- return new Contract(address, _abi, signerOrProvider) as IPermissionsV2;
38
- }
39
- }