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 nautilus_model::defi::DexType;
19
20use crate::exchanges::extended::DexExtended;
21
22mod aerodrome_slipstream;
23mod aerodrome_v1;
24mod baseswap_v2;
25mod basex;
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 pancakeswap_v3::PANCAKESWAP_V3;
37pub use sushiswap_v3::SUSHISWAP_V3;
38pub use uniswap_v2::UNISWAP_V2;
39pub use uniswap_v3::UNISWAP_V3;
40pub use uniswap_v4::UNISWAP_V4;
41
42pub static BASE_DEX_EXTENDED_MAP: LazyLock<HashMap<DexType, &'static DexExtended>> =
43    LazyLock::new(|| {
44        let mut map = HashMap::new();
45        map.insert(AERODROME_SLIPSTREAM.dex.name, &*AERODROME_SLIPSTREAM);
46        map.insert(AERODROME_V1.dex.name, &*AERODROME_V1);
47        map.insert(UNISWAP_V2.dex.name, &*UNISWAP_V2);
48        map.insert(UNISWAP_V3.dex.name, &*UNISWAP_V3);
49        map.insert(UNISWAP_V4.dex.name, &*UNISWAP_V4);
50        map.insert(PANCAKESWAP_V3.dex.name, &*PANCAKESWAP_V3);
51        map.insert(SUSHISWAP_V3.dex.name, &*SUSHISWAP_V3);
52        map.insert(BASEX.dex.name, &*BASEX);
53        map.insert(BASESWAP_V2.dex.name, &*BASESWAP_V2);
54        map
55    });