From 5955abc1e12c1cf39b9fcfd305f9b10c62769ca0 Mon Sep 17 00:00:00 2001 From: Joran Honig Date: Sun, 22 Jul 2018 14:37:06 +0200 Subject: [PATCH] Rename to message call and fix comparison --- mythril/laser/ethereum/svm.py | 5 +++-- mythril/laser/ethereum/transaction.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mythril/laser/ethereum/svm.py b/mythril/laser/ethereum/svm.py index a9e65759..62f790f1 100644 --- a/mythril/laser/ethereum/svm.py +++ b/mythril/laser/ethereum/svm.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) diff --git a/mythril/laser/ethereum/transaction.py b/mythril/laser/ethereum/transaction.py index ffaa6b76..66028ec1 100644 --- a/mythril/laser/ethereum/transaction.py +++ b/mythril/laser/ethereum/transaction.py @@ -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 """