diff --git a/brownie/network/middlewares/hardhat.py b/brownie/network/middlewares/hardhat.py index fd1368310..0e3e0d884 100644 --- a/brownie/network/middlewares/hardhat.py +++ b/brownie/network/middlewares/hardhat.py @@ -17,9 +17,10 @@ def process_request(self, make_request: Callable, method: str, params: List) -> result = make_request(method, params) # modify Hardhat transaction error to mimick the format that Ganache uses - if method == "eth_sendTransaction" and "error" in result: + if method in ("eth_call", "eth_sendTransaction") and "error" in result: message = result["error"]["message"] if message.startswith("VM Exception") or message.startswith("Transaction reverted"): + # FIXME: this doesn't play well with parallel tests txid = self.w3.eth.getBlock("latest")["transactions"][0] data: Dict = {} result["error"]["data"] = {txid.hex(): data}