Test Transfer Logs¶
Documentation for tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py@55d774b5.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip7708_eth_transfer_logs/test_transfer_logs.py --fork Amsterdam
Tests for EIP-7708 Transfer logs.
Tests for the Transfer(address,address,uint256) log emitted when: - Nonzero-value-transferring transaction - Nonzero-value-transferring CALL - Nonzero-value-transferring SELFDESTRUCT to a different account
Test Functions Overview¶
| Name | Type | Cases (Amsterdam) | Description |
|---|---|---|---|
test_call_opcodes_insufficient_balance_no_log |
state_test | 2 | Test CALL/CALLCODE with value exceeding caller balance. |
test_call_opcodes_transfer_log_behavior |
state_test | 4 | Test ETH transfer log behavior across all call opcode contexts. |
test_call_to_delegated_account_with_value |
state_test | 1 | Test CALL opcode to 7702 delegated account with value. |
test_call_to_self_no_log |
state_test | 2 | Test that CALL/CALLCODE with value to self emits no transfer log. |
test_call_with_value_to_coinbase_no_priority_fee_log |
state_test | 1 | Verify no Transfer log is emitted for the coinbase priority fee. |
test_contract_creation_tx |
state_test | 2 | Test that contract creation transactions emit logs based on value. |
test_contract_creation_tx_collision |
state_test | 2 | Test that a contract-creating transaction with an address collision |
test_contract_log_and_transfer_ordering |
state_test | 1 | Test log ordering between contract-emitted logs and transfer logs. |
test_create_collision_no_log |
state_test | 2 | Test that CREATE/CREATE2 collision does not emit transfer log. |
test_create_initcode_stop_emits_log |
state_test | 1 | Test that CREATE with initcode using STOP (no RETURN) emits transfer log. |
test_create_insufficient_balance_no_log |
state_test | 1 | Test that CREATE with insufficient balance does NOT emit transfer log. |
test_create_opcode_emits_log |
state_test | 4 | Test that CREATE/CREATE2 opcodes emit logs based on value. |
test_create_out_of_gas_no_log |
state_test | 1 | Test that CREATE running out of gas does NOT emit transfer log. |
test_delegatecall_inner_call_with_value |
state_test | 1 | Test DELEGATECALL to code that performs CALL with value. |
test_failed_create_with_value_no_log |
state_test | 2 | Test that failed CREATE with value does NOT emit transfer log. |
test_failed_inner_operation_no_log |
state_test | 5 | Test that failed inner operations do NOT emit transfer logs. |
test_initcode_calls_with_value |
state_test | 2 | Test that CALL with value during initcode emits correct log. |
test_inner_call_succeeds_outer_reverts_no_log |
state_test | 2 | Test that logs from successful inner calls are rolled back on outer revert. |
test_inner_create_succeeds_outer_reverts_no_log |
state_test | 2 | Test that a CREATE/CREATE2 transfer log is rolled back on outer revert. |
test_multiple_transfers_same_block |
blockchain_test | 1 | Test that multiple transfers in the same block have independent logs. |
test_nested_calls_log_order |
state_test | 3 | Test that nested CALLs emit transfer logs in chronological order. |
test_reverted_transaction_no_log |
state_test | 3 | Test that a failed transaction does NOT emit a transfer log. |
test_selfdestruct_then_transfer_same_block |
blockchain_test | 1 | Test transfer to address that selfdestructed earlier in the same block. |
test_selfdestruct_to_self_cross_tx_no_log |
blockchain_test | 1 | Test that selfdestruct-to-self in a cross-tx context emits no log. |
test_selfdestruct_to_system_address |
state_test | 1 | Test SELFDESTRUCT sending ETH to the EIP-7708 system address. |
test_selfdestruct_with_value_emits_log |
state_test | 1 | Test that SELFDESTRUCT with value emits a transfer log. |
test_simple_transfer_emits_log |
state_test | 1 | Test that a simple ETH transfer emits a transfer log. |
test_stack_underflow_no_log |
state_test | 1 | Test that stack underflow during CALL/CREATE does NOT emit log. |
test_transfer_to_delegated_account_emits_log |
state_test | 1 | Test that transfer to EIP-7702 delegated account emits correct log. |
test_transfer_to_self_no_log |
state_test | 1 | Test that a transaction sending value to self emits no transfer log. |
test_transfer_to_special_address |
state_test | 4 | Test that transfers to special addresses emit transfer logs. |
test_transfer_with_all_tx_types |
state_test | 5 | Test that ETH transfers emit logs for all transaction types. |
test_zero_value_operations_no_log |
state_test | 2 | Test that zero-value operations do NOT emit transfer logs. |
test_zero_value_transfer_no_log |
state_test | 1 | Test that a zero-value transfer does NOT emit a transfer log. |