|
|
|
@ -20,13 +20,13 @@ created_contract_account = None |
|
|
|
|
def test_create(): |
|
|
|
|
world_state = WorldState() |
|
|
|
|
account = world_state.create_account(balance=10, address=101) |
|
|
|
|
account.code = Disassembly("60606040") |
|
|
|
|
account.code = Disassembly("60606060") |
|
|
|
|
environment = Environment(account, None, None, None, None, None) |
|
|
|
|
og_state = GlobalState( |
|
|
|
|
world_state, environment, None, MachineState(gas_limit=8000000) |
|
|
|
|
) |
|
|
|
|
code_raw = [] |
|
|
|
|
code = "606060406060" |
|
|
|
|
code = "606060606060" |
|
|
|
|
for i in range(len(code) // 2): |
|
|
|
|
code_raw.append(int(code[2 * i : 2 * (i + 1)], 16)) |
|
|
|
|
calldata = ConcreteCalldata("1", code_raw) |
|
|
|
@ -37,6 +37,8 @@ def test_create(): |
|
|
|
|
value = 3 |
|
|
|
|
og_state.mstate.stack = [6, 0, value] |
|
|
|
|
instruction = Instruction("create", dynamic_loader=None) |
|
|
|
|
og_state.mstate.memory.extend(100) |
|
|
|
|
og_state.mstate.memory[0:6] = [96] * 6 |
|
|
|
|
|
|
|
|
|
# Act + Assert |
|
|
|
|
with pytest.raises(TransactionStartSignal) as t: |
|
|
|
|