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

Max approval erc20s #971

Merged
merged 12 commits into from
Oct 11, 2023
Merged

Max approval erc20s #971

merged 12 commits into from
Oct 11, 2023

Conversation

tbrent
Copy link
Collaborator

@tbrent tbrent commented Oct 10, 2023

Context: The currently deployed wcUSDCv3.approve() reverts for calls that pass in a value that is neither 0 nor type(uint256).max. This PR makes the protocol compatible with ERC20s that are fussy like this. I have added regression tests that I have confirmed fail on the 3.0.0 commit.

contracts/libraries/Allowance.sol Outdated Show resolved Hide resolved
contracts/p1/mixins/Trading.sol Outdated Show resolved Hide resolved
@tbrent tbrent marked this pull request as ready for review October 10, 2023 16:56
@tbrent
Copy link
Collaborator Author

tbrent commented Oct 11, 2023

LGTM

@pmckelvy1 pmckelvy1 merged commit 7affc85 into master Oct 11, 2023
9 checks passed
@pmckelvy1 pmckelvy1 deleted the max-approval-erc20s branch October 11, 2023 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants