test_code_deposit_state_gas_scales_with_size()¶
Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_create.py::test_code_deposit_state_gas_scales_with_size@622620d8.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_create.py::test_code_deposit_state_gas_scales_with_size --fork Amsterdam
Test code deposit state gas scales linearly with code size.
The code deposit charges len(code) * cost_per_state_byte of state gas. Larger deployed code requires proportionally more state gas. When code exceeds MAX_CODE_SIZE, the size check rejects before any gas is charged and the contract is not deployed.
Source code in tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_create.py
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | |
Parametrized Test Cases¶
This test generates 6 parametrized test cases across 1 fork.