Greater trace length and some black

better_bounds
Bernhard Mueller 5 years ago
parent 543300d424
commit 1f783792b2
  1. 4
      mythril/laser/ethereum/strategy/extensions/bounded_loops.py
  2. 2
      tests/instructions/create2_test.py

@ -77,8 +77,8 @@ class BoundedLoopsStrategy(BasicSearchStrategy):
key = cur_instr["address"] key = cur_instr["address"]
for i in range(2, min(32, len(annotation.trace))): for i in range(1, min(128, len(annotation.trace))):
key |= annotation.trace[-i] << (16 * i) key |= annotation.trace[-i] << (i * 8)
if key in annotation._reached_count: if key in annotation._reached_count:
annotation._reached_count[key] += 1 annotation._reached_count[key] += 1

@ -24,7 +24,7 @@ def generate_salted_address(code_str, salt, caller):
salt = "0" * (64 - len(salt)) + salt salt = "0" * (64 - len(salt)) + salt
contract_address = int( contract_address = int(
get_code_hash("0xff" + addr + salt + get_code_hash(code_str)[2:])[26:], 16, get_code_hash("0xff" + addr + salt + get_code_hash(code_str)[2:])[26:], 16
) )
return contract_address return contract_address

Loading…
Cancel
Save