Skip to content

Commit f6107bb

Browse files
committed
Add default (None) for reserve_token_address
1 parent 9073e46 commit f6107bb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tradeexecutor/ethereum/routing_data.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
# Allowed exchanges as factory -> router pairs,
5454
# by their smart contract addresses
5555
# init_code_hash not applicable to v3 0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54
56-
# not really a map, change name?
56+
# not really a map, change name?
5757
# V2 contracts (for router and quoter), not supported yet
5858
# Same address_map for ethereum, polygon and arbitrum
5959
# TODO create address_map class
@@ -519,7 +519,7 @@ def get_uniswap_v3_ethereum_default_routing_parameters(
519519
"0xdac17f958d2ee523a2206206994597c13d831ec7",
520520
},
521521
}
522-
522+
523523

524524
def get_uniswap_v3_polygon_default_routing_parameters(
525525
reserve_currency: ReserveCurrency,
@@ -548,7 +548,7 @@ def get_uniswap_v3_polygon_default_routing_parameters(
548548
"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270": "0x9b08288c3be4f62bbf8d1c20ac9c5e6f9467d8b7",
549549
}
550550

551-
551+
552552
return {
553553
"chain_id": ChainId.polygon,
554554
"address_map": uniswap_v3_address_map,
@@ -783,7 +783,7 @@ def validate_reserve_currency(
783783
def get_backtest_routing_model(
784784
routing_type: TradeRouting,
785785
reserve_currency: ReserveCurrency,
786-
reserve_token_address: JSONHexAddress | None,
786+
reserve_token_address: JSONHexAddress | None = None,
787787
) -> BacktestRoutingModel | BacktestRoutingIgnoredModel:
788788
"""Get routing options for backtests.
789789
@@ -801,7 +801,7 @@ def get_backtest_routing_model(
801801
raise AssertionError(f"Shoudl not be reached. If you use routing_type == TradeRouting.default GenericRouting should have been configured earlier in the stack.")
802802

803803
real_routing_model = create_compatible_routing(routing_type, reserve_currency)
804-
804+
805805
if isinstance(real_routing_model, UniswapV2Routing):
806806
return BacktestRoutingModel(
807807
real_routing_model.factory_router_map,

0 commit comments

Comments
 (0)