-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
ERC20.sol doesn't allow transfer to zero address, not standard compliant #1493
Comments
As @zmitton suggested, keeping the However there is a need to burn tokens, that could be achieved by calling a Now there's a discussion where the destination of the |
|
@c-o-l-o-r Thank you for expressing this concern. Sorry for not replying to it earlier. OpenZeppelin contracts are opinionated precisely because we don't want the burden of making these decisions to be on the developers. If one of our decisions turns out to be a bad one, we don't want it to be in the library at all, not even as an opt-in thing. Disallowing a send to the address I understand that it sucks to not have a standard way to burn tokens in ERC20, but this is a feature that is missing in the spec and not a problem in the implementations. |
The ERC-20 Token Standard describes the following for
transfer
:The OpenZeppelin ERC20.sol contract adds an additional requirement to this standard by blocking transfers to
0x0000000000000000000000000000000000000000
. This opinionated decision should be removed from the base ERC20 implementation. The ERC20Burnable.sol contract is not a solution to this, because it is not compliant with the base standard and will not be interoperable with other contracts that accept any arbitrary ERC20.As of right now, this token is not compatible with contracts that burn their tokens by transferring them to the zero address.
The text was updated successfully, but these errors were encountered: