Fix lookup of on-chain storage

pull/1088/head
Nathan 6 years ago
parent 9b960a2985
commit ef16ac834e
  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 # attempt to read the contract address from instance storage
try: try:
callee_address = dynamic_loader.read_storage( callee_address = dynamic_loader.read_storage(
str(hex(environment.active_account.address.value)), index hex(environment.active_account.address.value), index
) )
# TODO: verify whether this happens or not # TODO: verify whether this happens or not
except: except:

@ -38,7 +38,7 @@ class Storage:
self._storage[item] = symbol_factory.BitVecVal( self._storage[item] = symbol_factory.BitVecVal(
int( int(
self.dynld.read_storage( self.dynld.read_storage(
contract_address=self.address, index=int(item) contract_address=hex(self.address.value), index=int(item)
), ),
16, 16,
), ),

Loading…
Cancel
Save