From 103d9588c871d49c6a755c29e38ba6a3a7ace007 Mon Sep 17 00:00:00 2001 From: Nikhil Date: Wed, 25 Sep 2019 18:43:22 +0100 Subject: [PATCH] Fix create tests --- tests/instructions/create_test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/instructions/create_test.py b/tests/instructions/create_test.py index 0a97565e..04f0decd 100644 --- a/tests/instructions/create_test.py +++ b/tests/instructions/create_test.py @@ -1,6 +1,6 @@ from mythril.disassembler.disassembly import Disassembly +from mythril.laser.ethereum.cfg import Node from mythril.laser.ethereum.state.environment import Environment -from mythril.laser.ethereum.state.account import Account from mythril.laser.ethereum.state.machine_state import MachineState from mythril.laser.ethereum.state.global_state import GlobalState from mythril.laser.ethereum.state.world_state import WorldState @@ -30,11 +30,12 @@ def execute_create(): calldata = ConcreteCalldata(0, code_raw) world_state = WorldState() + world_state.node = Node("Contract") account = world_state.create_account(balance=1000000, address=101) account.code = Disassembly("60a760006000f000") environment = Environment(account, None, calldata, None, None, None) og_state = GlobalState( - world_state, environment, None, MachineState(gas_limit=8000000) + world_state, environment, world_state.node, MachineState(gas_limit=8000000) ) og_state.transaction_stack.append( (MessageCallTransaction(world_state=WorldState(), gas_limit=8000000), None)