Skip to main content

tycho_simulation/evm/protocol/
mod.rs

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