test_codecopy_zero_in_create2()¶
Documentation for tests/constantinople/eip1052_extcodehash/test_extcodehash.py::test_codecopy_zero_in_create2@b314d18e.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/constantinople/eip1052_extcodehash/test_extcodehash.py::test_codecopy_zero_in_create2 --fork Amsterdam
Test CODECOPY inside CREATE2 initcode that deploys empty code.
The initcode does CODECOPY(0,0,32) which copies the first 32 bytes of the initcode itself (not the deployed code). It then checks EXTCODESIZE(ADDRESS) and EXTCODEHASH(ADDRESS) of self during init, which see the account as having empty code. The deployed contract retains the storage set during init.
Source code in tests/constantinople/eip1052_extcodehash/test_extcodehash.py
1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 10 forks.