test_create_address_dynamic_nonce()¶
Documentation for tests/frontier/create/test_create_preimage_layout.py::test_create_address_dynamic_nonce@b314d18e.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/frontier/create/test_create_preimage_layout.py::test_create_address_dynamic_nonce --fork Amsterdam
Verify CreatePreimageLayout dynamic nonce encoding matches CREATE.
A contract calls CREATE(value=0, offset=0, size=0) in a loop, computes the expected address using the dynamic nonce RLP encoder, and reverts if any computed address differs from the actual one.
The loop runs from nonce 1 to 260, crossing the RLP encoding boundary at nonce 128 (1-byte to 2-byte encoding) and at 256 where it has to change the 0x80 prefix to 0x81.
Source code in tests/frontier/create/test_create_preimage_layout.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 2 forks.