-
-
Notifications
You must be signed in to change notification settings - Fork 812
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
Remove default parameters in built-in interfaces #3296
Comments
One of the problems is that Vyper needs overloading in order to work with overloaded functions defined in ERC specs, like 721 I would argue a shift to using definitions defined in ABI JSON files (or importing via a single package manifest containing all of them) would be beneficial to better support this since it natively supports overloading in a better way |
I'm all in for anything that supports natively overloading. |
Sorry, I don't get that point - could you explain why in the |
In vyper, you can't have multiple functions with the same name |
Yeah that one I know - but I just realised how you meant it in the context of ERC721. But actually, something that I observed is that the from vyper.interfaces import ERC721
implements: ERC721
@external
@payable
def safeTransferFrom(owner: address, to: address, token_id: uint256, data: Bytes[1024]):
... |
I believe the |
Currently, some built-in interfaces (see e.g.
ERC4626
) use default parameters (can be used to autogenerate overloaded function selectors) but is not required by the interface definitions itself, and other interfaces (see e.g.ERC721
) don't define default parameters, for which it could make sense however (see e.g.safeTransferFrom
). I would like to propose removing any default parameters from the built-in interfaces due to the following reasons:Let me know what you think. In any case, we need to have consistent behavior.
The text was updated successfully, but these errors were encountered: