Skip to content

Add SafeERC20.forceApprove()#4067

Merged
frangio merged 14 commits intoOpenZeppelin:masterfrom
Amxx:feature/force-approve-master
Feb 24, 2023
Merged

Add SafeERC20.forceApprove()#4067
frangio merged 14 commits intoOpenZeppelin:masterfrom
Amxx:feature/force-approve-master

Conversation

@Amxx
Copy link
Copy Markdown
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
Copy Markdown

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
Comment thread contracts/token/ERC20/utils/SafeERC20.sol Outdated
Comment thread contracts/token/ERC20/utils/SafeERC20.sol Outdated
Comment thread contracts/token/ERC20/utils/SafeERC20.sol Outdated
Comment thread contracts/token/ERC20/utils/SafeERC20.sol
Comment thread contracts/token/ERC20/utils/SafeERC20.sol Outdated
Comment thread test/token/ERC20/utils/SafeERC20.test.js Outdated
Comment thread test/token/ERC20/utils/SafeERC20.test.js Outdated
Comment thread test/token/ERC20/utils/SafeERC20.test.js Outdated
Comment thread test/token/ERC20/utils/SafeERC20.test.js Outdated
Copy link
Copy Markdown
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!

import "../../token/ERC20/ERC20.sol";

function transfer(address, uint256) public pure returns (bool) {
abstract contract ERC20ReturnTrueMock is ERC20 {
Copy link
Copy Markdown
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
Copy Markdown
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