Fix creation case and use better error message (#1569)

* Handle creation code

* Fix eth-keys
pull/1571/head
Nikhil Parasaram 3 years ago committed by GitHub
parent 70348b2066
commit b84f55b757
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      mythril/disassembler/asm.py
  2. 3
      mythril/laser/ethereum/svm.py
  3. 2
      requirements.txt

@ -106,8 +106,10 @@ def disassemble(bytecode) -> list:
length = len(bytecode)
part_code = bytecode[-43:]
else:
part_code = bytes(bytecode[-43:])
try:
part_code = bytes(bytecode[-43:])
except TypeError:
part_code = ""
try:
if "bzzr" in str(part_code):
# ignore swarm hash

@ -169,7 +169,8 @@ class LaserEVM:
if len(self.open_states) == 0:
log.warning(
"No contract was created during the execution of contract creation "
"Increase the resources for creation execution (--max-depth or --create-timeout)"
"Increase the resources for creation execution (--max-depth or --create-timeout) "
"Check whether the bytecode is indeed the creation code, otherwise use the --bin-runtime flag"
)
self._execute_transactions(created_account.address)

@ -9,7 +9,7 @@ eth-account
ethereum-input-decoder>=0.2.2
eth-hash>=0.3.1
eth-keyfile>=0.5.1
eth-keys>=0.2.0b3
eth-keys<0.4.0,>=0.2.1
eth-rlp>=0.1.0
eth-tester
eth-typing<3.0.0,>=2.1.0

Loading…
Cancel
Save