Small bugfix

pull/485/head
Joran Honig 6 years ago
parent d37ba5effc
commit 09f287ea88
  1. 2
      mythril/laser/ethereum/instructions.py
  2. 5
      mythril/laser/ethereum/transaction/concolic.py

@ -762,7 +762,7 @@ class Instruction:
global_state.accounts[
global_state.environment.active_account.address] = global_state.environment.active_account
global_state.environment.active_account.storage[index] = simplify(value)
global_state.environment.active_account.storage[index] = value
except KeyError:
logging.debug("Error writing to storage: Invalid index")
return [global_state]

@ -4,14 +4,19 @@ from mythril.laser.ethereum.state import GlobalState, Environment, CalldataType,
from mythril.disassembler.disassembly import Disassembly
from mythril.laser.ethereum.cfg import Node, Edge, JumpType
next_transaction_id = 0
def execute_message_call(laser_evm, callee_address, caller_address, origin_address, code, data, gas, gas_price, value):
""" Executes a message call transaction from all open states """
open_states = laser_evm.open_states[:]
del laser_evm.open_states[:]
global next_transaction_id
for open_world_state in open_states:
next_transaction_id += 1
transaction = MessageCallTransaction(
next_transaction_id,
world_state=open_world_state,
callee_account=open_world_state[callee_address],
caller=caller_address,

Loading…
Cancel
Save