From 2a501e738b2248803f23bf7ef8c2aeda2127b020 Mon Sep 17 00:00:00 2001 From: Hieu Nguyen Date: Thu, 10 Oct 2024 01:49:06 +0300 Subject: [PATCH] Fix missing support for uniswap v2 --- tradeexecutor/ethereum/ethereum_protocol_adapters.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tradeexecutor/ethereum/ethereum_protocol_adapters.py b/tradeexecutor/ethereum/ethereum_protocol_adapters.py index c7b36e7dc..142753145 100644 --- a/tradeexecutor/ethereum/ethereum_protocol_adapters.py +++ b/tradeexecutor/ethereum/ethereum_protocol_adapters.py @@ -67,7 +67,10 @@ def create_uniswap_v2_adapter( ReserveCurrency.usdc ) else: - raise NotImplementedError(f"Exchange not yet supported: {exchange}") + routing_model = create_uniswap_v2_compatible_routing( + TradeRouting.uniswap_v2_usdc, + ReserveCurrency.usdc + ) pricing_model = UniswapV2LivePricing( web3,