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 SafeERC20.forceApprove() #4067

Merged
merged 14 commits into from
Feb 24, 2023

Conversation

Amxx
Copy link
Collaborator

@Amxx Amxx commented Feb 22, 2023

Replaces #3851, and targets master
Fixes LIB-705

PR Checklist

  • Tests
  • Documentation
  • Changeset entry (run npx changeset add)

@changeset-bot
Copy link

changeset-bot bot commented Feb 22, 2023

🦋 Changeset detected

Latest commit: 9f51df1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openzeppelin-solidity Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Amxx Amxx mentioned this pull request Feb 22, 2023
3 tasks
@Amxx Amxx changed the title Fix SafeERC20.forceApprove and add tests Add SafeERC20.forceApprove() Feb 22, 2023
contracts/token/ERC20/utils/SafeERC20.sol Outdated Show resolved Hide resolved
contracts/token/ERC20/utils/SafeERC20.sol Outdated Show resolved Hide resolved
contracts/token/ERC20/utils/SafeERC20.sol Outdated Show resolved Hide resolved
contracts/token/ERC20/utils/SafeERC20.sol 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
test/token/ERC20/utils/SafeERC20.test.js Outdated Show resolved Hide resolved
test/token/ERC20/utils/SafeERC20.test.js Outdated Show resolved Hide resolved
test/token/ERC20/utils/SafeERC20.test.js Outdated Show resolved Hide resolved
Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

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

Just a comment, rest is good!


function transfer(address, uint256) public pure returns (bool) {
abstract contract ERC20ReturnTrueMock is ERC20 {
Copy link
Contributor

Choose a reason for hiding this comment

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

This appears equivalent to ERC20. I would remove it.

Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@frangio frangio enabled auto-merge (squash) February 24, 2023 20:17
@frangio frangio merged commit 8b47e96 into OpenZeppelin:master Feb 24, 2023
@Amxx Amxx deleted the feature/force-approve-master branch February 27, 2023 09:53
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.

2 participants