Fix errors based on recent changes

storage/refactor
Nikhil Parasaram 6 years ago
parent 69f5f34989
commit 7143822ee5
  1. 4
      mythril/laser/ethereum/instructions.py
  2. 5
      tests/laser/evm_testsuite/evm_test.py

@ -1407,9 +1407,7 @@ class Instruction:
return self._sload_helper(global_state, index)
@staticmethod
def _sload_helper(
global_state: GlobalState, index: Union[str, int], constraints=None
):
def _sload_helper(global_state: GlobalState, index: Expression, constraints=None):
"""
:param global_state:

@ -114,6 +114,8 @@ def test_vmtest(
post_condition: dict,
) -> None:
if test_name != "JDfromStorageDynamicJump0_jumpdest0":
return
# Arrange
if test_name in ignored_test_names:
return
@ -125,7 +127,8 @@ def test_vmtest(
account.code = Disassembly(details["code"][2:])
account.nonce = int(details["nonce"], 16)
for key, value in details["storage"].items():
account.storage[int(key, 16)] = int(value, 16)
key_bitvec = symbol_factory.BitVecVal(int(key, 16), 256)
account.storage[key_bitvec] = int(value, 16)
world_state.put_account(account)
account.set_balance(int(details["balance"], 16))

Loading…
Cancel
Save