test_swapn_jump_to_immediate_byte_0x5b_succeeds()¶
Documentation for tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py::test_swapn_jump_to_immediate_byte_0x5b_succeeds@c74f1a67.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py::test_swapn_jump_to_immediate_byte_0x5b_succeeds --fork Amsterdam
Test that jumping to 0x5b after SWAPN succeeds (backward compat).
Bytecode: PUSH1(4) JUMP SWAPN[0x5b] Hex: 6004 56 e7 5b Position 4 contains 0x5b which is an INVALID immediate for SWAPN. Per EIP-8024, 0x5b is preserved as valid JUMPDEST for compatibility. The SWAPN instruction is never executed due to the jump.
Source code in tests/amsterdam/eip8024_dupn_swapn_exchange/test_swapn.py
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 1 fork.