From 5bbe0b619299c4a62cedcb87b0321411c1cce3d2 Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Mon, 23 Dec 2024 18:17:03 -0600 Subject: [PATCH] fix: status --- src/ape_ethereum/provider.py | 2 +- src/ape_test/provider.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ape_ethereum/provider.py b/src/ape_ethereum/provider.py index 8e6ad30ace..932607f50d 100644 --- a/src/ape_ethereum/provider.py +++ b/src/ape_ethereum/provider.py @@ -1057,7 +1057,7 @@ def send_transaction(self, txn: TransactionAPI) -> ReceiptAPI: block_number=-1, # Not in a block. error=vm_err, required_confirmations=required_confirmations, - status=TransactionStatusEnum.NO_ERROR, + status=TransactionStatusEnum.FAILING if vm_err else TransactionStatusEnum.NO_ERROR, txn_hash=txn_hash, **txn_data, ) diff --git a/src/ape_test/provider.py b/src/ape_test/provider.py index 28f84801ae..cb91eacaa7 100644 --- a/src/ape_test/provider.py +++ b/src/ape_test/provider.py @@ -355,7 +355,9 @@ def send_transaction(self, txn: "TransactionAPI") -> "ReceiptAPI": "error": vm_err, "provider": self, "required_confirmations": required_confirmations, - "status": TransactionStatusEnum.NO_ERROR, + "status": ( + TransactionStatusEnum.FAILING if vm_err else TransactionStatusEnum.NO_ERROR + ), "txn_hash": txn_hash, } receipt = self.network.ecosystem.decode_receipt(receipt_data)