Skip to content

Commit 7f98315

Browse files
author
Stuart Reed
committed
Fix encoding tests by re-raising TypeError when constructor mismatch occurs
1 parent fd30a6f commit 7f98315

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web3/contract/base_contract.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,9 @@ def __init__(
10971097
def _encode_data_in_transaction(self, *args: Any, **kwargs: Any) -> HexStr:
10981098
try:
10991099
constructor_abi = get_abi_element(self.abi, "constructor", *args, **kwargs)
1100-
except MismatchedABI:
1100+
except MismatchedABI as e:
1101+
raise TypeError(e)
1102+
except ABIConstructorNotFound:
11011103
constructor_abi = None
11021104

11031105
if constructor_abi:

0 commit comments

Comments
 (0)