This is a straightforward mitigated change. Nevertheless, I have added the following assertions to further confirm that maxMint() and maxDeposit() could only return correct values, i.e 0, when the contract is paused:
function testMaxMint() public {
address liqStaker = getActor("liqStaker");
assertEq(ggAVAX.maxMint(liqStaker), type(uint256).max);
vm.prank(address(ocyticus));
dao.pauseContract("TokenggAVAX");
+ assertFalse(ggAVAX.maxMint(liqStaker) == 1);
assertEq(ggAVAX.maxMint(liqStaker), 0);
}
function testMaxDeposit() public {
address liqStaker = getActor("liqStaker");
assertEq(ggAVAX.maxDeposit(liqStaker), type(uint256).max);
vm.prank(address(ocyticus));
dao.pauseContract("TokenggAVAX");
+ assertFalse(ggAVAX.maxDeposit(liqStaker) == 1);
assertEq(ggAVAX.maxDeposit(liqStaker), 0);
}
This is a straightforward mitigated change. Nevertheless, I have added the following assertions to further confirm that
maxMint()
andmaxDeposit()
could only return correct values, i.e 0, when the contract is paused: