Skip to content

test_late_account_create()

Documentation for tests/osaka/eip7692_eof_v1/eip7069_extcall/test_gas.py::test_late_account_create@14a7429a.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip7069_extcall/test_gas.py::test_late_account_create --fork Osaka

Test EXTCALL to a non-existent account after another EXT*CALL has called it and not created it.

Source code in tests/osaka/eip7692_eof_v1/eip7069_extcall/test_gas.py
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
@pytest.mark.parametrize("opcode", [Op.EXTCALL, Op.EXTDELEGATECALL, Op.EXTSTATICCALL])
def test_late_account_create(
    state_test: StateTestFiller,
    pre: Alloc,
    state_env: Environment,
    opcode: Op,
):
    """
    Test EXTCALL to a non-existent account after another EXT*CALL has called it and not
    created it.
    """
    empty_address = Address(0xDECAFC0DE)

    gas_test(
        state_test,
        state_env,
        pre,
        prelude_code=Op.BALANCE(address=empty_address),
        setup_code=opcode(address=empty_address)
        + Op.PUSH1(1)
        + Op.PUSH0
        + Op.PUSH0
        + Op.PUSH20(empty_address),
        subject_code=Op.EXTCALL,
        subject_balance=5,
        tear_down_code=Op.STOP,
        cold_gas=WARM_ACCOUNT_ACCESS_GAS + CALL_WITH_VALUE_GAS + ACCOUNT_CREATION_GAS,
        warm_gas=WARM_ACCOUNT_ACCESS_GAS + CALL_WITH_VALUE_GAS,
        out_of_gas_testing=False,
    )

Parametrized Test Cases

The interactive table below is also available as a standalone page.

Test ID (Abbreviated) opcode
...fork_Osaka-state_test-opcode_EXTCALL EXTCALL
...fork_Osaka-state_test-opcode_EXTDELEGATECALL EXTDELEGATECALL
...fork_Osaka-state_test-opcode_EXTSTATICCALL EXTSTATICCALL
...fork_Osaka-blockchain_test_from_state_test-opcode_EXTCALL EXTCALL
...fork_Osaka-blockchain_test_from_state_test-opcode_EXTDELEGATECALL EXTDELEGATECALL
...fork_Osaka-blockchain_test_from_state_test-opcode_EXTSTATICCALL EXTSTATICCALL