-
Notifications
You must be signed in to change notification settings - Fork 1.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
Add message output estimation #846
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.
LGTM -- just left a few clarification questions!
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.
Reviewed alongside @hal3e. We've put our bigger impacting suggestions in a separate branch, you can compare the differences here.
Reasons for the suggestions:
- If a revert happened not because of a missing variable or message output then the code assumes that it must have been a missing contract input. This isn't true.
- The message inside
expect_err
in the abovementioned case will never be propagated. The result in question will always be anErr
at that place in the code soexpect_err
will never panic. If the original intent was for the message to be propagated then our changes offer one way of achieving that. - The current code assumes there can only be one revert reason (since only one match branch can be selected). Although this is probably true atm, it costs nothing to write it in a manner that can support multiple reverts.
We haven't discussed the MultiCallHandler's estimations. Perhaps they might benefit from the same suggestions.
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.
LGTM
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.
👍
Closes #845
Extends
estimate_tx_dependancies
to also add output messages if they're missing.