@@ -306,6 +306,8 @@ pub struct Config {
306306 pub has_eip_7702 : bool ,
307307 /// Has EIP-7623. See [EIP-7623](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7623.md)
308308 pub has_eip_7623 : bool ,
309+ /// Has EIP-7939. See [EIP-7939](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7939.md)
310+ pub has_eip_7939 : bool ,
309311}
310312
311313impl Config {
@@ -369,6 +371,7 @@ impl Config {
369371 has_eip_7623 : false ,
370372 gas_calldata_zero_floor : 0 ,
371373 gas_calldata_non_zero_floor : 0 ,
374+ has_eip_7939 : false ,
372375 }
373376 }
374377
@@ -432,6 +435,7 @@ impl Config {
432435 has_eip_7623 : false ,
433436 gas_calldata_zero_floor : 0 ,
434437 gas_calldata_non_zero_floor : 0 ,
438+ has_eip_7939 : false ,
435439 }
436440 }
437441
@@ -465,6 +469,11 @@ impl Config {
465469 Self :: config_with_derived_values ( DerivedConfigInputs :: pectra ( ) )
466470 }
467471
472+ /// Osaka hard fork configuration.
473+ pub const fn osaka ( ) -> Config {
474+ Self :: config_with_derived_values ( DerivedConfigInputs :: osaka ( ) )
475+ }
476+
468477 const fn config_with_derived_values ( inputs : DerivedConfigInputs ) -> Config {
469478 let DerivedConfigInputs {
470479 gas_storage_read_warm,
@@ -485,6 +494,7 @@ impl Config {
485494 has_eip_7623,
486495 gas_calldata_zero_floor,
487496 gas_calldata_non_zero_floor,
497+ has_eip_7939,
488498 } = inputs;
489499
490500 // See https://eips.ethereum.org/EIPS/eip-2929
@@ -557,6 +567,7 @@ impl Config {
557567 has_eip_7623,
558568 gas_calldata_zero_floor,
559569 gas_calldata_non_zero_floor,
570+ has_eip_7939,
560571 }
561572 }
562573}
@@ -582,6 +593,7 @@ struct DerivedConfigInputs {
582593 has_eip_7623 : bool ,
583594 gas_calldata_zero_floor : u64 ,
584595 gas_calldata_non_zero_floor : u64 ,
596+ has_eip_7939 : bool ,
585597}
586598
587599impl DerivedConfigInputs {
@@ -605,6 +617,7 @@ impl DerivedConfigInputs {
605617 has_eip_7623 : false ,
606618 gas_calldata_zero_floor : 0 ,
607619 gas_calldata_non_zero_floor : 0 ,
620+ has_eip_7939 : false ,
608621 }
609622 }
610623
@@ -628,6 +641,7 @@ impl DerivedConfigInputs {
628641 has_eip_7623 : false ,
629642 gas_calldata_zero_floor : 0 ,
630643 gas_calldata_non_zero_floor : 0 ,
644+ has_eip_7939 : false ,
631645 }
632646 }
633647
@@ -651,6 +665,7 @@ impl DerivedConfigInputs {
651665 has_eip_7623 : false ,
652666 gas_calldata_zero_floor : 0 ,
653667 gas_calldata_non_zero_floor : 0 ,
668+ has_eip_7939 : false ,
654669 }
655670 }
656671
@@ -675,6 +690,7 @@ impl DerivedConfigInputs {
675690 has_eip_7623 : false ,
676691 gas_calldata_zero_floor : 0 ,
677692 gas_calldata_non_zero_floor : 0 ,
693+ has_eip_7939 : false ,
678694 }
679695 }
680696
@@ -699,6 +715,7 @@ impl DerivedConfigInputs {
699715 has_eip_7623 : false ,
700716 gas_calldata_zero_floor : 0 ,
701717 gas_calldata_non_zero_floor : 0 ,
718+ has_eip_7939 : false ,
702719 }
703720 }
704721
@@ -726,6 +743,35 @@ impl DerivedConfigInputs {
726743 has_eip_7623 : true ,
727744 gas_calldata_zero_floor : 10 ,
728745 gas_calldata_non_zero_floor : 40 ,
746+ has_eip_7939 : false ,
747+ }
748+ }
749+
750+ /// Osaka hard fork configuration.
751+ const fn osaka ( ) -> Self {
752+ Self {
753+ gas_storage_read_warm : 100 ,
754+ gas_sload_cold : 2100 ,
755+ gas_access_list_storage_key : 1900 ,
756+ decrease_clears_refund : true ,
757+ has_base_fee : true ,
758+ has_push0 : true ,
759+ disallow_executable_format : true ,
760+ warm_coinbase_address : true ,
761+ // 2 * 24576 as per EIP-3860
762+ max_initcode_size : Some ( 0xC000 ) ,
763+ has_eip_6780 : true ,
764+ has_tloadstore : true ,
765+ has_mcopy : true ,
766+ has_eip_7702 : true ,
767+ // PER_AUTH_BASE_COST from EIP-7702
768+ gas_auth_base_cost : 12500 ,
769+ // PER_EMPTY_ACCOUNT_COST from EIP-7702
770+ gas_per_empty_account_cost : 25000 ,
771+ has_eip_7623 : true ,
772+ gas_calldata_zero_floor : 10 ,
773+ gas_calldata_non_zero_floor : 40 ,
774+ has_eip_7939 : true ,
729775 }
730776 }
731777}
0 commit comments