Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: convex base reward adapter fix for SNX case #59

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions contracts/adapters/convex/ConvexV1_BaseRewardPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,22 @@ contract ConvexV1BaseRewardPoolAdapter is AbstractAdapter, IConvexV1BaseRewardPo
address _extraReward1;
address _extraReward2;
uint256 extraRewardLength = IBaseRewardPool(_baseRewardPool).extraRewardsLength();

if (extraRewardLength >= 1) {
_extraReward1 = IRewards(IBaseRewardPool(_baseRewardPool).extraRewards(0)).rewardToken();

try IExtraRewardWrapper(_extraReward1).booster() returns (address) {
try ICreditManagerV3(creditManager).getTokenMaskOrRevert(_extraReward1) returns (uint256) {}
catch {
_extraReward1 = IExtraRewardWrapper(_extraReward1).token();
} catch {}
}

if (extraRewardLength >= 2) {
_extraReward2 = IRewards(IBaseRewardPool(_baseRewardPool).extraRewards(1)).rewardToken();

try IExtraRewardWrapper(_extraReward2).booster() returns (address) {
try ICreditManagerV3(creditManager).getTokenMaskOrRevert(_extraReward2) returns (uint256) {}
catch {
_extraReward2 = IExtraRewardWrapper(_extraReward2).token();
} catch {}
}
}
}

Expand Down
Loading