Skip to content

Commit

Permalink
Add token arg to override
Browse files Browse the repository at this point in the history
  • Loading branch information
whatl3y committed Feb 16, 2022
1 parent 89a117b commit dd3c43d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions contracts/OKLGRewardsDistributor.sol
Expand Up @@ -478,15 +478,16 @@ contract OKLGRewardDistributor is IOKLGRewardDistributor, OKLGWithdrawable {
minSecondsBeforeUnstake = _seconds;
}

function stakeOverride(address[] memory users, Share[] memory shareholderInfo)
external
onlyOwner
{
function stakeOverride(
address token,
address[] memory users,
Share[] memory shareholderInfo
) external onlyOwner {
require(users.length == shareholderInfo.length, 'must be same length');
uint256[] memory _empty = new uint256[](0);
for (uint256 i = 0; i < users.length; i++) {
shares[users[i]].nftBoostTokenIds = shareholderInfo[i].nftBoostTokenIds;
_stake(users[i], address(0), shareholderInfo[i].amountBase, _empty, true);
_stake(users[i], token, shareholderInfo[i].amountBase, _empty, true);
}
}

Expand Down

0 comments on commit dd3c43d

Please sign in to comment.