Test Set Code Txs¶
Documentation for tests/prague/eip7702_set_code_tx/test_set_code_txs.py@49c766fb
.
Generate fixtures for these test cases for Prague with:
fill -v tests/prague/eip7702_set_code_tx/test_set_code_txs.py --fork 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 (Prague) | Description |
---|---|---|---|
test_self_sponsored_set_code |
state_test | 10 | Test the executing a self-sponsored set-code transaction. |
test_set_code_to_sstore |
state_test | 30 | Test the executing a simple SSTORE in a set-code transaction. |
test_set_code_to_non_empty_storage |
state_test | 2 | Test the setting the code to an account that has non-empty storage. |
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 | 8 | 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 | 2 | 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 | 4 | Test the executing self-destruct opcode in a set-code transaction. |
test_set_code_to_contract_creator |
state_test | 2 | Test the executing a contract-creating opcode in a set-code transaction. |
test_set_code_to_self_caller |
state_test | 8 | Test the executing a self-call in a set-code transaction. |
test_set_code_max_depth_call_stack |
state_test | 1 | Test re-entry to delegated account until the max call stack depth is reached. |
test_set_code_call_set_code |
state_test | 8 | 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 | 4 | Test call into a set-code account that delegates to itself. |
test_call_into_chain_delegating_set_code |
state_test | 4 | Test call into a set-code account that delegates to another set-code account. |
test_ext_code_on_set_code |
state_test | 8 | Test different ext*code operations on a set-code address. |
test_ext_code_on_self_set_code |
state_test | 2 | Test different ext*code operations on self set-code address. |
test_set_code_address_and_authority_warm_state |
state_test | 2 | 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 | 8 | Test set to code address and authority warm status after a call to |
test_ext_code_on_self_delegating_set_code |
state_test | 2 | 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 | 2 | Test codesize and codecopy operations on a set-code address. |
test_set_code_to_account_deployed_in_same_tx |
state_test | 2 | 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 | 16 | 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_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 | 6 | Test sending a transaction to set the code of an account using synthetic signatures. |
test_valid_tx_invalid_auth_signature |
state_test | 21 | Test sending a transaction to set the code of an account using synthetic signatures, |
test_signature_s_out_of_range |
state_test | 1 | Test sending a transaction with an authorization tuple where the signature s value is out of |
test_valid_tx_invalid_chain_id |
state_test | 2 | Test sending a transaction where the chain id field does not match the current chain's id. |
test_nonce_validity |
state_test | 4 | Test sending a transaction where the nonce field of an authorization almost overflows the |
test_nonce_overflow_after_first_authorization |
state_test | 1 | Test sending a transaction with two authorization where the first one bumps the nonce |
test_set_code_to_log |
state_test | 5 | Test setting the code of an account to a contract that performs the log operation. |
test_set_code_to_precompile |
state_test | 17 | Test setting the code of an account to a pre-compile address. |
test_set_code_to_system_contract |
blockchain_test | 5 | Test setting the code of an account to a pre-compile address. |
test_eoa_tx_after_set_code |
blockchain_test | 4 | 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. |
test_contract_create |
state_test | 1 | Test sending type-4 tx as a create transaction |
test_delegation_clearing |
state_test | 4 | Test clearing the delegation of an account under a variety of circumstances. |
test_delegation_clearing_tx_to |
state_test | 4 | Tests directly calling the account which delegation is being cleared. |
test_delegation_clearing_and_set |
state_test | 2 | Tests clearing and setting the delegation again in the same authorization list. |
test_delegation_clearing_failing_tx |
state_test | 3 | Test clearing the delegation of an account in a transaction that fails, OOGs or reverts. |
test_deploying_delegation_designation_contract |
state_test | 1 | Test attempting to deploy a contract that has the same format as a delegation designation. |
test_many_delegations |
state_test | 4 | Perform as many delegations as possible in a single 120 million gas transaction. |