Skip to content

test_transactions_without_access_list()

Documentation for tests/amsterdam/eip7981_increase_access_list_cost/test_transaction_validity.py::test_transactions_without_access_list@ffe48572.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/amsterdam/eip7981_increase_access_list_cost/test_transaction_validity.py::test_transactions_without_access_list --fork Amsterdam

Test that transactions without access lists still work correctly.

EIP-7981 should only affect transactions with non-empty access lists.

Source code in tests/amsterdam/eip7981_increase_access_list_cost/test_transaction_validity.py
@EIPChecklist.GasCostChanges.Test.GasUpdatesMeasurement()
@pytest.mark.parametrize(
    "tx_type,access_list",
    [
        pytest.param(
            0,
            None,
            id="type_0_no_access_list",
        ),
        pytest.param(
            1,
            [],
            id="type_1_empty_access_list",
        ),
        pytest.param(
            2,
            [],
            id="type_2_empty_access_list",
        ),
        pytest.param(
            3,
            [],
            id="type_3_empty_access_list",
        ),
        pytest.param(
            4,
            [],
            id="type_4_empty_access_list",
        ),
    ],
)
@pytest.mark.parametrize(
    "to",
    [pytest.param("eoa", id="")],
    indirect=True,
)
@pytest.mark.parametrize(
    "tx_gas_delta",
    [pytest.param(0, id="")],
)
def test_transactions_without_access_list(
    state_test: StateTestFiller,
    pre: Alloc,
    tx: Transaction,
) -> None:
    """
    Test that transactions without access lists still work correctly.

    EIP-7981 should only affect transactions with non-empty access lists.
    """
    state_test(
        pre=pre,
        post={},
        tx=tx,
    )

Parametrized Test Cases

This test generates 5 parametrized test cases across 1 fork.