diff --git a/manticore/platforms/evm.py b/manticore/platforms/evm.py index 65afb45..15b6b9a 100644 --- a/manticore/platforms/evm.py +++ b/manticore/platforms/evm.py @@ -10,6 +10,7 @@ from ..core.smtlib.visitors import pretty_print, arithmetic_simplifier, translat from ..core.state import Concretize,TerminateState import logging import sys, hashlib +from collections import namedtuple if sys.version_info < (3, 6): import sha3 @@ -21,6 +22,8 @@ TT256M1 = 2 ** 256 - 1 TT255 = 2 ** 255 TOOHIGHMEM = 0x1000 +PendingTransaction = namedtuple("PendingTransaction", ['type', 'address', 'origin', 'price', 'data', 'caller', 'value', 'bytecode', 'header']) + def ceil32(x): return Operators.ITEBV(256, (x % 32) == 0, x , x + 32 - (x % 32)) @@ -2233,7 +2236,7 @@ class EVMWorld(Platform): self.storage[address]['storage'] = EVMMemory(self.constraints, 256, 256) - self._pending_transaction = ('Create', address, origin, price, '', origin, balance, ''.join(init), header) + self._pending_transaction = PendingTransaction('Create', address, origin, price, '', origin, balance, ''.join(init), header) if run: assert False @@ -2282,7 +2285,7 @@ class EVMWorld(Platform): else: data = ''.join(data) bytecode = self.get_code(address) - self._pending_transaction = ('Call', address, origin, price, data, caller, value, bytecode, header) + self._pending_transaction = PendingTransaction('Call', address, origin, price, data, caller, value, bytecode, header) if run: assert self.depth == 0