@pendle/core-v2 2.13.2-mainnet → 2.14.0-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 +6 -6
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol/CamelotV1VolatileLpHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol/CamelotV1VolatileLpHelper.json +0 -26
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.dbg.json +1 -1
- 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 +10 -41
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTPool.sol/ICamelotNFTPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTPool.sol/ICamelotNFTPool.json +48 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPoolFactory.sol/ICamelotNitroPoolFactory.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPoolFactory.sol/ICamelotNitroPoolFactory.json +638 -0
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotPair.sol/ICamelotPair.dbg.json +1 -1
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol +18 -10
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol +2 -10
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol +43 -41
- package/contracts/interfaces/Camelot/ICamelotNFTPool.sol +14 -0
- package/contracts/interfaces/Camelot/ICamelotNitroPoolFactory.sol +95 -0
- package/deployments/42161-markets/CAMELOT-ARBETH-27JUNE2024-ARBITRUM.json +10 -0
- package/deployments/42161-markets/CAMELOT-PEP-27JUNE2024-ARBITRUM.json +4 -4
- package/package.json +1 -1
- package/typechain-types/CamelotV1LpHelper.ts +203 -0
- package/typechain-types/CamelotV1Preview.ts +431 -0
- package/typechain-types/CamelotV1VolatileLpHelper.ts +0 -32
- package/typechain-types/ICamelotNFTPool.ts +85 -0
- package/typechain-types/ICamelotNitroPoolFactory.ts +1053 -0
- package/typechain-types/ICamelotSY.ts +100 -0
- package/typechain-types/IPendlePreviewHelper.ts +147 -0
- package/typechain-types/PendleCamelotV1SY.ts +2014 -0
- package/typechain-types/PendleCamelotV1VolatileSY.ts +14 -46
- package/typechain-types/factories/CamelotRewardHelper__factory.ts +24 -13
- package/typechain-types/factories/CamelotV1LpHelper__factory.ts +143 -0
- package/typechain-types/factories/CamelotV1Preview__factory.ts +309 -0
- package/typechain-types/factories/CamelotV1VolatileLpHelper__factory.ts +0 -26
- package/typechain-types/factories/ICamelotNFTPool__factory.ts +48 -0
- package/typechain-types/factories/ICamelotNitroPoolFactory__factory.ts +657 -0
- package/typechain-types/factories/ICamelotSY__factory.ts +49 -0
- package/typechain-types/factories/IPendlePreviewHelper__factory.ts +78 -0
- package/typechain-types/factories/PendleCamelotV1SY__factory.ts +1614 -0
- package/typechain-types/factories/PendleCamelotV1VolatileSY__factory.ts +25 -53
- package/typechain-types/hardhat.d.ts +9 -0
- package/typechain-types/index.ts +2 -0
package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol
CHANGED
|
@@ -4,6 +4,7 @@ pragma solidity 0.8.17;
|
|
|
4
4
|
|
|
5
5
|
import "../../../libraries/TokenHelper.sol";
|
|
6
6
|
import "../../../../interfaces/Camelot/ICamelotNFTFactory.sol";
|
|
7
|
+
import "../../../../interfaces/Camelot/ICamelotNitroPoolFactory.sol";
|
|
7
8
|
import "../../../../interfaces/Camelot/ICamelotNFTPool.sol";
|
|
8
9
|
import "../../../../interfaces/Camelot/ICamelotNitroPool.sol";
|
|
9
10
|
import "../../../../interfaces/Camelot/ICamelotNFTHandler.sol";
|
|
@@ -19,12 +20,14 @@ import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
|
|
|
19
20
|
* will be forced to occur and take away fees from our xGRAIL boosting
|
|
20
21
|
*/
|
|
21
22
|
contract CamelotRewardHelper is TokenHelper, ICamelotNFTHandler {
|
|
23
|
+
ICamelotNitroPoolFactory internal constant NITRO_POOL_FACTORY =
|
|
24
|
+
ICamelotNitroPoolFactory(0xe0a6b372Ac6AF4B37c7F3a989Fe5d5b194c24569);
|
|
22
25
|
uint256 internal constant POSITION_UNINITIALIZED = type(uint256).max;
|
|
23
26
|
uint256 internal constant MINIMUM_LIQUIDITY = 10 ** 3;
|
|
24
27
|
bytes4 internal constant _ERC721_RECEIVED = 0x150b7a02;
|
|
25
28
|
|
|
29
|
+
address public nitroPool;
|
|
26
30
|
address public immutable nftPool;
|
|
27
|
-
address public immutable nitroPool;
|
|
28
31
|
address public immutable GRAIL;
|
|
29
32
|
address public immutable xGRAIL;
|
|
30
33
|
uint256 public positionId = POSITION_UNINITIALIZED;
|
|
@@ -41,14 +44,18 @@ contract CamelotRewardHelper is TokenHelper, ICamelotNFTHandler {
|
|
|
41
44
|
_;
|
|
42
45
|
}
|
|
43
46
|
|
|
44
|
-
constructor(address
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
constructor(address _nftPool, uint256 _nitroPoolIndex) {
|
|
48
|
+
nftPool = _nftPool;
|
|
49
|
+
if (_nitroPoolIndex != type(uint256).max) {
|
|
50
|
+
nitroPool = NITRO_POOL_FACTORY.getNitroPool(_nitroPoolIndex);
|
|
51
|
+
require(ICamelotNitroPool(nitroPool).nftPool() == nftPool);
|
|
52
|
+
}
|
|
50
53
|
|
|
54
|
+
address lp;
|
|
55
|
+
(lp, GRAIL, xGRAIL, , , , , ) = ICamelotNFTPool(nftPool).getPoolInfo();
|
|
51
56
|
yieldBooster = ICamelotNFTPool(nftPool).yieldBooster();
|
|
57
|
+
|
|
58
|
+
_safeApproveInf(lp, nftPool);
|
|
52
59
|
IXGrail(xGRAIL).approveUsage(yieldBooster, type(uint256).max);
|
|
53
60
|
}
|
|
54
61
|
|
|
@@ -104,7 +111,6 @@ contract CamelotRewardHelper is TokenHelper, ICamelotNFTHandler {
|
|
|
104
111
|
positionId = ICamelotNFTPool(nftPool).lastTokenId() + 1;
|
|
105
112
|
ICamelotNFTPool(nftPool).createPosition(amountLp, 0);
|
|
106
113
|
|
|
107
|
-
// deposit nft to nitro pool (first time)
|
|
108
114
|
_depositToNitroPool();
|
|
109
115
|
|
|
110
116
|
return amountLp - MINIMUM_LIQUIDITY;
|
|
@@ -121,12 +127,14 @@ contract CamelotRewardHelper is TokenHelper, ICamelotNFTHandler {
|
|
|
121
127
|
_depositToNitroPool();
|
|
122
128
|
}
|
|
123
129
|
|
|
124
|
-
function _depositToNitroPool()
|
|
130
|
+
function _depositToNitroPool() internal {
|
|
125
131
|
// Nitro pool's on receive callback will execute the accounting logic
|
|
132
|
+
if (nitroPool == address(0) || positionId == POSITION_UNINITIALIZED) return;
|
|
126
133
|
IERC721(nftPool).safeTransferFrom(address(this), nitroPool, positionId);
|
|
127
134
|
}
|
|
128
135
|
|
|
129
|
-
function _withdrawFromNitroPool()
|
|
136
|
+
function _withdrawFromNitroPool() internal {
|
|
137
|
+
if (nitroPool == address(0) || positionId == POSITION_UNINITIALIZED) return;
|
|
130
138
|
ICamelotNitroPool(nitroPool).withdraw(positionId);
|
|
131
139
|
}
|
|
132
140
|
|
|
@@ -22,26 +22,18 @@ abstract contract CamelotV1VolatileLpHelper is TokenHelper, CamelotV1VolatileCom
|
|
|
22
22
|
address public immutable token0;
|
|
23
23
|
address public immutable token1;
|
|
24
24
|
address public immutable pair;
|
|
25
|
-
address public immutable factory;
|
|
26
25
|
address public immutable router;
|
|
27
26
|
|
|
28
|
-
address public referrerForSwap;
|
|
29
27
|
|
|
30
28
|
constructor(
|
|
31
29
|
address _pair,
|
|
32
|
-
address
|
|
33
|
-
address _router,
|
|
34
|
-
address _referrerForSwap
|
|
30
|
+
address _router
|
|
35
31
|
) {
|
|
36
32
|
assert(ICamelotPair(_pair).stableSwap() == false);
|
|
37
|
-
|
|
38
33
|
pair = _pair;
|
|
39
|
-
factory = _factory;
|
|
40
34
|
router = _router;
|
|
41
35
|
token0 = ICamelotPair(pair).token0();
|
|
42
36
|
token1 = ICamelotPair(pair).token1();
|
|
43
|
-
referrerForSwap = _referrerForSwap;
|
|
44
|
-
|
|
45
37
|
_safeApproveInf(token0, router);
|
|
46
38
|
_safeApproveInf(token1, router);
|
|
47
39
|
_safeApproveInf(pair, router);
|
|
@@ -137,7 +129,7 @@ abstract contract CamelotV1VolatileLpHelper is TokenHelper, CamelotV1VolatileCom
|
|
|
137
129
|
0,
|
|
138
130
|
path,
|
|
139
131
|
address(this),
|
|
140
|
-
|
|
132
|
+
address(0),
|
|
141
133
|
block.timestamp
|
|
142
134
|
);
|
|
143
135
|
|
|
@@ -19,19 +19,19 @@ contract PendleCamelotV1VolatileSY is
|
|
|
19
19
|
CamelotV1VolatilePreview public immutable previewHelper;
|
|
20
20
|
bool public isRewardDisabled;
|
|
21
21
|
|
|
22
|
+
/// @notice _nitroPoolIndex set to uint256(max) to indicate that this SY is not using Nitro Pool
|
|
22
23
|
constructor(
|
|
23
24
|
string memory _name,
|
|
24
25
|
string memory _symbol,
|
|
25
26
|
address _pair,
|
|
26
|
-
address _factory,
|
|
27
27
|
address _router,
|
|
28
|
-
address
|
|
29
|
-
|
|
28
|
+
address _nftPool,
|
|
29
|
+
uint256 _nitroPoolIndex,
|
|
30
30
|
CamelotV1VolatilePreview _previewHelper
|
|
31
31
|
)
|
|
32
|
-
CamelotV1VolatileLpHelper(_pair,
|
|
32
|
+
CamelotV1VolatileLpHelper(_pair, _router)
|
|
33
33
|
SYBaseWithRewards(_name, _symbol, _pair)
|
|
34
|
-
CamelotRewardHelper(
|
|
34
|
+
CamelotRewardHelper(_nftPool, _nitroPoolIndex)
|
|
35
35
|
{
|
|
36
36
|
rewardTokens.push(GRAIL);
|
|
37
37
|
updateRewardTokensList();
|
|
@@ -41,12 +41,10 @@ contract PendleCamelotV1VolatileSY is
|
|
|
41
41
|
/**
|
|
42
42
|
* @dev See {SYBase-_deposit}
|
|
43
43
|
*/
|
|
44
|
-
function _deposit(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
returns (uint256)
|
|
49
|
-
{
|
|
44
|
+
function _deposit(
|
|
45
|
+
address tokenIn,
|
|
46
|
+
uint256 amountDeposited
|
|
47
|
+
) internal virtual override returns (uint256) {
|
|
50
48
|
uint256 amountLpDeposited;
|
|
51
49
|
if (tokenIn == pair) {
|
|
52
50
|
amountLpDeposited = amountDeposited;
|
|
@@ -98,22 +96,20 @@ contract PendleCamelotV1VolatileSY is
|
|
|
98
96
|
* @dev See {IStandardizedYield-getRewardTokens}
|
|
99
97
|
*/
|
|
100
98
|
function _getRewardTokens() internal view virtual override returns (address[] memory res) {
|
|
101
|
-
|
|
102
|
-
res = new address[](1 + extraRewardsLen);
|
|
103
|
-
res[0] = GRAIL;
|
|
104
|
-
for (uint256 i = 0; i < extraRewardsLen; i++) {
|
|
105
|
-
res[1 + i] = rewardTokens[i];
|
|
106
|
-
}
|
|
99
|
+
return rewardTokens;
|
|
107
100
|
}
|
|
108
101
|
|
|
109
102
|
/// @notice allows anyone to add new rewardTokens to this SY if a new rewardToken is added to the Nitro pool
|
|
110
103
|
function updateRewardTokensList() public virtual {
|
|
104
|
+
if (nitroPool == address(0)) return; // if nitroPool is not set, we don't need to update rewardTokens list
|
|
105
|
+
|
|
111
106
|
address token1 = ICamelotNitroPool(nitroPool).rewardsToken1().token;
|
|
112
107
|
address token2 = ICamelotNitroPool(nitroPool).rewardsToken2().token;
|
|
113
108
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if (token2 != address(0) && !rewardTokens.contains(token2))
|
|
109
|
+
if (token1 != address(0) && token1 != xGRAIL && !rewardTokens.contains(token1))
|
|
110
|
+
rewardTokens.push(token1);
|
|
111
|
+
if (token2 != address(0) && token2 != xGRAIL && !rewardTokens.contains(token2))
|
|
112
|
+
rewardTokens.push(token2);
|
|
117
113
|
}
|
|
118
114
|
|
|
119
115
|
function _redeemExternalReward() internal override {
|
|
@@ -121,7 +117,9 @@ contract PendleCamelotV1VolatileSY is
|
|
|
121
117
|
return;
|
|
122
118
|
}
|
|
123
119
|
|
|
124
|
-
|
|
120
|
+
if (nitroPool != address(0)) {
|
|
121
|
+
ICamelotNitroPool(nitroPool).harvest();
|
|
122
|
+
}
|
|
125
123
|
ICamelotNFTPool(nftPool).harvestPosition(positionId);
|
|
126
124
|
_allocateXGrail();
|
|
127
125
|
}
|
|
@@ -130,12 +128,10 @@ contract PendleCamelotV1VolatileSY is
|
|
|
130
128
|
PREVIEW-RELATED
|
|
131
129
|
//////////////////////////////////////////////////////////////*/
|
|
132
130
|
|
|
133
|
-
function _previewDeposit(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
returns (uint256)
|
|
138
|
-
{
|
|
131
|
+
function _previewDeposit(
|
|
132
|
+
address tokenIn,
|
|
133
|
+
uint256 amountTokenToDeposit
|
|
134
|
+
) internal view override returns (uint256) {
|
|
139
135
|
if (tokenIn == pair) {
|
|
140
136
|
return amountTokenToDeposit;
|
|
141
137
|
} else {
|
|
@@ -143,12 +139,10 @@ contract PendleCamelotV1VolatileSY is
|
|
|
143
139
|
}
|
|
144
140
|
}
|
|
145
141
|
|
|
146
|
-
function _previewRedeem(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
returns (uint256)
|
|
151
|
-
{
|
|
142
|
+
function _previewRedeem(
|
|
143
|
+
address tokenOut,
|
|
144
|
+
uint256 amountSharesToRedeem
|
|
145
|
+
) internal view override returns (uint256) {
|
|
152
146
|
if (tokenOut == pair) {
|
|
153
147
|
return amountSharesToRedeem;
|
|
154
148
|
} else {
|
|
@@ -192,11 +186,7 @@ contract PendleCamelotV1VolatileSY is
|
|
|
192
186
|
function assetInfo()
|
|
193
187
|
external
|
|
194
188
|
view
|
|
195
|
-
returns (
|
|
196
|
-
AssetType assetType,
|
|
197
|
-
address assetAddress,
|
|
198
|
-
uint8 assetDecimals
|
|
199
|
-
)
|
|
189
|
+
returns (AssetType assetType, address assetAddress, uint8 assetDecimals)
|
|
200
190
|
{
|
|
201
191
|
return (AssetType.LIQUIDITY, pair, IERC20Metadata(pair).decimals());
|
|
202
192
|
}
|
|
@@ -210,7 +200,9 @@ contract PendleCamelotV1VolatileSY is
|
|
|
210
200
|
if (doRewardIndexUpdate) _updateRewardIndex();
|
|
211
201
|
|
|
212
202
|
if (positionId != POSITION_UNINITIALIZED) {
|
|
213
|
-
|
|
203
|
+
if (nitroPool != address(0)) {
|
|
204
|
+
ICamelotNitroPool(nitroPool).emergencyWithdraw(positionId);
|
|
205
|
+
}
|
|
214
206
|
ICamelotNFTPool(nftPool).emergencyWithdraw(positionId);
|
|
215
207
|
positionId = POSITION_UNINITIALIZED;
|
|
216
208
|
}
|
|
@@ -218,8 +210,18 @@ contract PendleCamelotV1VolatileSY is
|
|
|
218
210
|
isRewardDisabled = true;
|
|
219
211
|
}
|
|
220
212
|
|
|
221
|
-
function
|
|
222
|
-
|
|
213
|
+
function setNewNitroPool(uint256 newPoolIndex) external onlyOwner {
|
|
214
|
+
assert(!isRewardDisabled);
|
|
215
|
+
|
|
216
|
+
_updateRewardIndex();
|
|
217
|
+
_withdrawFromNitroPool();
|
|
218
|
+
|
|
219
|
+
nitroPool = NITRO_POOL_FACTORY.getNitroPool(newPoolIndex);
|
|
220
|
+
require(ICamelotNitroPool(nitroPool).nftPool() == nftPool, "invalid nitro pool");
|
|
221
|
+
|
|
222
|
+
_depositToNitroPool();
|
|
223
|
+
|
|
224
|
+
updateRewardTokensList();
|
|
223
225
|
}
|
|
224
226
|
|
|
225
227
|
// XGRAIL related, to be used only when this SY is deprecated
|
|
@@ -16,4 +16,18 @@ interface ICamelotNFTPool is IERC721 {
|
|
|
16
16
|
function yieldBooster() external view returns (address);
|
|
17
17
|
|
|
18
18
|
function emergencyWithdraw(uint256 tokenId) external;
|
|
19
|
+
|
|
20
|
+
function getPoolInfo()
|
|
21
|
+
external
|
|
22
|
+
view
|
|
23
|
+
returns (
|
|
24
|
+
address lpToken,
|
|
25
|
+
address grailToken,
|
|
26
|
+
address xGrailToken,
|
|
27
|
+
uint256 lastRewardTime,
|
|
28
|
+
uint256 accRewardsPerShare,
|
|
29
|
+
uint256 lpSupply,
|
|
30
|
+
uint256 lpSupplyWithMultiplier,
|
|
31
|
+
uint256 allocPoint
|
|
32
|
+
);
|
|
19
33
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
interface ICamelotNitroPoolFactory {
|
|
5
|
+
event CreateNitroPool(address nitroAddress);
|
|
6
|
+
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
|
|
7
|
+
event PublishNitroPool(address nitroAddress);
|
|
8
|
+
event SetDefaultFee(uint256 fee);
|
|
9
|
+
event SetEmergencyRecoveryAddress(address emergencyRecoveryAddress);
|
|
10
|
+
event SetExemptedAddress(address exemptedAddress, bool isExempted);
|
|
11
|
+
event SetFeeAddress(address feeAddress);
|
|
12
|
+
event SetNitroPoolOwner(address previousOwner, address newOwner);
|
|
13
|
+
|
|
14
|
+
struct Settings {
|
|
15
|
+
uint256 startTime;
|
|
16
|
+
uint256 endTime;
|
|
17
|
+
uint256 harvestStartTime;
|
|
18
|
+
uint256 depositEndTime;
|
|
19
|
+
uint256 lockDurationReq;
|
|
20
|
+
uint256 lockEndReq;
|
|
21
|
+
uint256 depositAmountReq;
|
|
22
|
+
bool whitelist;
|
|
23
|
+
string description;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function MAX_DEFAULT_FEE() external view returns (uint256);
|
|
27
|
+
|
|
28
|
+
function createNitroPool(
|
|
29
|
+
address nftPoolAddress,
|
|
30
|
+
address rewardsToken1,
|
|
31
|
+
address rewardsToken2,
|
|
32
|
+
Settings memory settings
|
|
33
|
+
) external returns (address nitroPool);
|
|
34
|
+
|
|
35
|
+
function defaultFee() external view returns (uint256);
|
|
36
|
+
|
|
37
|
+
function emergencyRecoveryAddress() external view returns (address);
|
|
38
|
+
|
|
39
|
+
function exemptedAddressesLength() external view returns (uint256);
|
|
40
|
+
|
|
41
|
+
function feeAddress() external view returns (address);
|
|
42
|
+
|
|
43
|
+
function getExemptedAddress(uint256 index) external view returns (address);
|
|
44
|
+
|
|
45
|
+
function getNftPoolPublishedNitroPool(address nftPoolAddress, uint256 index)
|
|
46
|
+
external
|
|
47
|
+
view
|
|
48
|
+
returns (address);
|
|
49
|
+
|
|
50
|
+
function getNitroPool(uint256 index) external view returns (address);
|
|
51
|
+
|
|
52
|
+
function getNitroPoolFee(address nitroPoolAddress, address ownerAddress)
|
|
53
|
+
external
|
|
54
|
+
view
|
|
55
|
+
returns (uint256);
|
|
56
|
+
|
|
57
|
+
function getOwnerNitroPool(address userAddress, uint256 index) external view returns (address);
|
|
58
|
+
|
|
59
|
+
function getPublishedNitroPool(uint256 index) external view returns (address);
|
|
60
|
+
|
|
61
|
+
function grailToken() external view returns (address);
|
|
62
|
+
|
|
63
|
+
function isExemptedAddress(address checkedAddress) external view returns (bool);
|
|
64
|
+
|
|
65
|
+
function nftPoolPublishedNitroPoolsLength(address nftPoolAddress)
|
|
66
|
+
external
|
|
67
|
+
view
|
|
68
|
+
returns (uint256);
|
|
69
|
+
|
|
70
|
+
function nitroPoolsLength() external view returns (uint256);
|
|
71
|
+
|
|
72
|
+
function owner() external view returns (address);
|
|
73
|
+
|
|
74
|
+
function ownerNitroPoolsLength(address userAddress) external view returns (uint256);
|
|
75
|
+
|
|
76
|
+
function publishNitroPool(address nftAddress) external;
|
|
77
|
+
|
|
78
|
+
function publishedNitroPoolsLength() external view returns (uint256);
|
|
79
|
+
|
|
80
|
+
function renounceOwnership() external;
|
|
81
|
+
|
|
82
|
+
function setDefaultFee(uint256 newFee) external;
|
|
83
|
+
|
|
84
|
+
function setEmergencyRecoveryAddress(address emergencyRecoveryAddress_) external;
|
|
85
|
+
|
|
86
|
+
function setExemptedAddress(address exemptedAddress, bool isExempted) external;
|
|
87
|
+
|
|
88
|
+
function setFeeAddress(address feeAddress_) external;
|
|
89
|
+
|
|
90
|
+
function setNitroPoolOwner(address previousOwner, address newOwner) external;
|
|
91
|
+
|
|
92
|
+
function transferOwnership(address newOwner) external;
|
|
93
|
+
|
|
94
|
+
function xGrailToken() external view returns (address);
|
|
95
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "SY ARB-ETH_Camelot",
|
|
3
|
+
"SY": "0x318EEC91f653cA72fAFB038f9AD792A6bC0d644C",
|
|
4
|
+
"YT": "0x69ddf9Ce5568EfA913f1eA601Ed298ccfeBfC811",
|
|
5
|
+
"PT": "0xa3BeDB2885Bf23E9b8f72e38Bbd9fdDD1b50E1d6",
|
|
6
|
+
"market": "0x9f003Fd08d5317Dfd988Bd1EE151B27836FE6C3D",
|
|
7
|
+
"expiry": 1719446400,
|
|
8
|
+
"scalarRoot": "7045105000000000000",
|
|
9
|
+
"initAnchor": "1461042000000000000"
|
|
10
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "SY PENDLE-ETH_Camelot",
|
|
3
|
-
"SY": "
|
|
4
|
-
"YT": "
|
|
5
|
-
"PT": "
|
|
6
|
-
"market": "
|
|
3
|
+
"SY": "0xc79d8a2AA6d769138E599D4DBC30569c9870a6Ee",
|
|
4
|
+
"YT": "0x7588C74473a84d7Fa87Bec375B408e3402f7fdb9",
|
|
5
|
+
"PT": "0xba1F509C6E5f1f6a529Ecc0913b27658a678B4b9",
|
|
6
|
+
"market": "0x24e4Df37ea00C4954d668e3ce19fFdcffDEc2cF6",
|
|
7
7
|
"expiry": 1719446400,
|
|
8
8
|
"scalarRoot": "5388097000000000000",
|
|
9
9
|
"initAnchor": "1485252000000000000"
|
package/package.json
CHANGED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import {
|
|
5
|
+
BaseContract,
|
|
6
|
+
BigNumber,
|
|
7
|
+
BytesLike,
|
|
8
|
+
CallOverrides,
|
|
9
|
+
PopulatedTransaction,
|
|
10
|
+
Signer,
|
|
11
|
+
utils,
|
|
12
|
+
} from "ethers";
|
|
13
|
+
import { FunctionFragment, Result } from "@ethersproject/abi";
|
|
14
|
+
import { Listener, Provider } from "@ethersproject/providers";
|
|
15
|
+
import type {
|
|
16
|
+
TypedEventFilter,
|
|
17
|
+
TypedEvent,
|
|
18
|
+
TypedListener,
|
|
19
|
+
OnEvent,
|
|
20
|
+
} from "./common";
|
|
21
|
+
|
|
22
|
+
export interface CamelotV1LpHelperInterface extends utils.Interface {
|
|
23
|
+
contractName: "CamelotV1LpHelper";
|
|
24
|
+
functions: {
|
|
25
|
+
"factory()": FunctionFragment;
|
|
26
|
+
"isStable()": FunctionFragment;
|
|
27
|
+
"multiplier0()": FunctionFragment;
|
|
28
|
+
"multiplier1()": FunctionFragment;
|
|
29
|
+
"pair()": FunctionFragment;
|
|
30
|
+
"referrerForSwap()": FunctionFragment;
|
|
31
|
+
"router()": FunctionFragment;
|
|
32
|
+
"token0()": FunctionFragment;
|
|
33
|
+
"token1()": FunctionFragment;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
encodeFunctionData(functionFragment: "factory", values?: undefined): string;
|
|
37
|
+
encodeFunctionData(functionFragment: "isStable", values?: undefined): string;
|
|
38
|
+
encodeFunctionData(
|
|
39
|
+
functionFragment: "multiplier0",
|
|
40
|
+
values?: undefined
|
|
41
|
+
): string;
|
|
42
|
+
encodeFunctionData(
|
|
43
|
+
functionFragment: "multiplier1",
|
|
44
|
+
values?: undefined
|
|
45
|
+
): string;
|
|
46
|
+
encodeFunctionData(functionFragment: "pair", values?: undefined): string;
|
|
47
|
+
encodeFunctionData(
|
|
48
|
+
functionFragment: "referrerForSwap",
|
|
49
|
+
values?: undefined
|
|
50
|
+
): string;
|
|
51
|
+
encodeFunctionData(functionFragment: "router", values?: undefined): string;
|
|
52
|
+
encodeFunctionData(functionFragment: "token0", values?: undefined): string;
|
|
53
|
+
encodeFunctionData(functionFragment: "token1", values?: undefined): string;
|
|
54
|
+
|
|
55
|
+
decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result;
|
|
56
|
+
decodeFunctionResult(functionFragment: "isStable", data: BytesLike): Result;
|
|
57
|
+
decodeFunctionResult(
|
|
58
|
+
functionFragment: "multiplier0",
|
|
59
|
+
data: BytesLike
|
|
60
|
+
): Result;
|
|
61
|
+
decodeFunctionResult(
|
|
62
|
+
functionFragment: "multiplier1",
|
|
63
|
+
data: BytesLike
|
|
64
|
+
): Result;
|
|
65
|
+
decodeFunctionResult(functionFragment: "pair", data: BytesLike): Result;
|
|
66
|
+
decodeFunctionResult(
|
|
67
|
+
functionFragment: "referrerForSwap",
|
|
68
|
+
data: BytesLike
|
|
69
|
+
): Result;
|
|
70
|
+
decodeFunctionResult(functionFragment: "router", data: BytesLike): Result;
|
|
71
|
+
decodeFunctionResult(functionFragment: "token0", data: BytesLike): Result;
|
|
72
|
+
decodeFunctionResult(functionFragment: "token1", data: BytesLike): Result;
|
|
73
|
+
|
|
74
|
+
events: {};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface CamelotV1LpHelper extends BaseContract {
|
|
78
|
+
contractName: "CamelotV1LpHelper";
|
|
79
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
80
|
+
attach(addressOrName: string): this;
|
|
81
|
+
deployed(): Promise<this>;
|
|
82
|
+
|
|
83
|
+
interface: CamelotV1LpHelperInterface;
|
|
84
|
+
|
|
85
|
+
queryFilter<TEvent extends TypedEvent>(
|
|
86
|
+
event: TypedEventFilter<TEvent>,
|
|
87
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
88
|
+
toBlock?: string | number | undefined
|
|
89
|
+
): Promise<Array<TEvent>>;
|
|
90
|
+
|
|
91
|
+
listeners<TEvent extends TypedEvent>(
|
|
92
|
+
eventFilter?: TypedEventFilter<TEvent>
|
|
93
|
+
): Array<TypedListener<TEvent>>;
|
|
94
|
+
listeners(eventName?: string): Array<Listener>;
|
|
95
|
+
removeAllListeners<TEvent extends TypedEvent>(
|
|
96
|
+
eventFilter: TypedEventFilter<TEvent>
|
|
97
|
+
): this;
|
|
98
|
+
removeAllListeners(eventName?: string): this;
|
|
99
|
+
off: OnEvent<this>;
|
|
100
|
+
on: OnEvent<this>;
|
|
101
|
+
once: OnEvent<this>;
|
|
102
|
+
removeListener: OnEvent<this>;
|
|
103
|
+
|
|
104
|
+
functions: {
|
|
105
|
+
factory(overrides?: CallOverrides): Promise<[string]>;
|
|
106
|
+
|
|
107
|
+
isStable(overrides?: CallOverrides): Promise<[boolean]>;
|
|
108
|
+
|
|
109
|
+
multiplier0(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
110
|
+
|
|
111
|
+
multiplier1(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
112
|
+
|
|
113
|
+
pair(overrides?: CallOverrides): Promise<[string]>;
|
|
114
|
+
|
|
115
|
+
referrerForSwap(overrides?: CallOverrides): Promise<[string]>;
|
|
116
|
+
|
|
117
|
+
router(overrides?: CallOverrides): Promise<[string]>;
|
|
118
|
+
|
|
119
|
+
token0(overrides?: CallOverrides): Promise<[string]>;
|
|
120
|
+
|
|
121
|
+
token1(overrides?: CallOverrides): Promise<[string]>;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
factory(overrides?: CallOverrides): Promise<string>;
|
|
125
|
+
|
|
126
|
+
isStable(overrides?: CallOverrides): Promise<boolean>;
|
|
127
|
+
|
|
128
|
+
multiplier0(overrides?: CallOverrides): Promise<BigNumber>;
|
|
129
|
+
|
|
130
|
+
multiplier1(overrides?: CallOverrides): Promise<BigNumber>;
|
|
131
|
+
|
|
132
|
+
pair(overrides?: CallOverrides): Promise<string>;
|
|
133
|
+
|
|
134
|
+
referrerForSwap(overrides?: CallOverrides): Promise<string>;
|
|
135
|
+
|
|
136
|
+
router(overrides?: CallOverrides): Promise<string>;
|
|
137
|
+
|
|
138
|
+
token0(overrides?: CallOverrides): Promise<string>;
|
|
139
|
+
|
|
140
|
+
token1(overrides?: CallOverrides): Promise<string>;
|
|
141
|
+
|
|
142
|
+
callStatic: {
|
|
143
|
+
factory(overrides?: CallOverrides): Promise<string>;
|
|
144
|
+
|
|
145
|
+
isStable(overrides?: CallOverrides): Promise<boolean>;
|
|
146
|
+
|
|
147
|
+
multiplier0(overrides?: CallOverrides): Promise<BigNumber>;
|
|
148
|
+
|
|
149
|
+
multiplier1(overrides?: CallOverrides): Promise<BigNumber>;
|
|
150
|
+
|
|
151
|
+
pair(overrides?: CallOverrides): Promise<string>;
|
|
152
|
+
|
|
153
|
+
referrerForSwap(overrides?: CallOverrides): Promise<string>;
|
|
154
|
+
|
|
155
|
+
router(overrides?: CallOverrides): Promise<string>;
|
|
156
|
+
|
|
157
|
+
token0(overrides?: CallOverrides): Promise<string>;
|
|
158
|
+
|
|
159
|
+
token1(overrides?: CallOverrides): Promise<string>;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
filters: {};
|
|
163
|
+
|
|
164
|
+
estimateGas: {
|
|
165
|
+
factory(overrides?: CallOverrides): Promise<BigNumber>;
|
|
166
|
+
|
|
167
|
+
isStable(overrides?: CallOverrides): Promise<BigNumber>;
|
|
168
|
+
|
|
169
|
+
multiplier0(overrides?: CallOverrides): Promise<BigNumber>;
|
|
170
|
+
|
|
171
|
+
multiplier1(overrides?: CallOverrides): Promise<BigNumber>;
|
|
172
|
+
|
|
173
|
+
pair(overrides?: CallOverrides): Promise<BigNumber>;
|
|
174
|
+
|
|
175
|
+
referrerForSwap(overrides?: CallOverrides): Promise<BigNumber>;
|
|
176
|
+
|
|
177
|
+
router(overrides?: CallOverrides): Promise<BigNumber>;
|
|
178
|
+
|
|
179
|
+
token0(overrides?: CallOverrides): Promise<BigNumber>;
|
|
180
|
+
|
|
181
|
+
token1(overrides?: CallOverrides): Promise<BigNumber>;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
populateTransaction: {
|
|
185
|
+
factory(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
186
|
+
|
|
187
|
+
isStable(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
188
|
+
|
|
189
|
+
multiplier0(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
190
|
+
|
|
191
|
+
multiplier1(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
192
|
+
|
|
193
|
+
pair(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
194
|
+
|
|
195
|
+
referrerForSwap(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
196
|
+
|
|
197
|
+
router(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
198
|
+
|
|
199
|
+
token0(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
200
|
+
|
|
201
|
+
token1(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
202
|
+
};
|
|
203
|
+
}
|