fn inspect_and_collect_results(
        &mut self,
        dispatcher: &mut TracerDispatcher<S, H::VmVirtualBlocksRefundsEnhancement>,
        execution_mode: VmExecutionMode,
        with_refund_tracer: bool,
    ) -> (VmExecutionStopReason, VmExecutionResultAndLogs) {
        let refund_tracers =
            with_refund_tracer.then_some(RefundsTracer::new(self.batch_env.clone()));
        let mut tx_tracer: DefaultExecutionTracer<S, H::VmVirtualBlocksRefundsEnhancement> =
            DefaultExecutionTracer::new(
                self.system_env.default_validation_computational_gas_limit,
                execution_mode,
                mem::take(dispatcher),
                self.storage.clone(),
                refund_tracers,
            );

        let timestamp_initial = Timestamp(self.state.local_state.timestamp);
        let cycles_initial = self.state.local_state.monotonic_cycle_counter;
        let gas_remaining_before = self.gas_remaining();
        let spent_pubdata_counter_before = self.state.local_state.spent_pubdata_counter;

        let stop_reason = self.execute_with_default_tracer(&mut tx_tracer);

        let gas_remaining_after = self.gas_remaining();

        let logs = self.collect_execution_logs_after_timestamp(timestamp_initial);

        let (refunds, pubdata_published) = tx_tracer
            .refund_tracer
            .as_ref()
            .map(|x| (x.get_refunds(), x.pubdata_published()))
            .unwrap_or_default();

        let statistics = self.get_statistics(
            timestamp_initial,
            cycles_initial,
            &tx_tracer,
            gas_remaining_before,
            gas_remaining_after,
            spent_pubdata_counter_before,
            pubdata_published,
            logs.total_log_queries_count,
        );

        let result = tx_tracer.result_tracer.into_result();
        *dispatcher = tx_tracer.dispatcher;

        let result = VmExecutionResultAndLogs {
            result,
            logs,
            statistics,
            refunds,
            dynamic_factory_deps: HashMap::new(), // dynamic bytecode deployment is not supported
        };

        (stop_reason, result)
    }
Execute VM with given traces until the stop reason is reached.
Collect the result from the default tracers.
core/lib/multivm/src/versions/vm_refunds_enhancement/implementation/execution.rs