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@88e9fb8f.

Generate fixtures for these test cases for Osaka with:

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

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
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
@pytest.mark.valid_from("Prague")
def test_eoa_init_as_pointer(state_test: StateTestFiller, pre: Alloc) -> None:
    """
    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