Created
March 19, 2022 18:22
-
-
Save 0xmikko/24bc1db306d82ef4d8fdca3cce9bfe1a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (uint256 i = 0; i < len; ) { | |
address allowedContract = creditConfigurator.allowedContracts(i); | |
address adapter = creditFacade.contractToAdapter(allowedContract); | |
AdapterType aType = IAdapter(adapter)._gearboxAdapterType(); | |
if (aType == AdapterType.CONVEX_V1_BASE_REWARD_POOL) { | |
uint256 pid = IConvexV1BaseRewardPoolAdapter(adapter).pid(); | |
address stakedPhantomToken = IConvexV1BaseRewardPoolAdapter( | |
adapter | |
).stakedPhantomToken(); | |
address curveLPtoken = IConvexV1BaseRewardPoolAdapter(adapter) | |
.curveLPtoken(); | |
address cvxLPToken = IConvexV1BaseRewardPoolAdapter(adapter) | |
.cvxLPtoken(); | |
priceOracle.addPriceFeed( | |
cvxLPToken, | |
priceOracle.priceFeeds(curveLPtoken) | |
); | |
priceOracle.addPriceFeed( | |
cvxLPToken, | |
priceOracle.priceFeeds(curveLPtoken) | |
); | |
creditConfigurator.addTokenToAllowedList(stakedPhantomToken); // F:[CC-1] | |
creditConfigurator.setLiquidationThreshold( | |
stakedPhantomToken, | |
creditManager.liquidationThresholds(curveLPtoken) | |
); // F:[CC-1] | |
} | |
unchecked { | |
++i; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment