-
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
requireReceptionAck parameter is required when _mint for ERC20 compatible #2271
Comments
Hello @bruce-eljovist, thank your for raising this! This is an interesting point, I did not find explicit guidelines on the specification as to how this situation should be handled. I'd be wary of introducing this additional complexity to Is this a pattern you can follow in your application? Can you share more information about your use case, and how the recipient checks are causing you trouble? Thanks! |
Thank you.
The new version can mint when recipient is no IERC777Recipient implemented contract.
Do you have better ERC20 compatible mint implementation idea? |
Do you need the It'd be great if you could share more details of what you're trying to achieve. Perhaps it makes sense for your contract to initially mint supply for itself, and then transfer it to recipients when you're now calling |
Our native token has an underlying token. |
I see, that makes sense. Is there a particular reason why you chose to implement this using ERC777? Part of the idea behind it is preventing recipient contracts that are not aware of the protocol from holding tokens that would be forever locked in that account. If you're bypassing that mechanism, it might make sense to just use ERC20 directly. Alternatively, you could go ahead with the ERC777 checks and make sure the recipients implement the ERC777Recipient interface. Is there a reason why that is not feasible? |
Of course, ERC777 has a recipient checking function, but it is applicable only to the contract. For the EOA, locking is not prevented. I think it is not a core function but a mistake reducing set up. |
We want to resolve this before the stable 4.0 release in about a week. @SCBuergel suggested as an alternative solution to disable |
I’m developing ERC20 and ERC777 compatible token.
I’m experiencing a hard time implementing mint for ERC20.
In order to be fully compatible with ERC20 in ERC777, an account that does not implement IERC777Recipient must be able to mint.
But, in the _mint methods, _callTokensReceived’s last parameter is hardcoded to true.
I can’t make ERC20 compatible mint method.
What about changing
_callTokensReceived(operator, address(0), account, amount, userData, operatorData, true);
to
_callTokensReceived(operator, address(0), account, amount, userData, operatorData, requireReceptionAck);
and take requireReceptionAck as a parameter.
The text was updated successfully, but these errors were encountered: