@@ -739,7 +739,10 @@ mod tests {
739739 . await
740740 . unwrap( )
741741 . pair_provider,
742- base_tokens: base_tokens. to_vec( ) ,
742+ base_tokens: base_tokens
743+ . iter( )
744+ . map( |token| token. into_legacy( ) )
745+ . collect:: <Vec <_>>( ) ,
743746 } ) ,
744747 Arc :: new( UniswapLikePairProviderFinder {
745748 inner: uniswap_v2:: UniV2BaselineSourceParameters :: from_baseline_source(
@@ -751,7 +754,10 @@ mod tests {
751754 . await
752755 . unwrap( )
753756 . pair_provider,
754- base_tokens: base_tokens. to_vec( ) ,
757+ base_tokens: base_tokens
758+ . iter( )
759+ . map( |token| token. into_legacy( ) )
760+ . collect:: <Vec <_>>( ) ,
755761 } ) ,
756762 Arc :: new( BalancerVaultFinder (
757763 BalancerV2Vault :: Instance :: deployed( & web3. alloy)
@@ -763,7 +769,10 @@ mod tests {
763769 IUniswapV3Factory :: Instance :: deployed( & web3. alloy)
764770 . await
765771 . unwrap( ) ,
766- base_tokens. to_vec( ) ,
772+ base_tokens
773+ . iter( )
774+ . map( |token| token. into_legacy( ) )
775+ . collect:: <Vec <_>>( ) ,
767776 FeeValues :: Static ,
768777 )
769778 . await
@@ -782,7 +791,7 @@ mod tests {
782791
783792 println ! ( "testing good tokens" ) ;
784793 for & token in base_tokens {
785- let result = token_cache. detect ( token) . await ;
794+ let result = token_cache. detect ( token. into_legacy ( ) ) . await ;
786795 println ! ( "token {token:?} is {result:?}" ) ;
787796 }
788797
@@ -798,7 +807,7 @@ mod tests {
798807 async fn mainnet_univ3 ( ) {
799808 observe:: tracing:: initialize ( & observe:: Config :: default ( ) . with_env_filter ( "shared=debug" ) ) ;
800809 let web3 = Web3 :: new_from_env ( ) ;
801- let base_tokens = vec ! [ testlib:: tokens:: WETH ] ;
810+ let base_tokens = vec ! [ testlib:: tokens:: WETH . into_legacy ( ) ] ;
802811 let settlement = GPv2Settlement :: Instance :: deployed ( & web3. alloy )
803812 . await
804813 . unwrap ( ) ;
@@ -817,7 +826,9 @@ mod tests {
817826 } ) ;
818827 let token_cache = TraceCallDetector :: new ( web3, settlement. address ( ) . into_legacy ( ) , finder) ;
819828
820- let result = token_cache. detect ( testlib:: tokens:: USDC ) . await ;
829+ let result = token_cache
830+ . detect ( testlib:: tokens:: USDC . into_legacy ( ) )
831+ . await ;
821832 dbg ! ( & result) ;
822833 assert ! ( result. unwrap( ) . is_good( ) ) ;
823834
0 commit comments