Merge pull request #1094 from ConsenSys/develop

Merge for 0.21.3
pull/1113/head
Bernhard Mueller 6 years ago committed by GitHub
commit d88defd7b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      mythril/__version__.py
  2. 2
      mythril/laser/ethereum/call.py
  3. 3
      mythril/laser/ethereum/state/account.py
  4. 6
      mythril/laser/ethereum/svm.py
  5. 2
      mythril/laser/ethereum/transaction/concolic.py

@ -4,4 +4,4 @@ This file is suitable for sourcing inside POSIX shell, e.g. bash as well
as for importing into Python.
"""
__version__ = "v0.21.2"
__version__ = "v0.21.3"

@ -96,7 +96,7 @@ def get_callee_address(
# attempt to read the contract address from instance storage
try:
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
except:

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

@ -448,7 +448,11 @@ class LaserEVM:
environment = state.environment
disassembly = environment.code
if address in disassembly.address_to_function_name:
if isinstance(
state.world_state.transaction_sequence[-1], ContractCreationTransaction
):
environment.active_function_name = "constructor"
elif address in disassembly.address_to_function_name:
# Enter a new function
environment.active_function_name = disassembly.address_to_function_name[
address

@ -88,7 +88,7 @@ def _setup_global_state_for_execution(laser_evm, transaction) -> None:
condition=None,
)
)
global_state.world_state.transaction_sequence.append(transaction)
global_state.node = new_node
new_node.states.append(global_state)
laser_evm.work_list.append(global_state)

Loading…
Cancel
Save