Runs the simulation together with a call tracer. Afterwards the call trace gets analyzed to generate a high level report of the simulation with information to help the caller understand what went wrong during the simulation.
(
&self,
)
| 482 | /// with information to help the caller understand what went wrong during |
| 483 | /// the simulation. |
| 484 | pub async fn simulation_report( |
| 485 | &self, |
| 486 | ) -> Result<report::SimulationReport, RpcError<alloy_transport::TransportErrorKind>> { |
| 487 | let trace_options = GethDebugTracingCallOptions::default() |
| 488 | .with_tracing_options(GethDebugTracingOptions::call_tracer(CallConfig::default())) |
| 489 | .with_state_overrides(self.state_overrides.clone()); |
| 490 | let trace = self |
| 491 | .simulator |
| 492 | .0 |
| 493 | .provider |
| 494 | .clone() |
| 495 | .debug_trace_call_callframe( |
| 496 | self.as_transaction_request(), |
| 497 | self.block.into(), |
| 498 | trace_options, |
| 499 | ) |
| 500 | .await?; |
| 501 | |
| 502 | let context = report::Context { |
| 503 | settlement: self.simulator.0.settlement.address(), |
| 504 | vault_relayer: &self.simulator.0.vault_relayer, |
| 505 | trampoline: &self.simulator.0.hooks_trampoline, |
| 506 | }; |
| 507 | Ok(report::generate_settlement_report(context, trace)) |
| 508 | } |
| 509 | |
| 510 | /// Same as [`EthCallInputs::simulate`] but also generates a tenderly |
| 511 | /// request in case one wants to re-simulate with tenderly. If tenderly |
no test coverage detected