Skip to content

test_empty_authorization_list()

Documentation for tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_empty_authorization_list@892e6d1e.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_empty_authorization_list --fork Amsterdam

Test sending an invalid transaction with empty authorization list.

Source code in tests/prague/eip7702_set_code_tx/test_set_code_txs.py
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
@pytest.mark.exception_test
@pytest.mark.eels_base_coverage
def test_empty_authorization_list(
    state_test: StateTestFiller,
    pre: Alloc,
) -> None:
    """Test sending an invalid transaction with empty authorization list."""
    tx = Transaction(
        gas_limit=100_000,
        to=pre.deploy_contract(code=b""),
        value=0,
        authorization_list=[],
        error=TransactionException.TYPE_4_EMPTY_AUTHORIZATION_LIST,
        sender=pre.fund_eoa(),
    )

    state_test(
        env=Environment(),
        pre=pre,
        tx=tx,
        post={},
    )

Parametrized Test Cases

This test generates 1 parametrized test case across 3 forks.