@@ -2,7 +2,6 @@ use crate::services::api::contract_classes::deprecated_contract_class::{
22 ContractEntryPoint , EntryPointType ,
33} ;
44use crate :: state:: cached_state:: CachedState ;
5- use crate :: state:: StateDiff ;
65use crate :: {
76 definitions:: { block_context:: BlockContext , constants:: DEFAULT_ENTRY_POINT_SELECTOR } ,
87 runner:: StarknetRunner ,
@@ -92,7 +91,6 @@ impl ExecutionEntryPoint {
9291 resources_manager : & mut ExecutionResourcesManager ,
9392 tx_execution_context : & mut TransactionExecutionContext ,
9493 support_reverted : bool ,
95- max_steps : u64 ,
9694 ) -> Result < CallInfo , TransactionError >
9795 where
9896 T : StateReader ,
@@ -111,35 +109,15 @@ impl ExecutionEntryPoint {
111109 contract_class,
112110 class_hash,
113111 ) ,
114- CompiledClass :: Casm ( contract_class) => {
115- let mut tmp_state = CachedState :: new (
116- state. state_reader . clone ( ) ,
117- state. contract_classes . clone ( ) ,
118- state. casm_contract_classes . clone ( ) ,
119- ) ;
120- tmp_state. cache = state. cache . clone ( ) ;
121-
122- match self . _execute (
123- & mut tmp_state,
124- resources_manager,
125- block_context,
126- tx_execution_context,
127- contract_class,
128- class_hash,
129- support_reverted,
130- ) {
131- Ok ( call_info) => {
132- let state_diff = StateDiff :: from_cached_state ( tmp_state) ?;
133- state. apply_state_update ( & state_diff) ?;
134- Ok ( call_info)
135- }
136- Err ( e) => {
137- let _n_reverted_steps =
138- ( max_steps as usize ) - resources_manager. cairo_usage . n_steps ;
139- Err ( e)
140- }
141- }
142- }
112+ CompiledClass :: Casm ( contract_class) => self . _execute (
113+ state,
114+ resources_manager,
115+ block_context,
116+ tx_execution_context,
117+ contract_class,
118+ class_hash,
119+ support_reverted,
120+ ) ,
143121 }
144122 }
145123
0 commit comments