@@ -254,6 +254,8 @@ pub struct Config {
254254 pub has_restricted_selfdestruct : bool ,
255255 /// EIP-7702
256256 pub has_authorization_list : bool ,
257+ /// EIP-7939
258+ pub has_clz : bool ,
257259 /// EIP-7702
258260 pub gas_per_empty_account_cost : u64 ,
259261 /// EIP-7702
@@ -323,6 +325,7 @@ impl Config {
323325 has_mcopy : false ,
324326 has_restricted_selfdestruct : false ,
325327 has_authorization_list : false ,
328+ has_clz : false ,
326329 gas_per_empty_account_cost : 0 ,
327330 gas_per_auth_base_cost : 0 ,
328331 has_floor_gas : false ,
@@ -388,6 +391,7 @@ impl Config {
388391 has_mcopy : false ,
389392 has_restricted_selfdestruct : false ,
390393 has_authorization_list : false ,
394+ has_clz : false ,
391395 gas_per_auth_base_cost : 0 ,
392396 gas_per_empty_account_cost : 0 ,
393397 has_floor_gas : false ,
@@ -431,6 +435,12 @@ impl Config {
431435 Self :: config_with_derived_values ( DerivedConfigInputs :: prague ( ) )
432436 }
433437
438+ /// Osaka hard fork configuration.
439+ #[ must_use]
440+ pub const fn osaka ( ) -> Self {
441+ Self :: config_with_derived_values ( DerivedConfigInputs :: osaka ( ) )
442+ }
443+
434444 const fn config_with_derived_values ( inputs : DerivedConfigInputs ) -> Self {
435445 let DerivedConfigInputs {
436446 gas_storage_read_warm,
@@ -448,6 +458,7 @@ impl Config {
448458 has_mcopy,
449459 has_restricted_selfdestruct,
450460 has_authorization_list,
461+ has_clz,
451462 gas_per_empty_account_cost,
452463 gas_per_auth_base_cost,
453464 has_floor_gas,
@@ -523,6 +534,7 @@ impl Config {
523534 has_mcopy,
524535 has_restricted_selfdestruct,
525536 has_authorization_list,
537+ has_clz,
526538 gas_per_empty_account_cost,
527539 gas_per_auth_base_cost,
528540 has_floor_gas,
@@ -551,6 +563,7 @@ struct DerivedConfigInputs {
551563 has_mcopy : bool ,
552564 has_restricted_selfdestruct : bool ,
553565 has_authorization_list : bool ,
566+ has_clz : bool ,
554567 gas_per_empty_account_cost : u64 ,
555568 gas_per_auth_base_cost : u64 ,
556569 has_floor_gas : bool ,
@@ -575,6 +588,7 @@ impl DerivedConfigInputs {
575588 has_mcopy : false ,
576589 has_restricted_selfdestruct : false ,
577590 has_authorization_list : false ,
591+ has_clz : false ,
578592 gas_per_auth_base_cost : 0 ,
579593 gas_per_empty_account_cost : 0 ,
580594 has_floor_gas : false ,
@@ -599,6 +613,7 @@ impl DerivedConfigInputs {
599613 has_mcopy : false ,
600614 has_restricted_selfdestruct : false ,
601615 has_authorization_list : false ,
616+ has_clz : false ,
602617 gas_per_auth_base_cost : 0 ,
603618 gas_per_empty_account_cost : 0 ,
604619 has_floor_gas : false ,
@@ -623,6 +638,7 @@ impl DerivedConfigInputs {
623638 has_mcopy : false ,
624639 has_restricted_selfdestruct : false ,
625640 has_authorization_list : false ,
641+ has_clz : false ,
626642 gas_per_auth_base_cost : 0 ,
627643 gas_per_empty_account_cost : 0 ,
628644 has_floor_gas : false ,
@@ -648,6 +664,7 @@ impl DerivedConfigInputs {
648664 has_mcopy : false ,
649665 has_restricted_selfdestruct : false ,
650666 has_authorization_list : false ,
667+ has_clz : false ,
651668 gas_per_auth_base_cost : 0 ,
652669 gas_per_empty_account_cost : 0 ,
653670 has_floor_gas : false ,
@@ -674,4 +691,10 @@ impl DerivedConfigInputs {
674691 config. total_cost_floor_per_token = 10 ;
675692 config
676693 }
694+
695+ const fn osaka ( ) -> Self {
696+ let mut config = Self :: prague ( ) ;
697+ config. has_clz = true ;
698+ config
699+ }
677700}
0 commit comments