1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! The simulation engine — the in-process revm EVM handle + its DB stack.
//!
//! ADR-019 D4/D7 (decision R — strategy/engine separation): this crate owns
//! the **engine** (`BlockSimHandle`, the layered DB, `apply_simulation_overrides`,
//! `AccessListCollector`, `WarmCodeCache`). The **strategy** — the 7-call
//! pre/post-balance bundle, `compute_priority_fee`, `decode_balance`,
//! `SimResult`, `dispatch_profitable_results`, `SimulateContext`,
//! `SimulatePath`, `FailBuckets`, the calldata builders — relocated to the
//! `degenbot-arbitrage` crate, which drives the borrowed `&mut evm`
//! the engine exposes via [`BlockSimHandle::evm_mut`].
//!
//! # Standalone-Rust consumer
//!
//! `cargo add degenbot-simulation` reaches the in-process engine surface with
//! zero `pyo3` dependency (ADR-005 standalone-core).
// Solidity/EVM identifiers (balanceOf, stateDiff, ERC6909, WETH9, PoolManager,
// …) are ubiquitous in this crate's docs; allow the pedantic doc-markdown lint
// to match the peer core crates.
/// The in-process revm engine + its DB stack (the EVM handle, overrides,
/// AL collector, warm cache). The settlement-arbitrage strategy relocated to
/// `degenbot-arbitrage` (ADR-019 D4/D7, decision R).
/// The executor grammar harness (UQOAHA): deploy the real `cmd_executor` +
/// synthesized pools into a fresh revm `CacheDB`, run a path's
/// [`encode_cmd_stream`](degenbot_executor::composers::encode_cmd_stream)
/// payload through `execute()`, and report whether it executes + which pools
/// it touched. The missing third correctness tool — byte parity can't prove
/// runtime behavior, and live sim needs a captured mainnet path. See
/// [`harness`](crate::harness) for the API.
/// Contract-agnostic in-process revm **fixture driver** — deploy a pinned
/// contract artifact, run staged calls, seed storage slots, drive a call,
/// classify the verdict (Revert vs Halt), and read back output + logs. The
/// shared spine of the tier-3 on-chain oracles and any per-contract (user)
/// investigation harness. See [`oracle`] for the API.
pub use ;
// Re-export the engine surface at the crate root for ergonomic access + for
// the strategy crate (`degenbot-arbitrage`) + the PyO3 wrapper. The
// strategy value types (`SimResult`, `SimulateContext`, `FailBuckets`, …)
// now live in `degenbot-arbitrage`.
pub use ;