Skip to main content

tycho_simulation/evm/protocol/
mod.rs

1pub mod aerodrome_slipstreams;
2mod clmm;
3pub mod cowamm;
4mod cpmm;
5pub mod ekubo;
6pub mod ekubo_v3;
7pub mod erc4626;
8pub mod etherfi;
9pub mod filters;
10pub mod fluid;
11pub mod pancakeswap_v2;
12pub mod rocketpool;
13pub mod safe_math;
14pub mod u256_num;
15pub mod uniswap_v2;
16pub mod uniswap_v3;
17pub mod uniswap_v4;
18pub mod utils;
19pub mod velodrome_slipstreams;
20pub mod vm;
21
22#[cfg(test)]
23mod test_utils {
24    use std::collections::HashMap;
25
26    use tycho_client::feed::{synchronizer::ComponentWithState, BlockHeader};
27
28    use crate::protocol::models::TryFromWithBlock;
29
30    pub(super) async fn try_decode_snapshot_with_defaults<
31        T: TryFromWithBlock<ComponentWithState, BlockHeader>,
32    >(
33        snapshot: ComponentWithState,
34    ) -> Result<T, T::Error> {
35        T::try_from_with_header(
36            snapshot,
37            Default::default(),
38            &HashMap::default(),
39            &HashMap::default(),
40            &Default::default(),
41        )
42        .await
43    }
44}