From 2e383f0bb1b343b45862f17198663f2fb59b79ec Mon Sep 17 00:00:00 2001 From: YoshihitoAso Date: Wed, 27 Mar 2024 12:43:01 +0900 Subject: [PATCH] Fix error_code decoding --- brownie/exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brownie/exceptions.py b/brownie/exceptions.py index b8f8e1d5d..9d3ea8d40 100644 --- a/brownie/exceptions.py +++ b/brownie/exceptions.py @@ -283,7 +283,7 @@ def decode_typed_error(data: str) -> str: selector = data[:10] if selector == "0x4e487b71": # special case, solidity compiler panics - error_code = int(data[4:].hex(), 16) + error_code = int(HexBytes(data[10:]).hex(), 16) return SOLIDITY_ERROR_CODES.get(error_code, f"Unknown compiler Panic: {error_code}") if selector in _errors: types_list = get_type_strings(_errors[selector]["inputs"])