Skip to content

test_subcall()

Documentation for tests/cancun/eip1153_tstore/test_tstorage_execution_contexts.py::test_subcall@892e6d1e.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/cancun/eip1153_tstore/test_tstorage_execution_contexts.py::test_subcall --fork Amsterdam

Test transient storage with a subcall using the following opcodes.

  • CALL
  • CALLCODE
  • DELEGATECALL
  • STATICCALL
Source code in tests/cancun/eip1153_tstore/test_tstorage_execution_contexts.py
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
@CallContextTestCases.parametrize()
@pytest.mark.eels_base_coverage
def test_subcall(
    state_test: StateTestFiller,
    env: Environment,
    pre: Alloc,
    tx: Transaction,
    post: Mapping,
) -> None:
    """
    Test transient storage with a subcall using the following opcodes.

    - `CALL`
    - `CALLCODE`
    - `DELEGATECALL`
    - `STATICCALL`
    """
    state_test(env=env, pre=pre, post=post, tx=tx)

Parametrized Test Cases

This test generates 8 parametrized test cases across 4 forks.