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

Custom Errors For ERC20 and unit tests #4139

Closed
wants to merge 1 commit into from

Conversation

lhemerly
Copy link
Contributor

Fixes #2839

Add feature custom error to ERC20

Testing is raising errors for multicall, ERC777 and ERC 4626 because I have not added the feature to them yet, and they are using ERC20 behavior. Wanted to make sure the design decisions I made for the feature and testing are OK so I can move forward to the other contracts

  • [ X ] Tests
  • Documentation
  • Changeset entry (run npx changeset add)

@changeset-bot
Copy link

changeset-bot bot commented Mar 25, 2023

⚠️ No Changeset found

Latest commit: bb8ba79

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Fixes OpenZeppelin#2839

Add feature custom error to ERC20

Testing is raising errors for multicall, ERC777 and ERC 4626 because I have not added the feature to them yet, and they are using ERC20 behavior. Wanted to make sure the design decisions I made for the feature and testing are OK so I can move forward to the other contracts

- [ X ] Tests
- [ ] Documentation
- [ ] Changeset entry (run `npx changeset add`)
@ernestognw
Copy link
Member

ernestognw commented Mar 27, 2023

Hey @lhemerl, thanks for the contribution.

For context, EIP-6093 was published for community feedback before we implement it into OpenZeppelin Contracts for the following reasons:

  1. We don't want to make arbitrary decisions on the way custom errors should look, and we're rather asking for feedback (this is the official discussion)
  2. We'll try to use the same rationale in 6093 for migrating all the contracts in 5.0
  3. Making the changes as of now will be breaking for the library as stated in our API Stability docs

Also, we'll deprecate ERC777 in 4.9 so the testing issues on it can wait.

I'll close since it's too soon for 5.0 changes, but feel free to join the 6093 conversation, especially if you saw any particular use case we didn't consider while you were working on this.

@ernestognw ernestognw closed this Mar 27, 2023
@lhemerly lhemerly deleted the lhemerly/issue2839 branch March 27, 2023 16:30
@ThisCoolDude

This comment was marked as spam.

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.

Solidity 0.8.4 Custom Errors
3 participants