Skip to content

Test SLOTNUM

Documentation for tests/amsterdam/eip7843_slotnum/test_slotnum.py@c17999c0.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/amsterdam/eip7843_slotnum/test_slotnum.py --fork Amsterdam

Tests for EIP-7843 (SLOTNUM).

Test Functions Overview

Name Type Cases (Amsterdam) Description
test_slotnum_call_contexts state_test 4 Test that SLOTNUM returns the slot number in every call frame type.
test_slotnum_distinct_per_block blockchain_test 1 Test that SLOTNUM returns each block's own slot number.
test_slotnum_gas_cost state_test 2 Test that SLOTNUM opcode costs exactly 2 gas (G_BASE).
test_slotnum_genesis blockchain_test 1 Test that the slot number header field can be set at genesis.
test_slotnum_initcode_create state_test 2 Test SLOTNUM inside initcode executed via CREATE and CREATE2.
test_slotnum_initcode_tx state_test 1 Test SLOTNUM inside the initcode of a contract-creating transaction.
test_slotnum_set_code state_test 1 Test SLOTNUM inside a set-code delegated account (EIP-7702).
test_slotnum_stack_overflow state_test 2 Test that SLOTNUM aborts when pushing past the 1024-item stack limit.
test_slotnum_value state_test 5 Test that SLOTNUM opcode returns the correct slot number.