Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: log print and console.log calls made during transactions (#1930)
* feat: log print and console.log calls made during transactions * refactor: improve contract check before calling log_print() * fix: import TypeGuard from typing_extensions for 3.8 support * fix: is_contract only available on Address model * fix: python 3.8 typing is bleh, fix import of Iterable * fix: unintended edit * fix: fail gracefully when provider does not implement get_call_tree * feat: adds post transaction hook to Web3Provider * refactor: adds ReceiptAPI.debug_logs prop and ReceiptAPI.print_debug_logs() * fix: bad string formatting * refactor: clarity, simplicity, and support recursive call tree walking * fix: manhandle the type checker * feat: pre-cache console contract for call trace beautification * fix: cast CONSOLE_CONTRACT_ID as ChecksumAddress * style: cleanup debugging noise * docs: update ape_ethereum._print's docstring header for clarity * refactor: print_debug_logs -> show_debug_logs * refactor: use DEBUG-LOG as logging prefix * refactor: split debug_logs into debug_logs_lines and debug_logs_typed * fix: unusual generator behavior * test: add tests for debug logs * style: lint * chore(debug): instrumentation to debug CI tests * feat: log print and console.log calls made during transactions * refactor: improve contract check before calling log_print() * fix: import TypeGuard from typing_extensions for 3.8 support * fix: is_contract only available on Address model * fix: python 3.8 typing is bleh, fix import of Iterable * fix: unintended edit * fix: fail gracefully when provider does not implement get_call_tree * feat: adds post transaction hook to Web3Provider * refactor: adds ReceiptAPI.debug_logs prop and ReceiptAPI.print_debug_logs() * fix: bad string formatting * refactor: clarity, simplicity, and support recursive call tree walking * fix: manhandle the type checker * feat: pre-cache console contract for call trace beautification * fix: cast CONSOLE_CONTRACT_ID as ChecksumAddress * style: cleanup debugging noise * docs: update ape_ethereum._print's docstring header for clarity * refactor: print_debug_logs -> show_debug_logs * refactor: use DEBUG-LOG as logging prefix * refactor: split debug_logs into debug_logs_lines and debug_logs_typed * fix: unusual generator behavior * test: add tests for debug logs * style: lint * chore(debug): instrumentation to debug CI tests * Revert "chore(debug): instrumentation to debug CI tests" This reverts commit 6edd31b. * fix: do not use assertion errors for logic branching * style: fstring > + Co-authored-by: antazoey <yingthi@live.com> * docs(style): . Co-authored-by: antazoey <yingthi@live.com> * style: cleanup of debug statements --------- Co-authored-by: antazoey <yingthi@live.com>
- Loading branch information