test_contract_creation()¶
Documentation for tests/cancun/eip1153_tstore/test_tstorage_create_contexts.py::TestTransientStorageInContractCreation::test_contract_creation@verkle@v0.0.6.
Generate fixtures for these test cases for Cancun with:
Cancun only:
fill -v tests/cancun/eip1153_tstore/test_tstorage_create_contexts.py::TestTransientStorageInContractCreation::test_contract_creation --fork=Cancun --evm-bin=/path/to/evm-tool-dev-version
For all forks up to and including Cancun:
fill -v tests/cancun/eip1153_tstore/test_tstorage_create_contexts.py::TestTransientStorageInContractCreation::test_contract_creation --until=Cancun
Test transient storage in contract creation contexts:
- TSTORE/TLOAD in initcode should not be able to access the creator's transient storage.
- TSTORE/TLOAD in initcode should be able to access the created contract's transient storage.
- TSTORE/TLOAD in creator contract should be able to use its own transient storage.
Source code in tests/cancun/eip1153_tstore/test_tstorage_create_contexts.py
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 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | |
test_contract_creation(state_test, pre, creator_address, created_contract_address, initcode, deploy_code, expected_creator_storage, expected_storage)
¶
Test transient storage in contract creation contexts.
Source code in tests/cancun/eip1153_tstore/test_tstorage_create_contexts.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | |
Parametrized Test Cases¶
The interactive table below is also available as a standalone page.
Skipped Parameters
For more concise readability, the table below does not list the following parameter values:
fork, blockchain_test, state_test, state_test_only, eof_test, eof_state_test.
| Test ID | constructor_code | deploy_code | expected_storage | opcode |
|---|---|---|---|---|
| only_constructor_code-create | {0: 0, 1: 1} | CREATE | ||
| only_constructor_code-create2 | {0: 0, 1: 1} | CREATE2 | ||
| in_constructor_and_deployed_code-create | {0: 0, 1: 0, 2: 1} | CREATE | ||
| in_constructor_and_deployed_code-create2 | {0: 0, 1: 0, 2: 1} | CREATE2 | ||
| across_constructor_and_deployed_code_v0-create | {0: 0, 1: 1, 2: 1} | CREATE | ||
| across_constructor_and_deployed_code_v0-create2 | {0: 0, 1: 1, 2: 1} | CREATE2 | ||
| across_constructor_and_deployed_code_v1-create | {0: 0, 1: 1, 2: 0, 3: 1, 4: 1} | CREATE | ||
| across_constructor_and_deployed_code_v1-create2 | {0: 0, 1: 1, 2: 0, 3: 1, 4: 1} | CREATE2 | ||
| no_constructor_code-create | {0: 0, 1: 1} | CREATE | ||
| no_constructor_code-create2 | {0: 0, 1: 1} | CREATE2 | ||
| only_constructor_code-create | {0: 0, 1: 1} | CREATE | ||
| only_constructor_code-create2 | {0: 0, 1: 1} | CREATE2 | ||
| in_constructor_and_deployed_code-create | {0: 0, 1: 0, 2: 1} | CREATE | ||
| in_constructor_and_deployed_code-create2 | {0: 0, 1: 0, 2: 1} | CREATE2 | ||
| across_constructor_and_deployed_code_v0-create | {0: 0, 1: 1, 2: 1} | CREATE | ||
| across_constructor_and_deployed_code_v0-create2 | {0: 0, 1: 1, 2: 1} | CREATE2 | ||
| across_constructor_and_deployed_code_v1-create | {0: 0, 1: 1, 2: 0, 3: 1, 4: 1} | CREATE | ||
| across_constructor_and_deployed_code_v1-create2 | {0: 0, 1: 1, 2: 0, 3: 1, 4: 1} | CREATE2 | ||
| no_constructor_code-create | {0: 0, 1: 1} | CREATE | ||
| no_constructor_code-create2 | {0: 0, 1: 1} | CREATE2 |