Rename to message call and fix comparison

pull/355/head
Joran Honig 6 years ago
parent fdfbc0cc6c
commit 5955abc1e1
  1. 5
      mythril/laser/ethereum/svm.py
  2. 5
      mythril/laser/ethereum/transaction.py

@ -1,7 +1,7 @@
from z3 import BitVec
import logging
from mythril.laser.ethereum.state import GlobalState, Environment, CalldataType, Account, WorldState
from mythril.laser.ethereum.transaction import CallTransaction
from mythril.laser.ethereum.transaction import MessageCall
from mythril.laser.ethereum.instructions import Instruction
from mythril.laser.ethereum.cfg import NodeFlags, Node, Edge, JumpType
from mythril.laser.ethereum.strategy.basic import DepthFirstSearchStrategy
@ -48,7 +48,8 @@ class LaserEVM:
def sym_exec(self, main_address):
logging.debug("Starting LASER execution")
transaction = CallTransaction(main_address)
transaction = MessageCall(main_address)
transaction.run(self.open_states, self)
logging.info("%d nodes, %d edges, %d total states", len(self.nodes), len(self.edges), self.total_states)

@ -4,7 +4,8 @@ from mythril.laser.ethereum.cfg import Node, Edge, JumpType
from z3 import BitVec
class CallTransaction:
class MessageCall:
""" Represents a call value transaction """
def __init__(self, callee_address):
"""
@ -21,7 +22,7 @@ class CallTransaction:
@property
def has_ran(self):
return self.open_states is None
return self.open_states is not None
def run(self, open_world_states: list, evm):
""" Runs this transaction on the evm starting from the open world states """

Loading…
Cancel
Save