-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
feat: raise_on_revert=False
kwarg for allowing failures on calls and transactions
#2181
Conversation
|
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.
Overall, I think I do like raise_on_revert
better for the kwarg name, as it shows the python action (e.g. raise
ing an error) is tied to the EVM result (e.g. the transaction revert
s)
|
raise_on_revert=False
kwargs for allowing failures on calls and transactions
raise_on_revert=False
kwargs for allowing failures on calls and transactionsraise_on_revert=False
kwarg for allowing failures on calls and transactions
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 looks great!
One thing I am considering is what happens when partial failure(s) exist in a receipt? (Reverts but handled by upstream logic e.g. SafeTx execution)
This is probably a tracing feature (out or scope for this PR), something like ReceiptAPI.ignored_reverts -> list[ContractLogicError]
, but might be good to think of how they might work together before merging this
We could put all reverts in a list and have |
tbd im not sure what the experience is like with partially failed txs. Is there a way using local developer networks to simulate this? |
You'd need a contract that does a call to another contract, and then handle the result. In vyper you can do this with |
I think in this scenario if it doesn't revert then Ultimately seems best to keep these two features separate actually, since they are orthogonal (and likely dependent on the availability of tracing to get) |
bf1c15c
to
3701c99
Compare
31b8a2c
to
c00fdea
Compare
What I did
fixes: #2180
Fixes: Ape-1788
How I did it
How to verify it
Checklist