We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
After the fix for #30, renewable allowance that recovers to MAX_UINT256 will no longer decrement allowance going forward.
The text was updated successfully, but these errors were encountered:
Potential solutions:
Sorry, something went wrong.
On further investigation, this likely is a non-issue:
Since maxAmount limits the maxRecoverable too, the following scenario cannot happen.
The following test passes given the scenario described here #51
function testMaxRecovery() public { // approves MAX_UINT-1, recovery 1 vm.prank(user1); funnel.approveRenewable(address(spender), type(uint256).max - 1, 1); // same block transfer MAX_UINT-1 vm.prank(address(spender)); vm.expectEmit(true, false, false, true); emit Transfer(user1, user2, type(uint256).max - 1); assertTrue(funnel.transferFrom(user1, user2, type(uint256).max - 1)); assertEq(funnel.allowance(user1, address(spender)), 0); vm.warp(2); // next block allowance assertEq(funnel.allowance(user1, address(spender)), 1); }
zhongfu
When branches are created from issues, their pull requests are automatically linked.
After the fix for #30, renewable allowance that recovers to MAX_UINT256 will no longer decrement allowance going forward.
The text was updated successfully, but these errors were encountered: