Test Set Code Txs¶
Documentation for tests/prague/eip7702_set_code_tx/test_set_code_txs.py@verkle@v0.0.5
.
Generate fixtures for these test cases for Prague with:
Prague only:
fill -v tests/prague/eip7702_set_code_tx/test_set_code_txs.py --fork=Prague --evm-bin=/path/to/evm-tool-dev-version
For all forks up to and including Prague:
fill -v tests/prague/eip7702_set_code_tx/test_set_code_txs.py --until=Prague
Tests use of set-code transactions from EIP-7702: Set EOA account code for one transaction
Tests use of set-code transactions from EIP-7702: Set EOA account code for one transaction.
Test Functions Overview¶
Name | Type | Cases | Description |
---|---|---|---|
test_self_sponsored_set_code |
state_test | 20 | Test the executing a self-sponsored set-code transaction. |
test_set_code_to_sstore |
state_test | 60 | Test the executing a simple SSTORE in a set-code transaction. |
test_set_code_to_zero_address |
state_test | 1 | Test setting the code to the zero address (0x0) in a set-code transaction. |
test_set_code_to_sstore_then_sload |
blockchain_test | 1 | Test the executing a simple SSTORE then SLOAD in two separate set-code transactions. |
test_set_code_to_tstore_reentry |
state_test | 28 | Test the executing a simple TSTORE in a set-code transaction, which also performs a |
test_set_code_to_tstore_available_at_correct_address |
state_test | 8 | Test TLOADing from slot 2 and then SSTORE this in slot 1, then TSTORE 3 in slot 2. |
test_set_code_to_self_destruct |
state_test | 8 | Test the executing self-destruct opcode in a set-code transaction. |
test_set_code_to_contract_creator |
state_test | 4 | Test the executing a contract-creating opcode in a set-code transaction. |
test_set_code_to_self_caller |
state_test | 28 | Test the executing a self-call in a set-code transaction. |
test_set_code_call_set_code |
state_test | 28 | Test the calling a set-code account from another set-code account. |
test_address_from_set_code |
state_test | 1 | Test the address opcode in a set-code transaction. |
test_tx_into_self_delegating_set_code |
state_test | 1 | Test a transaction that has entry-point into a set-code account that delegates to itself. |
test_tx_into_chain_delegating_set_code |
state_test | 1 | Test a transaction that has entry-point into a set-code account that delegates to another |
test_call_into_self_delegating_set_code |
state_test | 14 | Test call into a set-code account that delegates to itself. |
test_call_into_chain_delegating_set_code |
state_test | 14 | Test call into a set-code account that delegates to another set-code account. |
test_ext_code_on_set_code |
state_test | 16 | Test different ext*code operations on a set-code address. |
test_ext_code_on_self_set_code |
state_test | 4 | Test different ext*code operations on self set-code address. |
test_set_code_address_and_authority_warm_state |
state_test | 8 | Test set to code address and authority warm status after a call to |
test_set_code_address_and_authority_warm_state_call_types |
state_test | 28 | Test set to code address and authority warm status after a call to |
test_ext_code_on_self_delegating_set_code |
state_test | 4 | Test different ext*code operations on a set-code address that delegates to itself. |
test_ext_code_on_chain_delegating_set_code |
state_test | 1 | Test different ext*code operations on a set-code address that references another delegated |
test_self_code_on_set_code |
state_test | 4 | Test codesize and codecopy operations on a set-code address. |
test_set_code_to_account_deployed_in_same_tx |
state_test | 4 | Test setting the code of an account to an address that is deployed in the same transaction, |
test_set_code_to_self_destructing_account_deployed_in_same_tx |
state_test | 32 | Test setting the code of an account to an account that contains the SELFDESTRUCT opcode and |
test_set_code_multiple_first_valid_authorization_tuples_same_signer |
state_test | 1 | Test setting the code of an account with multiple authorization tuples from the same signer. |
test_set_code_multiple_valid_authorization_tuples_same_signer_increasing_nonce |
state_test | 1 | Test setting the code of an account with multiple authorization tuples from the same signer |
test_set_code_multiple_valid_authorization_tuples_same_signer_increasing_nonce_self_sponsored |
state_test | 1 | Test setting the code of an account with multiple authorization tuples from the same signer |
test_set_code_multiple_valid_authorization_tuples_first_invalid_same_signer |
state_test | 1 | Test setting the code of an account with multiple authorization tuples from the same signer |
test_set_code_all_invalid_authorization_tuples |
state_test | 1 | Test setting the code of an account with multiple authorization tuples from the same signer |
test_set_code_invalid_authorization_tuple |
state_test | 8 | Test attempting to set the code of an account with invalid authorization tuple. |
test_set_code_using_chain_specific_id |
state_test | 1 | Test sending a transaction to set the code of an account using a chain-specific ID. |
test_set_code_using_valid_synthetic_signatures |
state_test | 24 | Test sending a transaction to set the code of an account using synthetic signatures. |
test_invalid_tx_invalid_auth_signature |
state_test | 8 | Test sending a transaction to set the code of an account using synthetic signatures. |
test_set_code_using_invalid_signatures |
state_test | 14 | Test sending a transaction to set the code of an account using synthetic signatures, |
test_set_code_to_log |
state_test | 20 | Test setting the code of an account to a contract that performs the log operation. |
test_set_code_to_precompile |
state_test | 76 | Test setting the code of an account to a pre-compile address. |
test_set_code_to_system_contract |
blockchain_test | 10 | Test setting the code of an account to a pre-compile address. |
test_eoa_tx_after_set_code |
blockchain_test | 8 | Test sending a transaction from an EOA after code has been set to the account. |
test_reset_code |
blockchain_test | 2 | Test sending type-4 tx to reset the code of an account after code has been set to the account. |