Skip to content

Commit

Permalink
bug: raise exception instead of silently ignoring unnecessary args
Browse files Browse the repository at this point in the history
  • Loading branch information
redshiftzero committed Apr 5, 2019
1 parent 7bccd96 commit 80022c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web3/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,10 @@ def _encode_constructor_data(cls, args=None, kwargs=None):
encode_abi(cls.web3, constructor_abi, arguments, data=cls.bytecode)
)
else:
if args is not None or kwargs is not None:
msg = "Constructor args were provided, but no constructor function was provided."
raise TypeError(msg)

deploy_data = to_hex(cls.bytecode)

return deploy_data
Expand Down

0 comments on commit 80022c8

Please sign in to comment.