From 8d3a23ff34b1a549c332858b807a86ffe22fd7d5 Mon Sep 17 00:00:00 2001 From: antazoey Date: Thu, 18 Apr 2024 12:22:54 -0600 Subject: [PATCH] refactor!: TraceAPI (#1864) --- src/ape_ethereum/provider.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ape_ethereum/provider.py b/src/ape_ethereum/provider.py index 48241ee9f4..433ce7847b 100644 --- a/src/ape_ethereum/provider.py +++ b/src/ape_ethereum/provider.py @@ -480,8 +480,10 @@ def _eth_call(self, arguments: list) -> HexBytes: return HexBytes(result) - def _prepare_call(self, txn: TransactionAPI, **kwargs) -> list: - txn_dict = txn.model_dump(by_alias=True, mode="json") + def _prepare_call(self, txn: Union[TransactionAPI, dict], **kwargs) -> list: + txn_dict = ( + txn.model_dump(by_alias=True, mode="json") if isinstance(txn, TransactionAPI) else txn + ) fields_to_convert = ("data", "chainId", "value") for field in fields_to_convert: value = txn_dict.get(field)