@pendle/core-v2 2.13.1-mainnet → 2.13.2-mainnet
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/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol/CamelotRewardHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol/CamelotRewardHelper.json +2 -15
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.json +2 -29
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotYieldBooster.sol/ICamelotYieldBooster.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotYieldBooster.sol/ICamelotYieldBooster.json +18 -0
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol +28 -21
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol +0 -8
- package/contracts/interfaces/Camelot/ICamelotYieldBooster.sol +7 -0
- package/deployments/42161-markets/CAMELOT-PEP-27JUNE2024-ARBITRUM.json +4 -4
- package/package.json +1 -1
- package/typechain-types/CamelotRewardHelper.ts +0 -21
- package/typechain-types/ICamelotYieldBooster.ts +97 -0
- package/typechain-types/PendleCamelotV1VolatileSY.ts +0 -75
- package/typechain-types/factories/CamelotRewardHelper__factory.ts +1 -14
- package/typechain-types/factories/ICamelotYieldBooster__factory.ts +37 -0
- package/typechain-types/factories/PendleCamelotV1VolatileSY__factory.ts +1 -28
- package/typechain-types/hardhat.d.ts +9 -0
- package/typechain-types/index.ts +2 -0
package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol
CHANGED
|
@@ -7,6 +7,7 @@ import "../../../../interfaces/Camelot/ICamelotNFTFactory.sol";
|
|
|
7
7
|
import "../../../../interfaces/Camelot/ICamelotNFTPool.sol";
|
|
8
8
|
import "../../../../interfaces/Camelot/ICamelotNitroPool.sol";
|
|
9
9
|
import "../../../../interfaces/Camelot/ICamelotNFTHandler.sol";
|
|
10
|
+
import "../../../../interfaces/Camelot/ICamelotYieldBooster.sol";
|
|
10
11
|
import "../../../../interfaces/Camelot/IXGrail.sol";
|
|
11
12
|
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
|
|
12
13
|
|
|
@@ -22,9 +23,6 @@ contract CamelotRewardHelper is TokenHelper, ICamelotNFTHandler {
|
|
|
22
23
|
uint256 internal constant MINIMUM_LIQUIDITY = 10 ** 3;
|
|
23
24
|
bytes4 internal constant _ERC721_RECEIVED = 0x150b7a02;
|
|
24
25
|
|
|
25
|
-
uint256 public YIELD_BOOSTER_STATUS = 1;
|
|
26
|
-
|
|
27
|
-
|
|
28
26
|
address public immutable nftPool;
|
|
29
27
|
address public immutable nitroPool;
|
|
30
28
|
address public immutable GRAIL;
|
|
@@ -48,9 +46,10 @@ contract CamelotRewardHelper is TokenHelper, ICamelotNFTHandler {
|
|
|
48
46
|
nftPool = ICamelotNitroPool(nitroPool).nftPool();
|
|
49
47
|
GRAIL = ICamelotNitroPool(nitroPool).grailToken();
|
|
50
48
|
xGRAIL = ICamelotNitroPool(nitroPool).xGrailToken();
|
|
51
|
-
|
|
52
49
|
_safeApproveInf(_lp, nftPool);
|
|
53
|
-
|
|
50
|
+
|
|
51
|
+
yieldBooster = ICamelotNFTPool(nftPool).yieldBooster();
|
|
52
|
+
IXGrail(xGRAIL).approveUsage(yieldBooster, type(uint256).max);
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
/**
|
|
@@ -60,7 +59,7 @@ contract CamelotRewardHelper is TokenHelper, ICamelotNFTHandler {
|
|
|
60
59
|
* We decided to go with the second option (keep allocating xGRAIL to boost APR)
|
|
61
60
|
*/
|
|
62
61
|
function _allocateXGrail() internal {
|
|
63
|
-
if (
|
|
62
|
+
if (_ensureYieldBoosterMatched()) return;
|
|
64
63
|
|
|
65
64
|
uint256 amount = _selfBalance(xGRAIL);
|
|
66
65
|
if (amount == 0) return;
|
|
@@ -71,17 +70,30 @@ contract CamelotRewardHelper is TokenHelper, ICamelotNFTHandler {
|
|
|
71
70
|
IXGrail(xGRAIL).allocate(yieldBooster, amount, _getAllocationData());
|
|
72
71
|
}
|
|
73
72
|
|
|
74
|
-
function
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
function _ensureYieldBoosterMatched() private returns (bool yieldBoosterUpdated) {
|
|
74
|
+
address oldYieldBooster = yieldBooster;
|
|
75
|
+
address newYieldBooster = ICamelotNFTPool(nftPool).yieldBooster();
|
|
76
|
+
|
|
77
|
+
if (oldYieldBooster == newYieldBooster) return false;
|
|
78
|
+
|
|
79
|
+
// Avoid reverts from camelot's check for amount > 0
|
|
80
|
+
uint256 amountAllocated = IXGrail(xGRAIL).usageAllocations(address(this), oldYieldBooster);
|
|
81
|
+
if (amountAllocated > 0) {
|
|
82
|
+
ICamelotYieldBooster(oldYieldBooster).forceDeallocate();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Revoke approvals and revnew
|
|
86
|
+
IXGrail(xGRAIL).approveUsage(oldYieldBooster, 0);
|
|
87
|
+
IXGrail(xGRAIL).approveUsage(newYieldBooster, type(uint256).max);
|
|
80
88
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
89
|
+
// reallocate
|
|
90
|
+
uint256 amountToReallocate = _selfBalance(xGRAIL);
|
|
91
|
+
if (amountToReallocate > 0) {
|
|
92
|
+
IXGrail(xGRAIL).allocate(newYieldBooster, amountToReallocate, _getAllocationData());
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
yieldBooster = newYieldBooster;
|
|
96
|
+
return true;
|
|
85
97
|
}
|
|
86
98
|
|
|
87
99
|
function _increaseNftPoolPosition(
|
|
@@ -118,11 +130,6 @@ contract CamelotRewardHelper is TokenHelper, ICamelotNFTHandler {
|
|
|
118
130
|
ICamelotNitroPool(nitroPool).withdraw(positionId);
|
|
119
131
|
}
|
|
120
132
|
|
|
121
|
-
function _updateYieldBoosterAddress() private {
|
|
122
|
-
yieldBooster = ICamelotNFTPool(nftPool).yieldBooster();
|
|
123
|
-
IXGrail(xGRAIL).approveUsage(yieldBooster, type(uint256).max);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
133
|
function _getAllocationData() private view returns (bytes memory) {
|
|
127
134
|
return abi.encode(nftPool, positionId);
|
|
128
135
|
}
|
|
@@ -205,14 +205,6 @@ contract PendleCamelotV1VolatileSY is
|
|
|
205
205
|
OWNER ONLY FUNCTIONS
|
|
206
206
|
//////////////////////////////////////////////////////////////*/
|
|
207
207
|
|
|
208
|
-
function prepareForReallocation() external onlyOwner {
|
|
209
|
-
_prepareForReallocation();
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
function finalizeReallocation() external onlyOwner {
|
|
213
|
-
_finalizeReallocation();
|
|
214
|
-
}
|
|
215
|
-
|
|
216
208
|
/// @dev Use emergencyWithdraw to ensure LP withdrawal is always successful
|
|
217
209
|
function setRewardDisabled(bool doRewardIndexUpdate) external onlyOwner {
|
|
218
210
|
if (doRewardIndexUpdate) _updateRewardIndex();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "SY PENDLE-ETH_Camelot",
|
|
3
|
-
"SY": "
|
|
4
|
-
"YT": "
|
|
5
|
-
"PT": "
|
|
6
|
-
"market": "
|
|
3
|
+
"SY": "0x239C7C530f194E9E00856b5C55A95d485F64c56e",
|
|
4
|
+
"YT": "0x4C998bF29eFE95925918183136c141602F89332A",
|
|
5
|
+
"PT": "0xAB89b1892976BfC997503FE10F85F436828f7131",
|
|
6
|
+
"market": "0x7Db02aAE965f2cA59d6E18112E277780d64E390D",
|
|
7
7
|
"expiry": 1719446400,
|
|
8
8
|
"scalarRoot": "5388097000000000000",
|
|
9
9
|
"initAnchor": "1485252000000000000"
|
package/package.json
CHANGED
|
@@ -24,7 +24,6 @@ export interface CamelotRewardHelperInterface extends utils.Interface {
|
|
|
24
24
|
contractName: "CamelotRewardHelper";
|
|
25
25
|
functions: {
|
|
26
26
|
"GRAIL()": FunctionFragment;
|
|
27
|
-
"YIELD_BOOSTER_STATUS()": FunctionFragment;
|
|
28
27
|
"nftPool()": FunctionFragment;
|
|
29
28
|
"nitroPool()": FunctionFragment;
|
|
30
29
|
"onERC721Received(address,address,uint256,bytes)": FunctionFragment;
|
|
@@ -37,10 +36,6 @@ export interface CamelotRewardHelperInterface extends utils.Interface {
|
|
|
37
36
|
};
|
|
38
37
|
|
|
39
38
|
encodeFunctionData(functionFragment: "GRAIL", values?: undefined): string;
|
|
40
|
-
encodeFunctionData(
|
|
41
|
-
functionFragment: "YIELD_BOOSTER_STATUS",
|
|
42
|
-
values?: undefined
|
|
43
|
-
): string;
|
|
44
39
|
encodeFunctionData(functionFragment: "nftPool", values?: undefined): string;
|
|
45
40
|
encodeFunctionData(functionFragment: "nitroPool", values?: undefined): string;
|
|
46
41
|
encodeFunctionData(
|
|
@@ -70,10 +65,6 @@ export interface CamelotRewardHelperInterface extends utils.Interface {
|
|
|
70
65
|
): string;
|
|
71
66
|
|
|
72
67
|
decodeFunctionResult(functionFragment: "GRAIL", data: BytesLike): Result;
|
|
73
|
-
decodeFunctionResult(
|
|
74
|
-
functionFragment: "YIELD_BOOSTER_STATUS",
|
|
75
|
-
data: BytesLike
|
|
76
|
-
): Result;
|
|
77
68
|
decodeFunctionResult(functionFragment: "nftPool", data: BytesLike): Result;
|
|
78
69
|
decodeFunctionResult(functionFragment: "nitroPool", data: BytesLike): Result;
|
|
79
70
|
decodeFunctionResult(
|
|
@@ -132,8 +123,6 @@ export interface CamelotRewardHelper extends BaseContract {
|
|
|
132
123
|
functions: {
|
|
133
124
|
GRAIL(overrides?: CallOverrides): Promise<[string]>;
|
|
134
125
|
|
|
135
|
-
YIELD_BOOSTER_STATUS(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
136
|
-
|
|
137
126
|
nftPool(overrides?: CallOverrides): Promise<[string]>;
|
|
138
127
|
|
|
139
128
|
nitroPool(overrides?: CallOverrides): Promise<[string]>;
|
|
@@ -178,8 +167,6 @@ export interface CamelotRewardHelper extends BaseContract {
|
|
|
178
167
|
|
|
179
168
|
GRAIL(overrides?: CallOverrides): Promise<string>;
|
|
180
169
|
|
|
181
|
-
YIELD_BOOSTER_STATUS(overrides?: CallOverrides): Promise<BigNumber>;
|
|
182
|
-
|
|
183
170
|
nftPool(overrides?: CallOverrides): Promise<string>;
|
|
184
171
|
|
|
185
172
|
nitroPool(overrides?: CallOverrides): Promise<string>;
|
|
@@ -224,8 +211,6 @@ export interface CamelotRewardHelper extends BaseContract {
|
|
|
224
211
|
callStatic: {
|
|
225
212
|
GRAIL(overrides?: CallOverrides): Promise<string>;
|
|
226
213
|
|
|
227
|
-
YIELD_BOOSTER_STATUS(overrides?: CallOverrides): Promise<BigNumber>;
|
|
228
|
-
|
|
229
214
|
nftPool(overrides?: CallOverrides): Promise<string>;
|
|
230
215
|
|
|
231
216
|
nitroPool(overrides?: CallOverrides): Promise<string>;
|
|
@@ -273,8 +258,6 @@ export interface CamelotRewardHelper extends BaseContract {
|
|
|
273
258
|
estimateGas: {
|
|
274
259
|
GRAIL(overrides?: CallOverrides): Promise<BigNumber>;
|
|
275
260
|
|
|
276
|
-
YIELD_BOOSTER_STATUS(overrides?: CallOverrides): Promise<BigNumber>;
|
|
277
|
-
|
|
278
261
|
nftPool(overrides?: CallOverrides): Promise<BigNumber>;
|
|
279
262
|
|
|
280
263
|
nitroPool(overrides?: CallOverrides): Promise<BigNumber>;
|
|
@@ -320,10 +303,6 @@ export interface CamelotRewardHelper extends BaseContract {
|
|
|
320
303
|
populateTransaction: {
|
|
321
304
|
GRAIL(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
322
305
|
|
|
323
|
-
YIELD_BOOSTER_STATUS(
|
|
324
|
-
overrides?: CallOverrides
|
|
325
|
-
): Promise<PopulatedTransaction>;
|
|
326
|
-
|
|
327
306
|
nftPool(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
328
307
|
|
|
329
308
|
nitroPool(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import {
|
|
5
|
+
BaseContract,
|
|
6
|
+
BigNumber,
|
|
7
|
+
BytesLike,
|
|
8
|
+
CallOverrides,
|
|
9
|
+
ContractTransaction,
|
|
10
|
+
Overrides,
|
|
11
|
+
PopulatedTransaction,
|
|
12
|
+
Signer,
|
|
13
|
+
utils,
|
|
14
|
+
} from "ethers";
|
|
15
|
+
import { FunctionFragment, Result } from "@ethersproject/abi";
|
|
16
|
+
import { Listener, Provider } from "@ethersproject/providers";
|
|
17
|
+
import type {
|
|
18
|
+
TypedEventFilter,
|
|
19
|
+
TypedEvent,
|
|
20
|
+
TypedListener,
|
|
21
|
+
OnEvent,
|
|
22
|
+
} from "./common";
|
|
23
|
+
|
|
24
|
+
export interface ICamelotYieldBoosterInterface extends utils.Interface {
|
|
25
|
+
contractName: "ICamelotYieldBooster";
|
|
26
|
+
functions: {
|
|
27
|
+
"forceDeallocate()": FunctionFragment;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
encodeFunctionData(
|
|
31
|
+
functionFragment: "forceDeallocate",
|
|
32
|
+
values?: undefined
|
|
33
|
+
): string;
|
|
34
|
+
|
|
35
|
+
decodeFunctionResult(
|
|
36
|
+
functionFragment: "forceDeallocate",
|
|
37
|
+
data: BytesLike
|
|
38
|
+
): Result;
|
|
39
|
+
|
|
40
|
+
events: {};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ICamelotYieldBooster extends BaseContract {
|
|
44
|
+
contractName: "ICamelotYieldBooster";
|
|
45
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
46
|
+
attach(addressOrName: string): this;
|
|
47
|
+
deployed(): Promise<this>;
|
|
48
|
+
|
|
49
|
+
interface: ICamelotYieldBoosterInterface;
|
|
50
|
+
|
|
51
|
+
queryFilter<TEvent extends TypedEvent>(
|
|
52
|
+
event: TypedEventFilter<TEvent>,
|
|
53
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
54
|
+
toBlock?: string | number | undefined
|
|
55
|
+
): Promise<Array<TEvent>>;
|
|
56
|
+
|
|
57
|
+
listeners<TEvent extends TypedEvent>(
|
|
58
|
+
eventFilter?: TypedEventFilter<TEvent>
|
|
59
|
+
): Array<TypedListener<TEvent>>;
|
|
60
|
+
listeners(eventName?: string): Array<Listener>;
|
|
61
|
+
removeAllListeners<TEvent extends TypedEvent>(
|
|
62
|
+
eventFilter: TypedEventFilter<TEvent>
|
|
63
|
+
): this;
|
|
64
|
+
removeAllListeners(eventName?: string): this;
|
|
65
|
+
off: OnEvent<this>;
|
|
66
|
+
on: OnEvent<this>;
|
|
67
|
+
once: OnEvent<this>;
|
|
68
|
+
removeListener: OnEvent<this>;
|
|
69
|
+
|
|
70
|
+
functions: {
|
|
71
|
+
forceDeallocate(
|
|
72
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
73
|
+
): Promise<ContractTransaction>;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
forceDeallocate(
|
|
77
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
78
|
+
): Promise<ContractTransaction>;
|
|
79
|
+
|
|
80
|
+
callStatic: {
|
|
81
|
+
forceDeallocate(overrides?: CallOverrides): Promise<void>;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
filters: {};
|
|
85
|
+
|
|
86
|
+
estimateGas: {
|
|
87
|
+
forceDeallocate(
|
|
88
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
89
|
+
): Promise<BigNumber>;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
populateTransaction: {
|
|
93
|
+
forceDeallocate(
|
|
94
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
95
|
+
): Promise<PopulatedTransaction>;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
@@ -28,7 +28,6 @@ export interface PendleCamelotV1VolatileSYInterface extends utils.Interface {
|
|
|
28
28
|
functions: {
|
|
29
29
|
"DOMAIN_SEPARATOR()": FunctionFragment;
|
|
30
30
|
"GRAIL()": FunctionFragment;
|
|
31
|
-
"YIELD_BOOSTER_STATUS()": FunctionFragment;
|
|
32
31
|
"accruedRewards(address)": FunctionFragment;
|
|
33
32
|
"allowance(address,address)": FunctionFragment;
|
|
34
33
|
"approve(address,uint256)": FunctionFragment;
|
|
@@ -41,7 +40,6 @@ export interface PendleCamelotV1VolatileSYInterface extends utils.Interface {
|
|
|
41
40
|
"deposit(address,address,uint256,uint256)": FunctionFragment;
|
|
42
41
|
"exchangeRate()": FunctionFragment;
|
|
43
42
|
"factory()": FunctionFragment;
|
|
44
|
-
"finalizeReallocation()": FunctionFragment;
|
|
45
43
|
"finalizeRedeem(uint256)": FunctionFragment;
|
|
46
44
|
"getRewardTokens()": FunctionFragment;
|
|
47
45
|
"getTokensIn()": FunctionFragment;
|
|
@@ -65,7 +63,6 @@ export interface PendleCamelotV1VolatileSYInterface extends utils.Interface {
|
|
|
65
63
|
"pendingOwner()": FunctionFragment;
|
|
66
64
|
"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment;
|
|
67
65
|
"positionId()": FunctionFragment;
|
|
68
|
-
"prepareForReallocation()": FunctionFragment;
|
|
69
66
|
"previewDeposit(address,uint256)": FunctionFragment;
|
|
70
67
|
"previewHelper()": FunctionFragment;
|
|
71
68
|
"previewRedeem(address,uint256)": FunctionFragment;
|
|
@@ -99,10 +96,6 @@ export interface PendleCamelotV1VolatileSYInterface extends utils.Interface {
|
|
|
99
96
|
values?: undefined
|
|
100
97
|
): string;
|
|
101
98
|
encodeFunctionData(functionFragment: "GRAIL", values?: undefined): string;
|
|
102
|
-
encodeFunctionData(
|
|
103
|
-
functionFragment: "YIELD_BOOSTER_STATUS",
|
|
104
|
-
values?: undefined
|
|
105
|
-
): string;
|
|
106
99
|
encodeFunctionData(
|
|
107
100
|
functionFragment: "accruedRewards",
|
|
108
101
|
values: [string]
|
|
@@ -139,10 +132,6 @@ export interface PendleCamelotV1VolatileSYInterface extends utils.Interface {
|
|
|
139
132
|
values?: undefined
|
|
140
133
|
): string;
|
|
141
134
|
encodeFunctionData(functionFragment: "factory", values?: undefined): string;
|
|
142
|
-
encodeFunctionData(
|
|
143
|
-
functionFragment: "finalizeReallocation",
|
|
144
|
-
values?: undefined
|
|
145
|
-
): string;
|
|
146
135
|
encodeFunctionData(
|
|
147
136
|
functionFragment: "finalizeRedeem",
|
|
148
137
|
values: [BigNumberish]
|
|
@@ -219,10 +208,6 @@ export interface PendleCamelotV1VolatileSYInterface extends utils.Interface {
|
|
|
219
208
|
functionFragment: "positionId",
|
|
220
209
|
values?: undefined
|
|
221
210
|
): string;
|
|
222
|
-
encodeFunctionData(
|
|
223
|
-
functionFragment: "prepareForReallocation",
|
|
224
|
-
values?: undefined
|
|
225
|
-
): string;
|
|
226
211
|
encodeFunctionData(
|
|
227
212
|
functionFragment: "previewDeposit",
|
|
228
213
|
values: [string, BigNumberish]
|
|
@@ -312,10 +297,6 @@ export interface PendleCamelotV1VolatileSYInterface extends utils.Interface {
|
|
|
312
297
|
data: BytesLike
|
|
313
298
|
): Result;
|
|
314
299
|
decodeFunctionResult(functionFragment: "GRAIL", data: BytesLike): Result;
|
|
315
|
-
decodeFunctionResult(
|
|
316
|
-
functionFragment: "YIELD_BOOSTER_STATUS",
|
|
317
|
-
data: BytesLike
|
|
318
|
-
): Result;
|
|
319
300
|
decodeFunctionResult(
|
|
320
301
|
functionFragment: "accruedRewards",
|
|
321
302
|
data: BytesLike
|
|
@@ -343,10 +324,6 @@ export interface PendleCamelotV1VolatileSYInterface extends utils.Interface {
|
|
|
343
324
|
data: BytesLike
|
|
344
325
|
): Result;
|
|
345
326
|
decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result;
|
|
346
|
-
decodeFunctionResult(
|
|
347
|
-
functionFragment: "finalizeReallocation",
|
|
348
|
-
data: BytesLike
|
|
349
|
-
): Result;
|
|
350
327
|
decodeFunctionResult(
|
|
351
328
|
functionFragment: "finalizeRedeem",
|
|
352
329
|
data: BytesLike
|
|
@@ -409,10 +386,6 @@ export interface PendleCamelotV1VolatileSYInterface extends utils.Interface {
|
|
|
409
386
|
): Result;
|
|
410
387
|
decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result;
|
|
411
388
|
decodeFunctionResult(functionFragment: "positionId", data: BytesLike): Result;
|
|
412
|
-
decodeFunctionResult(
|
|
413
|
-
functionFragment: "prepareForReallocation",
|
|
414
|
-
data: BytesLike
|
|
415
|
-
): Result;
|
|
416
389
|
decodeFunctionResult(
|
|
417
390
|
functionFragment: "previewDeposit",
|
|
418
391
|
data: BytesLike
|
|
@@ -610,8 +583,6 @@ export interface PendleCamelotV1VolatileSY extends BaseContract {
|
|
|
610
583
|
|
|
611
584
|
GRAIL(overrides?: CallOverrides): Promise<[string]>;
|
|
612
585
|
|
|
613
|
-
YIELD_BOOSTER_STATUS(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
614
|
-
|
|
615
586
|
accruedRewards(
|
|
616
587
|
user: string,
|
|
617
588
|
overrides?: CallOverrides
|
|
@@ -669,10 +640,6 @@ export interface PendleCamelotV1VolatileSY extends BaseContract {
|
|
|
669
640
|
|
|
670
641
|
factory(overrides?: CallOverrides): Promise<[string]>;
|
|
671
642
|
|
|
672
|
-
finalizeReallocation(
|
|
673
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
674
|
-
): Promise<ContractTransaction>;
|
|
675
|
-
|
|
676
643
|
finalizeRedeem(
|
|
677
644
|
redeemIndex: BigNumberish,
|
|
678
645
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
@@ -768,10 +735,6 @@ export interface PendleCamelotV1VolatileSY extends BaseContract {
|
|
|
768
735
|
|
|
769
736
|
positionId(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
770
737
|
|
|
771
|
-
prepareForReallocation(
|
|
772
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
773
|
-
): Promise<ContractTransaction>;
|
|
774
|
-
|
|
775
738
|
previewDeposit(
|
|
776
739
|
tokenIn: string,
|
|
777
740
|
amountTokenToDeposit: BigNumberish,
|
|
@@ -890,8 +853,6 @@ export interface PendleCamelotV1VolatileSY extends BaseContract {
|
|
|
890
853
|
|
|
891
854
|
GRAIL(overrides?: CallOverrides): Promise<string>;
|
|
892
855
|
|
|
893
|
-
YIELD_BOOSTER_STATUS(overrides?: CallOverrides): Promise<BigNumber>;
|
|
894
|
-
|
|
895
856
|
accruedRewards(user: string, overrides?: CallOverrides): Promise<BigNumber[]>;
|
|
896
857
|
|
|
897
858
|
allowance(
|
|
@@ -946,10 +907,6 @@ export interface PendleCamelotV1VolatileSY extends BaseContract {
|
|
|
946
907
|
|
|
947
908
|
factory(overrides?: CallOverrides): Promise<string>;
|
|
948
909
|
|
|
949
|
-
finalizeReallocation(
|
|
950
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
951
|
-
): Promise<ContractTransaction>;
|
|
952
|
-
|
|
953
910
|
finalizeRedeem(
|
|
954
911
|
redeemIndex: BigNumberish,
|
|
955
912
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
@@ -1033,10 +990,6 @@ export interface PendleCamelotV1VolatileSY extends BaseContract {
|
|
|
1033
990
|
|
|
1034
991
|
positionId(overrides?: CallOverrides): Promise<BigNumber>;
|
|
1035
992
|
|
|
1036
|
-
prepareForReallocation(
|
|
1037
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
1038
|
-
): Promise<ContractTransaction>;
|
|
1039
|
-
|
|
1040
993
|
previewDeposit(
|
|
1041
994
|
tokenIn: string,
|
|
1042
995
|
amountTokenToDeposit: BigNumberish,
|
|
@@ -1148,8 +1101,6 @@ export interface PendleCamelotV1VolatileSY extends BaseContract {
|
|
|
1148
1101
|
|
|
1149
1102
|
GRAIL(overrides?: CallOverrides): Promise<string>;
|
|
1150
1103
|
|
|
1151
|
-
YIELD_BOOSTER_STATUS(overrides?: CallOverrides): Promise<BigNumber>;
|
|
1152
|
-
|
|
1153
1104
|
accruedRewards(
|
|
1154
1105
|
user: string,
|
|
1155
1106
|
overrides?: CallOverrides
|
|
@@ -1202,8 +1153,6 @@ export interface PendleCamelotV1VolatileSY extends BaseContract {
|
|
|
1202
1153
|
|
|
1203
1154
|
factory(overrides?: CallOverrides): Promise<string>;
|
|
1204
1155
|
|
|
1205
|
-
finalizeReallocation(overrides?: CallOverrides): Promise<void>;
|
|
1206
|
-
|
|
1207
1156
|
finalizeRedeem(
|
|
1208
1157
|
redeemIndex: BigNumberish,
|
|
1209
1158
|
overrides?: CallOverrides
|
|
@@ -1285,8 +1234,6 @@ export interface PendleCamelotV1VolatileSY extends BaseContract {
|
|
|
1285
1234
|
|
|
1286
1235
|
positionId(overrides?: CallOverrides): Promise<BigNumber>;
|
|
1287
1236
|
|
|
1288
|
-
prepareForReallocation(overrides?: CallOverrides): Promise<void>;
|
|
1289
|
-
|
|
1290
1237
|
previewDeposit(
|
|
1291
1238
|
tokenIn: string,
|
|
1292
1239
|
amountTokenToDeposit: BigNumberish,
|
|
@@ -1481,8 +1428,6 @@ export interface PendleCamelotV1VolatileSY extends BaseContract {
|
|
|
1481
1428
|
|
|
1482
1429
|
GRAIL(overrides?: CallOverrides): Promise<BigNumber>;
|
|
1483
1430
|
|
|
1484
|
-
YIELD_BOOSTER_STATUS(overrides?: CallOverrides): Promise<BigNumber>;
|
|
1485
|
-
|
|
1486
1431
|
accruedRewards(user: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
1487
1432
|
|
|
1488
1433
|
allowance(
|
|
@@ -1529,10 +1474,6 @@ export interface PendleCamelotV1VolatileSY extends BaseContract {
|
|
|
1529
1474
|
|
|
1530
1475
|
factory(overrides?: CallOverrides): Promise<BigNumber>;
|
|
1531
1476
|
|
|
1532
|
-
finalizeReallocation(
|
|
1533
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
1534
|
-
): Promise<BigNumber>;
|
|
1535
|
-
|
|
1536
1477
|
finalizeRedeem(
|
|
1537
1478
|
redeemIndex: BigNumberish,
|
|
1538
1479
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
@@ -1622,10 +1563,6 @@ export interface PendleCamelotV1VolatileSY extends BaseContract {
|
|
|
1622
1563
|
|
|
1623
1564
|
positionId(overrides?: CallOverrides): Promise<BigNumber>;
|
|
1624
1565
|
|
|
1625
|
-
prepareForReallocation(
|
|
1626
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
1627
|
-
): Promise<BigNumber>;
|
|
1628
|
-
|
|
1629
1566
|
previewDeposit(
|
|
1630
1567
|
tokenIn: string,
|
|
1631
1568
|
amountTokenToDeposit: BigNumberish,
|
|
@@ -1736,10 +1673,6 @@ export interface PendleCamelotV1VolatileSY extends BaseContract {
|
|
|
1736
1673
|
|
|
1737
1674
|
GRAIL(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
1738
1675
|
|
|
1739
|
-
YIELD_BOOSTER_STATUS(
|
|
1740
|
-
overrides?: CallOverrides
|
|
1741
|
-
): Promise<PopulatedTransaction>;
|
|
1742
|
-
|
|
1743
1676
|
accruedRewards(
|
|
1744
1677
|
user: string,
|
|
1745
1678
|
overrides?: CallOverrides
|
|
@@ -1792,10 +1725,6 @@ export interface PendleCamelotV1VolatileSY extends BaseContract {
|
|
|
1792
1725
|
|
|
1793
1726
|
factory(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
1794
1727
|
|
|
1795
|
-
finalizeReallocation(
|
|
1796
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
1797
|
-
): Promise<PopulatedTransaction>;
|
|
1798
|
-
|
|
1799
1728
|
finalizeRedeem(
|
|
1800
1729
|
redeemIndex: BigNumberish,
|
|
1801
1730
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
@@ -1888,10 +1817,6 @@ export interface PendleCamelotV1VolatileSY extends BaseContract {
|
|
|
1888
1817
|
|
|
1889
1818
|
positionId(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
1890
1819
|
|
|
1891
|
-
prepareForReallocation(
|
|
1892
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
1893
|
-
): Promise<PopulatedTransaction>;
|
|
1894
|
-
|
|
1895
1820
|
previewDeposit(
|
|
1896
1821
|
tokenIn: string,
|
|
1897
1822
|
amountTokenToDeposit: BigNumberish,
|
|
@@ -54,19 +54,6 @@ const _abi = [
|
|
|
54
54
|
stateMutability: "view",
|
|
55
55
|
type: "function",
|
|
56
56
|
},
|
|
57
|
-
{
|
|
58
|
-
inputs: [],
|
|
59
|
-
name: "YIELD_BOOSTER_STATUS",
|
|
60
|
-
outputs: [
|
|
61
|
-
{
|
|
62
|
-
internalType: "uint256",
|
|
63
|
-
name: "",
|
|
64
|
-
type: "uint256",
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
stateMutability: "view",
|
|
68
|
-
type: "function",
|
|
69
|
-
},
|
|
70
57
|
{
|
|
71
58
|
inputs: [],
|
|
72
59
|
name: "nftPool",
|
|
@@ -266,7 +253,7 @@ const _abi = [
|
|
|
266
253
|
];
|
|
267
254
|
|
|
268
255
|
const _bytecode =
|
|
269
|
-
"
|
|
256
|
+
"0x61010060405260001960005534801561001757600080fd5b506040516109ea3803806109ea83398101604081905261003691610495565b6001600160a01b03821660a081905260408051630828862d60e01b81529051630828862d916004808201926020929091908290030181865afa158015610080573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100a491906104c8565b6001600160a01b03166080816001600160a01b03168152505060a0516001600160a01b031663c414c5846040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100fd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061012191906104c8565b6001600160a01b031660c0816001600160a01b03168152505060a0516001600160a01b03166346fa466a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561017a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019e91906104c8565b6001600160a01b031660e0526080516101b890829061029d565b6080516001600160a01b03166368e5dab56040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061021c91906104c8565b600180546001600160a01b0319166001600160a01b0392831690811790915560e0516040516330d83b4760e21b815292169163c360ed1c9161026491600019906004016104ea565b600060405180830381600087803b15801561027e57600080fd5b505af1158015610292573d6000803e3d6000fd5b5050505050506105a1565b6001600160a01b0382166102af575050565b6102c160026001600160601b03610503565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526001600160601b03929092169184169063dd62ed3e90604401602060405180830381865afa15801561031a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033e9190610537565b101561035d5761035082826000610361565b61035d8282600019610361565b5050565b600080846001600160a01b031663095ea7b360e01b85856040516024016103899291906104ea565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516103c79190610550565b6000604051808303816000865af19150503d8060008114610404576040519150601f19603f3d011682016040523d82523d6000602084013e610409565b606091505b5091509150818015610433575080511580610433575080806020019051810190610433919061057f565b6104725760405162461bcd60e51b815260206004820152600c60248201526b5361666520417070726f766560a01b604482015260640160405180910390fd5b5050505050565b80516001600160a01b038116811461049057600080fd5b919050565b600080604083850312156104a857600080fd5b6104b183610479565b91506104bf60208401610479565b90509250929050565b6000602082840312156104da57600080fd5b6104e382610479565b9392505050565b6001600160a01b03929092168252602082015260400190565b60006001600160601b038381168061052b57634e487b7160e01b600052601260045260246000fd5b92169190910492915050565b60006020828403121561054957600080fd5b5051919050565b6000825160005b818110156105715760208186018101518583015201610557565b506000920191825250919050565b60006020828403121561059157600080fd5b815180151581146104e357600080fd5b60805160a05160c05160e0516104116105d960003960006101a30152600061017c0152600061012b01526000609801526104116000f3fe608060405234801561001057600080fd5b506004361061008e5760003560e01c80630828862d14610093578063150b7a02146100d757806334677c7a146101035780634d6446d91461012657806368e5dab51461014d57806371640de3146101605780637a26603814610177578063896a21de1461019e578063e2b36dc314610103578063fe4ee967146101c5575b600080fd5b6100ba7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100ea6100e53660046102c1565b6101d8565b6040516001600160e01b031990911681526020016100ce565b61011661011136600461035b565b610227565b60405190151581526020016100ce565b6100ba7f000000000000000000000000000000000000000000000000000000000000000081565b6001546100ba906001600160a01b031681565b61016960005481565b6040519081526020016100ce565b6100ba7f000000000000000000000000000000000000000000000000000000000000000081565b6100ba7f000000000000000000000000000000000000000000000000000000000000000081565b6101166101d336600461038e565b610265565b60008360005481146102145760005460405163168a450960e21b815261020b918391600401918252602082015260400190565b60405180910390fd5b50630a85bd0160e11b9695505050505050565b600082600054811461025a5760005460405163168a450960e21b815261020b918391600401918252602082015260400190565b506001949350505050565b60008360005481146102985760005460405163168a450960e21b815261020b918391600401918252602082015260400190565b5060019695505050505050565b80356001600160a01b03811681146102bc57600080fd5b919050565b6000806000806000608086880312156102d957600080fd5b6102e2866102a5565b94506102f0602087016102a5565b93506040860135925060608601356001600160401b038082111561031357600080fd5b818801915088601f83011261032757600080fd5b81358181111561033657600080fd5b89602082850101111561034857600080fd5b9699959850939650602001949392505050565b60008060006060848603121561037057600080fd5b610379846102a5565b95602085013595506040909401359392505050565b600080600080600060a086880312156103a657600080fd5b6103af866102a5565b94506103bd602087016102a5565b9497949650505050604083013592606081013592608090910135915056fea2646970667358221220fb9aec3823989c7f4fc15f254a65d207e61b0611fe227b2c4c6b62720e5266d664736f6c63430008110033";
|
|
270
257
|
|
|
271
258
|
type CamelotRewardHelperConstructorParams =
|
|
272
259
|
| [signer?: Signer]
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
ICamelotYieldBooster,
|
|
9
|
+
ICamelotYieldBoosterInterface,
|
|
10
|
+
} from "../ICamelotYieldBooster";
|
|
11
|
+
|
|
12
|
+
const _abi = [
|
|
13
|
+
{
|
|
14
|
+
inputs: [],
|
|
15
|
+
name: "forceDeallocate",
|
|
16
|
+
outputs: [],
|
|
17
|
+
stateMutability: "nonpayable",
|
|
18
|
+
type: "function",
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
export class ICamelotYieldBooster__factory {
|
|
23
|
+
static readonly abi = _abi;
|
|
24
|
+
static createInterface(): ICamelotYieldBoosterInterface {
|
|
25
|
+
return new utils.Interface(_abi) as ICamelotYieldBoosterInterface;
|
|
26
|
+
}
|
|
27
|
+
static connect(
|
|
28
|
+
address: string,
|
|
29
|
+
signerOrProvider: Signer | Provider
|
|
30
|
+
): ICamelotYieldBooster {
|
|
31
|
+
return new Contract(
|
|
32
|
+
address,
|
|
33
|
+
_abi,
|
|
34
|
+
signerOrProvider
|
|
35
|
+
) as ICamelotYieldBooster;
|
|
36
|
+
}
|
|
37
|
+
}
|