Skip to content

Commit

Permalink
fix: delete unneeded try / except blocks for erroring revert checks o…
Browse files Browse the repository at this point in the history
…n emptiness (#114)
  • Loading branch information
antazoey authored Aug 15, 2024
1 parent e7c7aae commit f4f8332
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
15 changes: 3 additions & 12 deletions ape_foundry/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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 ""

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f4f8332

Please sign in to comment.