Skip to content

test_eof_functions_contract_call_succeed()

Documentation for tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_execution_function.py::test_eof_functions_contract_call_succeed@83970623.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_execution_function.py::test_eof_functions_contract_call_succeed --fork Osaka

Test simple contracts that are simply expected to succeed on call.

Source code in tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_execution_function.py
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
@pytest.mark.parametrize("container", CALL_SUCCEED_CONTRACTS, ids=lambda x: x.name)
def test_eof_functions_contract_call_succeed(
    state_test: StateTestFiller,
    pre: Alloc,
    container: Container,
):
    """Test simple contracts that are simply expected to succeed on call."""
    env = Environment()

    sender = pre.fund_eoa()
    container_address = pre.deploy_contract(container)
    caller_contract = Op.SSTORE(0, Op.CALL(Op.GAS, container_address, 0, 0, 0, 0, 0)) + Op.STOP()
    caller_address = pre.deploy_contract(caller_contract)

    tx = Transaction(
        to=caller_address,
        gas_limit=50000000,
        gas_price=10,
        protected=False,
        data="",
        sender=sender,
    )

    post = {caller_address: Account(storage={0: 1})}

    state_test(
        env=env,
        pre=pre,
        post=post,
        tx=tx,
    )

Parametrized Test Cases

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

Test ID (Abbreviated) container
...fork_Osaka-blockchain_test-function_finishes_contract_execution function_finishes_contract_execution
...fork_Osaka-blockchain_test-max_recursive_callf max_recursive_callf
...fork_Osaka-blockchain_test-max_recursive_callf_sstore max_recursive_callf_sstore
...fork_Osaka-blockchain_test-max_recursive_callf_memory max_recursive_callf_memory
...fork_Osaka-state_test-function_finishes_contract_execution function_finishes_contract_execution
...fork_Osaka-state_test-max_recursive_callf max_recursive_callf
...fork_Osaka-state_test-max_recursive_callf_sstore max_recursive_callf_sstore
...fork_Osaka-state_test-max_recursive_callf_memory max_recursive_callf_memory