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 EIP-6093: Custom errors for commonly-used tokens #6093

Merged
merged 15 commits into from
Dec 13, 2022

Conversation

ernestognw
Copy link
Contributor

@ernestognw ernestognw commented Dec 6, 2022

Description

Since the introduction custom errors in Solidity in v0.8.4, there's now a more expressive and gas-efficient way of reverting changes during a transaction.

Given this new addition, we're proposing a list of standard errors to be used for the standard tokens (ERC20, ERC721, and ERC1155), so the clients and implementers can expect an insightful and structured way from a transaction error.

Discussions at https://ethereum-magicians.org/t/eip-6093-custom-errors-for-erc-tokens/12043

@github-actions github-actions bot added c-new Creates a brand new proposal e-number Waiting on EIP Number assignment s-draft This EIP is a Draft t-erc labels Dec 6, 2022
@ernestognw ernestognw changed the title EIP-NNNN: Custom errors for ERC tokens EIP-6093: Custom errors for ERC tokens Dec 6, 2022
@eth-bot
Copy link
Collaborator

eth-bot commented Dec 6, 2022

All tests passed; auto-merging...

(pass) eip-6093.md

classification
updateEIP
  • passed!

@github-actions github-actions bot removed the e-number Waiting on EIP Number assignment label Dec 6, 2022
@Pandapip1 Pandapip1 changed the title EIP-6093: Custom errors for ERC tokens Add EIP-6093: Custom errors for ERC tokens Dec 7, 2022
EIPS/eip-6093.md Outdated Show resolved Hide resolved
EIPS/eip-6093.md Outdated Show resolved Hide resolved
EIPS/eip-6093.md Outdated Show resolved Hide resolved
EIPS/eip-6093.md Outdated Show resolved Hide resolved
EIPS/eip-6093.md Outdated Show resolved Hide resolved
EIPS/eip-6093.md Outdated Show resolved Hide resolved
EIPS/eip-6093.md Outdated Show resolved Hide resolved
EIPS/eip-6093.md Outdated Show resolved Hide resolved
EIPS/eip-6093.md Outdated Show resolved Hide resolved
EIPS/eip-6093.md Outdated Show resolved Hide resolved
EIPS/eip-6093.md Outdated Show resolved Hide resolved
ernestognw and others added 10 commits December 7, 2022 07:42
Co-authored-by: Pandapip1 <45835846+Pandapip1@users.noreply.github.com>
Co-authored-by: Pandapip1 <45835846+Pandapip1@users.noreply.github.com>
Co-authored-by: Pandapip1 <45835846+Pandapip1@users.noreply.github.com>
Co-authored-by: Pandapip1 <45835846+Pandapip1@users.noreply.github.com>
Co-authored-by: Pandapip1 <45835846+Pandapip1@users.noreply.github.com>
Co-authored-by: Pandapip1 <45835846+Pandapip1@users.noreply.github.com>
Co-authored-by: Pandapip1 <45835846+Pandapip1@users.noreply.github.com>
Co-authored-by: Pandapip1 <45835846+Pandapip1@users.noreply.github.com>
Co-authored-by: Pandapip1 <45835846+Pandapip1@users.noreply.github.com>
@ernestognw ernestognw changed the title Add EIP-6093: Custom errors for ERC tokens Add EIP-6093: Custom errors for commonly-used tokens Dec 12, 2022
Copy link
Contributor Author

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

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

Hey @Pandapip1, I just updated.
I think we're fine with the common-token thing so far.
Requested your review again 🙂

Copy link
Contributor

@SamWilsn SamWilsn left a comment

Choose a reason for hiding this comment

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

Otherwise this is looking good IMO

---
eip: 6093
title: Custom errors for commonly-used tokens
description: Lists custom errors for common token implementations
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can expand the description a bit. Maybe:

Suggested change
description: Lists custom errors for common token implementations
description: Structured custom errors for common tokens (EIP-20, EIP-721, and EIP-1155)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. I'm slightly more biased toward your proposal, but there's a competing comment I've already accepted.

I'll leave it open in case someone else wants to comment on this.

Copy link
Member

@Pandapip1 Pandapip1 left a comment

Choose a reason for hiding this comment

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

I think this is fine for a draft. I would like to see the title changed (it doesn't provide errors for all ERC token standards, just the three most commonly-used).

@eth-bot eth-bot enabled auto-merge (squash) December 13, 2022 18:27
@eth-bot eth-bot merged commit 71b3a7d into ethereum:master Dec 13, 2022
@frangio frangio deleted the eip/custom-errors-for-erc-tokens branch December 13, 2022 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-new Creates a brand new proposal s-draft This EIP is a Draft t-erc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants