File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ mod tests {
167167 async fn test_get_amm_data_batch_request ( ) {
168168 // Get RPC URL from environment variable, or use default
169169 dotenv:: dotenv ( ) . ok ( ) ;
170- let provider = get_basic_provider ( Chain :: from_named ( NamedChain :: Base ) ) . await ;
170+ let provider = Arc :: new ( get_basic_provider ( Chain :: from_named ( NamedChain :: Base ) ) . await ) ;
171171
172172 // Create a test pool
173173 let pool_address = Address :: from_str ( WETH_USDC ) . expect ( "Invalid address" ) ;
Original file line number Diff line number Diff line change @@ -811,16 +811,16 @@ pub fn q64_to_f64(x: u128) -> f64 {
811811#[ cfg( test) ]
812812mod tests {
813813 use super :: * ;
814- use provider:: get_anvil_signer_provider ;
814+ use provider:: get_anvil_provider_arc ;
815815 use std:: str:: FromStr ;
816816
817817 #[ tokio:: test]
818818 async fn test_stable_swap_calculations ( ) -> Result < ( ) , AMMError > {
819819 // Setup
820- let provider = get_anvil_signer_provider ( ) . await ;
820+ let provider = get_anvil_provider_arc ( ) . await ;
821821 let pool_address = Address :: from_str ( "0x6d0b9C9E92a3De30081563c3657B5258b3fFa38B" ) . unwrap ( ) ;
822822
823- let pool = Ve33Pool :: new_from_address ( pool_address, 10 , Arc :: new ( provider. clone ( ) ) ) . await ?;
823+ let pool = Ve33Pool :: new_from_address ( pool_address, 10 , provider) . await ?;
824824
825825 let amount_in_1 = U256 :: from ( 1000000000 ) ;
826826
@@ -854,12 +854,11 @@ mod tests {
854854 #[ tokio:: test]
855855 async fn test_volatile_swap_calculations ( ) -> Result < ( ) , AMMError > {
856856 // Setup
857- let provider = get_anvil_signer_provider ( ) . await ;
857+ let provider = get_anvil_provider_arc ( ) . await ;
858858 // WETH/fBOMB pool
859859 let pool_address = Address :: from_str ( "0x4f9dc2229f2357b27c22db56cb39582c854ad6d5" ) . unwrap ( ) ;
860860
861- let pool =
862- Ve33Pool :: new_from_address ( pool_address, 300 , Arc :: new ( provider. clone ( ) ) ) . await ?;
861+ let pool = Ve33Pool :: new_from_address ( pool_address, 300 , provider) . await ?;
863862
864863 let amount_in_0 = U256 :: from ( 1000000000 ) ; // WETH amount
865864 let amount_out_1 = pool
You can’t perform that action at this time.
0 commit comments