nautilus_blockchain/exchanges/ethereum/
mod.rs

1// -------------------------------------------------------------------------------------------------
2//  Copyright (C) 2015-2025 Nautech Systems Pty Ltd. All rights reserved.
3//  https://nautechsystems.io
4//
5//  Licensed under the GNU Lesser General Public License Version 3.0 (the "License");
6//  You may not use this file except in compliance with the License.
7//  You may obtain a copy of the License at https://www.gnu.org/licenses/lgpl-3.0.en.html
8//
9//  Unless required by applicable law or agreed to in writing, software
10//  distributed under the License is distributed on an "AS IS" BASIS,
11//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//  See the License for the specific language governing permissions and
13//  limitations under the License.
14// -------------------------------------------------------------------------------------------------
15
16use std::{collections::HashMap, sync::LazyLock};
17
18use crate::exchanges::extended::DexExtended;
19
20pub mod balancer_v2;
21pub mod balancer_v3;
22pub mod curve_finance;
23pub mod fluid;
24pub mod maverick_v2;
25pub mod pancakeswap_v3;
26pub mod uniswap_v2;
27pub mod uniswap_v3;
28pub mod uniswap_v4;
29
30pub use balancer_v2::BALANCER_V2;
31pub use balancer_v3::BALANCER_V3;
32pub use curve_finance::CURVE_FINANCE;
33pub use fluid::FLUID_DEX;
34pub use maverick_v2::MAVERICK_V2;
35use nautilus_model::defi::DexType;
36pub use pancakeswap_v3::PANCAKESWAP_V3;
37pub use uniswap_v2::UNISWAP_V2;
38pub use uniswap_v3::UNISWAP_V3;
39pub use uniswap_v4::UNISWAP_V4;
40
41pub static ETHEREUM_DEX_EXTENDED_MAP: LazyLock<HashMap<DexType, &'static DexExtended>> =
42    LazyLock::new(|| {
43        let mut map = HashMap::new();
44        map.insert(UNISWAP_V2.dex.name, &*UNISWAP_V2);
45        map.insert(UNISWAP_V3.dex.name, &*UNISWAP_V3);
46        map.insert(UNISWAP_V4.dex.name, &*UNISWAP_V4);
47        map.insert(CURVE_FINANCE.dex.name, &*CURVE_FINANCE);
48        map.insert(FLUID_DEX.dex.name, &*FLUID_DEX);
49        map.insert(MAVERICK_V2.dex.name, &*MAVERICK_V2);
50        map.insert(BALANCER_V2.dex.name, &*BALANCER_V2);
51        map.insert(BALANCER_V3.dex.name, &*BALANCER_V3);
52        map.insert(PANCAKESWAP_V3.dex.name, &*PANCAKESWAP_V3);
53
54        map
55    });