diff --git a/src/Staking.sol b/src/Staking.sol index b8348e4..b7ef4e4 100644 --- a/src/Staking.sol +++ b/src/Staking.sol @@ -368,6 +368,7 @@ contract Staking is ERC20VotesUpgradeable, Ownable2StepUpgradeable { // Prevents the keyper from claiming more than they should uint256 maxWithdrawAmount = maxWithdraw(keyper); + console.log("maxWithdrawAmount", maxWithdrawAmount); // If the amount is greater than the max withdraw amount, the contract // will transfer the maximum amount available not the requested amount diff --git a/test/Staking.t.sol b/test/Staking.t.sol index 646e2a3..31f87e4 100644 --- a/test/Staking.t.sol +++ b/test/Staking.t.sol @@ -752,6 +752,8 @@ contract ClaimRewards is StakingTest { _amount = _boundToRealisticStake(_amount); _jump = _boundRealisticTimeAhead(_jump); + vm.assume(_depositor1 != _depositor2); + _mintGovToken(_depositor1, _amount); _mintGovToken(_depositor2, _amount); @@ -850,6 +852,11 @@ contract ClaimRewards is StakingTest { } function testFuzz_RevertIf_KeyperHasNoSHares(address _depositor) public { + vm.assume( + _depositor != address(0) && + _depositor != ProxyUtils.getAdminAddress(address(staking)) + ); + vm.prank(_depositor); vm.expectRevert(Staking.KeyperHasNoShares.selector); staking.claimRewards(0);