Skip to content
New issue

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

feat: Add increase/decrease allowance functionality #20

Merged
merged 5 commits into from
Mar 9, 2022

Conversation

lucas-manuel
Copy link

Description

Add additional functions increaseAllowance and decreaseAllowance to prevent allowance race conditions.

Addresses Trail of Bits issue: https://github.com/maple-labs/tob-audit-2022-03-07/issues/3

@shortcut-integration
Copy link

vbidin
vbidin previously approved these changes Mar 9, 2022
@@ -62,6 +62,24 @@ interface IERC20 {
*/
function approve(address spender_, uint256 amount_) external returns (bool success_);

/**
* @dev Function that allows one account to decrease the allowance of another account over their tokens.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spacing should be double for NatSpec.

@lucas-manuel lucas-manuel merged commit 15ecb91 into main Mar 9, 2022
@lucas-manuel lucas-manuel deleted the sc-4961-increase-decrease-allowance branch March 9, 2022 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants