Merge pull request #1137 from ConsenSys/addess_fix

Fix loader crash caused by missing zero padding of address strings
pull/1139/head
Bernhard Mueller 5 years ago committed by GitHub
commit 5e9d61f1e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      mythril/laser/ethereum/call.py
  2. 2
      mythril/laser/ethereum/state/account.py

@ -96,7 +96,7 @@ def get_callee_address(
# attempt to read the contract address from instance storage
try:
callee_address = dynamic_loader.read_storage(
hex(environment.active_account.address.value), index
"0x{:040X}".format(environment.active_account.address.value), index
)
# TODO: verify whether this happens or not
except:

@ -64,7 +64,7 @@ class Storage:
storage[item] = symbol_factory.BitVecVal(
int(
self.dynld.read_storage(
contract_address=hex(self.address.value),
contract_address="0x{:040X}".format(self.address.value),
index=int(item.value),
),
16,

Loading…
Cancel
Save