-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
fix: issue where parity style traces did not work in ape-geth provider #907
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
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.
Suggestion about error class used but LGTM
src/ape_geth/providers.py
Outdated
traces = ParityTraceList.parse_obj(raw_trace_list) | ||
response = self._make_request("trace_transaction", [txn_hash]) | ||
if "error" in response: | ||
raise ValueError(response["error"]["message"]) |
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.
Instead of ValueError, you could raise ProviderError
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.
@unparalleled-js's fix and can merge
|
||
raw_trace_list = response.get("result", []) | ||
|
||
if not raw_trace_list: |
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.
have to do this because I see weird things where some transactions have 0 trace and get_calltree_from_parity_trace
expects at least one item in the result.
What I did
How I did it
How to verify it
chain.provider.get_call_tree
should work againChecklist