Merge pull request #1022 from ConsenSys/bugfix/stop

Handle return_data=None case
pull/1028/head
JoranHonig 6 years ago committed by GitHub
commit 7a6463aaee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      mythril/laser/ethereum/transaction/transaction_models.py

@ -180,11 +180,12 @@ class ContractCreationTransaction(BaseTransaction):
:param revert:
"""
if (
not all([isinstance(element, int) for element in return_data])
return_data is None
or not all([isinstance(element, int) for element in return_data])
or len(return_data) == 0
):
self.return_data = None
raise TransactionEndSignal(global_state)
raise TransactionEndSignal(global_state, revert=revert)
contract_code = bytes.hex(array.array("B", return_data).tostring())

Loading…
Cancel
Save