Skip to content

Commit e0dd361

Browse files
committed
Uniswap v3 multihop support
1 parent 539b688 commit e0dd361

5 files changed

Lines changed: 1561 additions & 32 deletions

File tree

web30/src/amm/mod.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//! This module provides functionality for interacting with various versions of Uniswap
44
//! decentralized exchanges on Ethereum and compatible networks.
55
6+
mod router;
67
mod uniswapv3;
78
mod uniswapv4;
89

@@ -14,9 +15,16 @@ mod uniswapv4_test;
1415
// Re-export V2 constants
1516
pub use uniswapv3::UNISWAP_V2_ROUTER_ADDRESS;
1617

18+
// Re-export router items
19+
pub use router::{
20+
generate_potential_routes, generate_routes_by_hop_count, get_common_intermediary_tokens,
21+
get_standard_fees, SwapHop, SwapRoute,
22+
};
23+
1724
// Re-export V3 items
1825
pub use uniswapv3::{
19-
decode_uniswap_v3_sqrt_price, scale_v3_uniswap_sqrt_price, uniswap_v3_sqrt_price_from_amounts,
26+
decode_uniswap_v3_sqrt_price, encode_v3_path, encode_v3_path_exact_output,
27+
scale_v3_uniswap_sqrt_price, uniswap_v3_sqrt_price_from_amounts,
2028
uniswap_v3_sqrt_price_from_price, DAI_CONTRACT_ADDRESS, DEFAULT_GAS_LIMIT_MULT,
2129
SUSDS_CONTRACT_ADDRESS, UNISWAP_STANDARD_POOL_FEES, UNISWAP_V3_FACTORY_ADDRESS,
2230
UNISWAP_V3_QUOTER_ADDRESS, UNISWAP_V3_ROUTER_ADDRESS, USDC_CONTRACT_ADDRESS,

0 commit comments

Comments
 (0)