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

Add a SafeERC20:safePermit function #3280

Merged
merged 12 commits into from
Jun 7, 2022

Conversation

Amxx
Copy link
Collaborator

@Amxx Amxx commented Mar 22, 2022

Fixes #3145

Note: IMO it would be slightly better to use abi.encodeCall instead of abi.encodeWithSelector, but that would require a bump to 0.8.11

PR Checklist

  • Tests
  • Documentation
  • Changelog entry

@Amxx Amxx changed the title Add a SafeERC2O:safePermit function Add a SafeERC20:safePermit function Mar 22, 2022
@Amxx Amxx marked this pull request as draft March 28, 2022 15:56
@Amxx Amxx marked this pull request as ready for review June 6, 2022 10:54
CHANGELOG.md Outdated Show resolved Hide resolved
contracts/mocks/SafeERC20Helper.sol Outdated Show resolved Hide resolved
contracts/token/ERC20/extensions/draft-IERC20Permit.sol Outdated Show resolved Hide resolved
contracts/token/ERC20/utils/SafeERC20.sol Outdated Show resolved Hide resolved
test/token/ERC20/utils/SafeERC20.test.js Outdated Show resolved Hide resolved
frangio
frangio previously approved these changes Jun 7, 2022
@Amxx Amxx enabled auto-merge (squash) June 7, 2022 14:00
@Amxx Amxx merged commit 7c75b8a into OpenZeppelin:master Jun 7, 2022
@Amxx Amxx deleted the feature/ERC20/safePermit branch June 7, 2022 15:23
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.

Add a safePermit function for ensuring reverting calls to ERC20.permit()
2 participants