Skip to content

Instantly share code, notes, and snippets.

@0xmikko
Created March 19, 2022 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xmikko/24bc1db306d82ef4d8fdca3cce9bfe1a to your computer and use it in GitHub Desktop.
Save 0xmikko/24bc1db306d82ef4d8fdca3cce9bfe1a to your computer and use it in GitHub Desktop.
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