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 lido;
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}