@@ -370,12 +370,12 @@ def evm_code_types(cls, block_number: int = 0, timestamp: int = 0) -> List[EVMCo
370
370
return [EVMCodeType .LEGACY ]
371
371
372
372
@classmethod
373
- def max_code_size (cls ) -> None :
373
+ def max_code_size (cls ) -> int | None :
374
374
"""At genesis, there is no upper bound for code size (bounded by block gas limit)."""
375
375
return None
376
376
377
377
@classmethod
378
- def max_initcode_size (cls ) -> None :
378
+ def max_initcode_size (cls ) -> int | None :
379
379
"""At genesis, there is no upper bound for initcode size (bounded by block gas limit)."""
380
380
return None
381
381
@@ -645,7 +645,7 @@ def precompiles(cls, block_number: int = 0, timestamp: int = 0) -> List[Address]
645
645
)
646
646
647
647
@classmethod
648
- def max_code_size (cls ) -> int :
648
+ def max_code_size (cls ) -> int | None :
649
649
# NOTE: Move this to Spurious Dragon once this fork is introduced. See EIP-170.
650
650
"""At Spurious Dragon, an upper bound was introduced for max contract code size."""
651
651
return 0x6000
@@ -877,7 +877,7 @@ def engine_new_payload_version(
877
877
return 2
878
878
879
879
@classmethod
880
- def max_initcode_size (cls ) -> int :
880
+ def max_initcode_size (cls ) -> int | None :
881
881
"""From Shanghai, the initcode size is now limited. See EIP-3860."""
882
882
return int (0xC000 )
883
883
@@ -1339,12 +1339,12 @@ def engine_get_blobs_version(cls, block_number: int = 0, timestamp: int = 0) ->
1339
1339
return 2
1340
1340
1341
1341
@classmethod
1342
- def max_code_size (cls ) -> int :
1342
+ def max_code_size (cls ) -> int | None :
1343
1343
"""From Osaka, the max code size is lifted. See EIP-7907."""
1344
1344
return int (0x40000 )
1345
1345
1346
1346
@classmethod
1347
- def max_initcode_size (cls ) -> int :
1347
+ def max_initcode_size (cls ) -> int | None :
1348
1348
"""At genesis, there is no upper bound for initcode size (bounded by block gas limit)."""
1349
1349
return int (0x80000 )
1350
1350
0 commit comments