From f4f833294d2a22ee3433c704428baf3d16ea37b8 Mon Sep 17 00:00:00 2001 From: antazoey Date: Wed, 14 Aug 2024 21:17:32 -0500 Subject: [PATCH] fix: delete unneeded try / except blocks for erroring revert checks on emptiness (#114) --- ape_foundry/provider.py | 15 +++------------ setup.py | 2 +- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/ape_foundry/provider.py b/ape_foundry/provider.py index 67ef076..0c65c59 100644 --- a/ape_foundry/provider.py +++ b/ape_foundry/provider.py @@ -579,12 +579,7 @@ def _handle_execution_reverted( # Unlikely scenario where a transaction is on the error even though a receipt # exists. if isinstance(enriched.txn, TransactionAPI) and enriched.txn.receipt: - try: - enriched.txn.receipt.show_trace() - except Exception: - # TODO: Fix this in Ape - pass - + enriched.txn.receipt.show_trace() elif isinstance(enriched.txn, ReceiptAPI): enriched.txn.show_trace() @@ -643,12 +638,8 @@ def _extract_custom_error(self, **kwargs) -> str: except Exception: pass - try: - if trace is not None and (revert_msg := trace.revert_message): - return revert_msg - except Exception: - # TODO: Fix this in core - return "" + if trace is not None and (revert_msg := trace.revert_message): + return revert_msg return "" diff --git a/setup.py b/setup.py index c5db635..30efcad 100644 --- a/setup.py +++ b/setup.py @@ -74,7 +74,7 @@ url="https://github.com/ApeWorX/ape-foundry", include_package_data=True, install_requires=[ - "eth-ape>=0.8.11,<0.9", + "eth-ape>=0.8.12,<0.9", "ethpm-types", # Use same version as eth-ape "eth-pydantic-types", # Use same version as eth-ape "evm-trace", # Use same version as ape