test_eip_vector_end_of_code()¶
Documentation for tests/amsterdam/eip8024_dupn_swapn_exchange/test_eip_vectors.py::test_eip_vector_end_of_code@9c2813ee.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8024_dupn_swapn_exchange/test_eip_vectors.py::test_eip_vector_end_of_code --fork Amsterdam
Test EIP-8024 opcodes at end of code (no immediate byte).
When an opcode appears at end of code, code[pc+1] = 0 beyond end of code. - DUPN: decode_single(0) = 145, needs 145 items on stack - SWAPN: decode_single(0) = 145, needs 146 items on stack - EXCHANGE: decode_pair(0) = (9, 16), needs 17 items on stack
Store a marker before the opcode to verify the transaction succeeded, since adding any opcode after would make that opcode byte the immediate.
Source code in tests/amsterdam/eip8024_dupn_swapn_exchange/test_eip_vectors.py
789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 | |
Parametrized Test Cases¶
This test generates 3 parametrized test cases across 1 fork.