diff --git a/src/ape/contracts/base.py b/src/ape/contracts/base.py index 9e45b4debe..20c15405d0 100644 --- a/src/ape/contracts/base.py +++ b/src/ape/contracts/base.py @@ -1300,13 +1300,9 @@ def __call__(self, *args, **kwargs) -> TransactionAPI: def deploy(self, *args, publish: bool = False, **kwargs) -> ContractInstance: txn = self(*args, **kwargs) private = kwargs.get("private", False) - has_value = kwargs.get("value") - if has_value: - has_non_payable_constructor = self.contract_type.constructor.is_payable - # print(has_non_payable_constructor) - if not has_non_payable_constructor: - raise ContractError("Sending funds to a non-payable constructor!!") + if kwargs.get("value") and not self.contract_type.constructor.is_payable + raise ContractError("Sending funds to a non-payable constructor.") if "sender" in kwargs and isinstance(kwargs["sender"], AccountAPI): # Handle account-related preparation if needed, such as signing