-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
A contract should revert when no fn selector matches #444
Comments
@AlicanC this should be easy to implement and important for consistency. |
We seem to have a disagreement here with this comment: @adlerjohn -- what do you think? |
I personally prefer returning a
|
I agree that using We could do something like that, but unless we have a separate opcode or domain separator metadata, it will be impossible for the caller to know if the contract wanted to return that integer value as a genuine result of computation or as an error code. There's a lot of ambiguity here, I think the cleanest and safest option would be |
Cleanest is definitely |
ATM, when you specify an invalid function selector when calling a contract, the contract just ends up doing a
RET $r0
. A revert sounds better.The text was updated successfully, but these errors were encountered: