-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
fallback when all contract selectors fail #5703
Conversation
25e15f5
to
3a3dd7c
Compare
Benchmark for be4e7b8Click to view benchmark
|
3a3dd7c
to
2b74ee3
Compare
Benchmark for 15338b8Click to view benchmark
|
Benchmark for cc54d69Click to view benchmark
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, but can we add some documentation?
DevEx will improve on this but we should still have some minimal advertisement of the feature existing in the first place.
Benchmark for 9ab8965Click to view benchmark
|
7ae2254
to
85daa73
Compare
Benchmark for 85f20a2Click to view benchmark
|
6db5438
to
4203af3
Compare
Benchmark for 1114189Click to view benchmark
|
4203af3
to
8916886
Compare
Benchmark for 0ea2994Click to view benchmark
|
Benchmark for 2d1c2caClick to view benchmark
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor suggestions, else looks good
Co-authored-by: João Matos <joao@tritao.eu>
Benchmark for 56de7f3Click to view benchmark
|
Description
This PR closes #5566.
Contracts now can have a special function decorated with
#[fallback]
which is called when the contract method selection fails.This function for all intents and purposes works as a standard contract method, so:
This function can return a value like a normal contract would, or it can use the
__contract_ret
intrinsics to return any value.Checklist
Breaking*
orNew Feature
labels where relevant.