nautilus_blockchain/exchanges/base/
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
20mod aerodrome_slipstream;
21mod aerodrome_v1;
22mod baseswap_v2;
23mod basex;
24mod maverick_v1;
25mod maverick_v2;
26mod pancakeswap_v3;
27mod sushiswap_v3;
28mod uniswap_v2;
29mod uniswap_v3;
30mod uniswap_v4;
31
32pub use aerodrome_slipstream::AERODROME_SLIPSTREAM;
33pub use aerodrome_v1::AERODROME_V1;
34pub use baseswap_v2::BASESWAP_V2;
35pub use basex::BASEX;
36pub use maverick_v1::MAVERICK_V1;
37pub use maverick_v2::MAVERICK_V2;
38use nautilus_model::defi::DexType;
39pub use pancakeswap_v3::PANCAKESWAP_V3;
40pub use sushiswap_v3::SUSHISWAP_V3;
41pub use uniswap_v2::UNISWAP_V2;
42pub use uniswap_v3::UNISWAP_V3;
43pub use uniswap_v4::UNISWAP_V4;
44
45pub static BASE_DEX_EXTENDED_MAP: LazyLock<HashMap<DexType, &'static DexExtended>> =
46    LazyLock::new(|| {
47        let mut map = HashMap::new();
48        map.insert(AERODROME_SLIPSTREAM.dex.name, &*AERODROME_SLIPSTREAM);
49        map.insert(AERODROME_V1.dex.name, &*AERODROME_V1);
50        map.insert(UNISWAP_V2.dex.name, &*UNISWAP_V2);
51        map.insert(UNISWAP_V3.dex.name, &*UNISWAP_V3);
52        map.insert(UNISWAP_V4.dex.name, &*UNISWAP_V4);
53        map.insert(PANCAKESWAP_V3.dex.name, &*PANCAKESWAP_V3);
54        map.insert(MAVERICK_V1.dex.name, &*MAVERICK_V1);
55        map.insert(MAVERICK_V2.dex.name, &*MAVERICK_V2);
56        map.insert(SUSHISWAP_V3.dex.name, &*SUSHISWAP_V3);
57        map.insert(BASEX.dex.name, &*BASEX);
58        map.insert(BASESWAP_V2.dex.name, &*BASESWAP_V2);
59        map
60    });