Skip to content

test_eoa_init_as_pointer()

Documentation for tests/prague/eip7702_set_code_tx/test_set_code_txs_2.py::test_eoa_init_as_pointer@01f496f4.

Generate fixtures for these test cases for Prague with:

fill -v tests/prague/eip7702_set_code_tx/test_set_code_txs_2.py::test_eoa_init_as_pointer --fork Prague

It was agreed before that senders don't have code And there were issues with tests sending transactions from account's with code With EIP7702 it is again possible, let's check the test runners are ok.

Source code in tests/prague/eip7702_set_code_tx/test_set_code_txs_2.py
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
@pytest.mark.valid_from("Prague")
def test_eoa_init_as_pointer(state_test: StateTestFiller, pre: Alloc):
    """
    It was agreed before that senders don't have code
    And there were issues with tests sending transactions from account's with code
    With EIP7702 it is again possible, let's check the test runners are ok.
    """
    env = Environment()
    storage = Storage()
    contract = pre.deploy_contract(code=Op.SSTORE(storage.store_next(1, "code_worked"), 1))
    sender = pre.fund_eoa(delegation=contract)

    tx = Transaction(
        to=sender,
        gas_limit=200_000,
        data=b"",
        value=0,
        sender=sender,
    )
    post = {sender: Account(storage=storage)}
    state_test(
        env=env,
        pre=pre,
        post=post,
        tx=tx,
    )

Parametrized Test Cases

This test case is only parametrized by fork and fixture format.

Test ID (Abbreviated)
...fork_Prague-state_test
...fork_Prague-blockchain_test_from_state_test
...fork_Osaka-state_test
...fork_Osaka-blockchain_test_from_state_test