test_eip_vector_end_of_code()¶
Documentation for tests/amsterdam/eip8024_dupn_swapn_exchange/test_eip_vectors.py::test_eip_vector_end_of_code@8acae1b0.
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
835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 | |
Parametrized Test Cases¶
This test generates 3 parametrized test cases across 1 fork.