ape
ape copied to clipboard
feat: add `supports_tracing()` calculated property to `ProviderAPI` and `Web3ProviderAPI`
What I did
It is nice to have a more convenient way to check if provider supports tracing. This helps me in my gas reporting efforts but I think will come in handy elsewhere, so opening it up separately.
How I did it
Check for APINotImplementedError
when calling get_call_tree()
. If it fails with that, no tracing. Any other result indicates a tracing implementation.
How to verify it
Launch console using various providers calling provider.supports_tracing
and making sure it is expected.
Checklist
- [ ] All changes are completed
- [ ] New test cases have been added
- [ ] Documentation has been updated