Skip to content

Test Set Code Txs 2

Documentation for tests/prague/eip7702_set_code_tx/test_set_code_txs_2.py@c38722f1.

Generate fixtures for these test cases for Prague with:

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

A state test for EIP-7702 SetCodeTX.

Test Functions Overview

Name Type Cases (Prague) Description
test_pointer_contract_pointer_loop state_test 1 Tx -> call -> pointer A -> contract A -> pointer B -> contract loop C.
test_pointer_to_pointer state_test 1 Tx -> call -> pointer A -> pointer B.
test_pointer_normal blockchain_test 1 Tx -> call -> pointer A -> contract
test_pointer_measurements blockchain_test 1 Check extcode* operations on pointer before and after pointer is set
test_call_to_precompile_in_pointer_context state_test 17 Tx -> call -> pointer A -> precompile contract
test_pointer_to_precompile state_test 17 Tx -> call -> pointer A -> precompile contract.
test_gas_diff_pointer_vs_direct_call blockchain_test 32 Check the gas difference when calling the contract directly vs as a pointer
test_pointer_call_followed_by_direct_call state_test 1 If we first call by pointer then direct call, will the call/sload be hot
test_pointer_to_static state_test 1 Tx -> call -> pointer A -> static -> static violation
test_static_to_pointer state_test 1 Tx -> staticcall -> pointer A -> static violation
test_pointer_to_eof state_test 1 Tx -> call -> pointer A -> EOF
test_pointer_to_static_reentry state_test 1 Tx call -> pointer A -> static -> code -> pointer A -> static violation
test_contract_storage_to_pointer_with_storage state_test 3 Tx call -> contract with storage -> pointer A with storage -> storage/tstorage modify
test_pointer_reentry state_test 1 Check operations when reenter the pointer again
test_eoa_init_as_pointer state_test 1 It was agreed before that senders don't have code
test_call_pointer_to_created_from_create_after_oog_call_again state_test 3 Set pointer to account that we are about to create.
test_pointer_reverts state_test 10 Pointer do operations then revert.
test_double_auth state_test 9 Only the last auth works, but first auth still charges the gas.
test_pointer_resets_an_empty_code_account_with_storage blockchain_test 1 So in Block1 we create a sender with empty code, but non empty storage using pointers