@@ -37,17 +37,13 @@ def test_assets(client: Uniswap):
3737 """
3838 tokens = client ._get_token_addresses ()
3939
40- for token_name , amount in [("DAI" , 10 ** 18 ), ("USDC" , 10 ** 6 )]:
40+ for token_name , amount in [("DAI" , 100 * 10 ** 18 ), ("USDC" , 100 * 10 ** 6 )]:
4141 token_addr = tokens [token_name ]
42- price = client .get_eth_token_output_price (_str_to_addr ( token_addr ) , amount )
42+ price = client .get_eth_token_output_price (token_addr , amount )
4343 logger .info (f"Cost of { amount } { token_name } : { price } " )
4444 logger .info ("Buying..." )
4545
46- client .approve (tokens ["WETH" ])
47- # client.approve(tokens[token_name])
48-
49- # FIXME: Maybe trading ETH like this isn't supported on V3?
50- tx = client .make_trade_output (tokens ["WETH" ], tokens [token_name ], amount )
46+ tx = client .make_trade_output (tokens ["ETH" ], token_addr , amount )
5147 client .w3 .eth .waitForTransactionReceipt (tx )
5248
5349
@@ -271,11 +267,11 @@ def test_remove_liquidity(
271267 "input_token, output_token, qty, recipient, expectation" ,
272268 [
273269 # ETH -> Token
274- (eth , bat , 1_000_000_000 * ONE_WEI , None , does_not_raise ),
270+ (eth , dai , 1_000_000_000 * ONE_WEI , None , does_not_raise ),
275271 # Token -> Token
276- # (bat, dai , 1_000_000_000 * ONE_WEI, None, does_not_raise),
272+ ( dai , usdc , 1_000_000_000 * ONE_WEI , None , does_not_raise ),
277273 # Token -> ETH
278- (bat , eth , 1_000_000 * ONE_WEI , None , does_not_raise ),
274+ (usdc , eth , 1_000_000 * ONE_WEI , None , does_not_raise ),
279275 # (eth, bat, 0.00001 * ONE_ETH, ZERO_ADDRESS, does_not_raise),
280276 # (bat, eth, 0.00001 * ONE_ETH, ZERO_ADDRESS, does_not_raise),
281277 # (dai, bat, 0.00001 * ONE_ETH, ZERO_ADDRESS, does_not_raise),
@@ -309,10 +305,9 @@ def test_make_trade(
309305 "input_token, output_token, qty, recipient, expectation" ,
310306 [
311307 # ETH -> Token
312- (eth , bat , 1_000_000 * ONE_WEI , None , does_not_raise ),
308+ (eth , dai , 1_000_000 * ONE_WEI , None , does_not_raise ),
313309 # Token -> Token
314- # No liquidity in V3
315- # (bat, dai, 1_000_000 * ONE_WEI, None, does_not_raise),
310+ (dai , usdc , 1_000_000 * ONE_WEI , None , does_not_raise ),
316311 # Token -> ETH
317312 (dai , eth , 1_000_000 * ONE_WEI , None , does_not_raise ),
318313 # FIXME: These should probably be uncommented eventually
0 commit comments