diff --git a/mythril/laser/ethereum/instructions.py b/mythril/laser/ethereum/instructions.py index 64798ec0..1ebed2c3 100644 --- a/mythril/laser/ethereum/instructions.py +++ b/mythril/laser/ethereum/instructions.py @@ -13,7 +13,7 @@ from mythril.laser.ethereum import util from mythril.laser.ethereum.call import get_call_parameters from mythril.laser.ethereum.state import GlobalState, MachineState, Environment, CalldataType import mythril.laser.ethereum.natives as natives -from mythril.laser.ethereum.transaction import CallTransaction, TransactionEndSignal, TransactionStartSignal +from mythril.laser.ethereum.transaction import MessageCallTransaction, TransactionEndSignal, TransactionStartSignal TT256 = 2 ** 256 TT256M1 = 2 ** 256 - 1 @@ -907,14 +907,14 @@ class Instruction: # TODO: maybe use BitVec here constrained to 1 return [global_state] - transaction = CallTransaction(global_state.world_state, - callee_account, - BitVecVal(int(environment.active_account.address, 16), 256), - call_data, - environment.gasprice, - value, - environment.origin, - call_data_type) + transaction = MessageCallTransaction(global_state.world_state, + callee_account, + BitVecVal(int(environment.active_account.address, 16), 256), + call_data, + environment.gasprice, + value, + environment.origin, + call_data_type) raise TransactionStartSignal(transaction, self.op_code) @instruction diff --git a/mythril/laser/ethereum/svm.py b/mythril/laser/ethereum/svm.py index 8bf90cac..8ad8213a 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, TransactionStartSignal, TransactionEndSignal +from mythril.laser.ethereum.transaction import MessageCallTransaction, TransactionStartSignal, TransactionEndSignal 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 @@ -233,7 +233,7 @@ class LaserEVM: for open_world_state in open_states: - transaction = CallTransaction( + transaction = MessageCallTransaction( open_world_state, open_world_state[callee_address], caller, diff --git a/mythril/laser/ethereum/transaction.py b/mythril/laser/ethereum/transaction.py index 87f98a0b..626544cb 100644 --- a/mythril/laser/ethereum/transaction.py +++ b/mythril/laser/ethereum/transaction.py @@ -18,7 +18,7 @@ class TransactionStartSignal(Exception): self.op_code = op_code -class CallTransaction: +class MessageCallTransaction: """ Transaction object models an transaction""" def __init__(self, world_state, @@ -66,17 +66,3 @@ class CallTransaction: raise TransactionEndSignal(global_state) -class Transaction: - def __init__(self): - self.open_states = None - - @property - def has_ran(self): - return self.open_states is not None - - def run(self, open_world_states, evm): - raise NotImplementedError() - - - -