-
Notifications
You must be signed in to change notification settings - Fork 51
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: must use CallExecution* type #150
Conversation
b4318aa
to
7e755e9
Compare
@itegulov @austinabell Let me know what you guys think of this now. |
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.
Going to open another issue because the types that are forwarded from the RPC types seem very unintuitive to use. So unclear how to proceed, for example, we are awaiting transactions to be fully completed, but we still have the intermediate execution statuses nested within the CallExecutionDetails
structure.
Opened issue: #183
bcda266
to
4ed34b7
Compare
New changes based on #183. Also took the liberty of renaming So after this, we have |
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.
handling execution errors there definitely seems like an improvement, just left some comments for small questions about details.
@austinabell think we should be good to go with this one. I'll merge this one right now, and if there's anymore concern, we can address in another PR |
This is not necessarily an API-breaking change but semantically would change how errors are being bubbled up. This adds the
#[must_use]
toCallExecution*
types so that the users are forced to handle it. The previous way of turning theCallExecution*
type into aResult
was not so great since we'd end up consuming theCallExecution*
info along the way if a user wanted to handle the error but also have the details of the execution.Added
ok()
andassert_ok()
methods to use theCallExection*
objects if the user does not care about the results contained within them. They'll still have access to the execution info regardless