diff --git a/test/mocks/MockStakingRewards.sol b/test/mocks/MockStakingRewards.sol index 0470e9d..ce72f5d 100644 --- a/test/mocks/MockStakingRewards.sol +++ b/test/mocks/MockStakingRewards.sol @@ -42,4 +42,18 @@ contract MockStakingRewards { return stakedBalances[account]; } + /// @notice Simulates rewards being added to a staker's balance + /// @dev This function also increases the total staked amount and requires + /// the reward tokens to be transferred to this contract first + /// @param staker The address receiving the rewards + /// @param amount The amount of rewards to add + function addRewardToStaker(address staker, uint256 amount) external { + require( + stakingToken.balanceOf(address(this)) >= amount, + "Insufficient reward tokens" + ); + stakedBalances[staker] += amount; + totalStaked += amount; + } + }