@@ -371,37 +371,31 @@ async fn post_simulate_no_data() {
371
371
372
372
#[ tokio:: test( flavor = "multi_thread" ) ]
373
373
async fn post_simulate_incorrect_chain_id ( ) {
374
- temp_env:: async_with_vars (
375
- [ (
376
- "FORK_URL" ,
377
- Some ( "https://eth-mainnet.g.alchemy.com/v2/demo" ) ,
378
- ) ] ,
379
- async {
380
- let filter = filter ( ) ;
381
-
382
- let json = serde_json:: json!( {
383
- "chainId" : 137 ,
384
- "from" : "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" ,
385
- "to" : "0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5" ,
386
- "gasLimit" : 21000 ,
387
- "value" : "100000" ,
388
- "blockNumber" : 16784600
389
- } ) ;
390
-
391
- let res = warp:: test:: request ( )
392
- . method ( "POST" )
393
- . path ( "/simulate" )
394
- . json ( & json)
395
- . reply ( & filter)
396
- . await ;
397
-
398
- assert_eq ! ( res. status( ) , 400 ) ;
399
-
400
- let body: ErrorMessage = serde_json:: from_slice ( res. body ( ) ) . unwrap ( ) ;
401
-
402
- assert_eq ! ( body. message, "INCORRECT_CHAIN_ID" . to_string( ) ) ;
403
- } ,
404
- )
374
+ temp_env:: async_with_vars ( [ ( "FORK_URL" , Some ( "https://eth.llamarpc.com" ) ) ] , async {
375
+ let filter = filter ( ) ;
376
+
377
+ let json = serde_json:: json!( {
378
+ "chainId" : 137 ,
379
+ "from" : "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" ,
380
+ "to" : "0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5" ,
381
+ "gasLimit" : 21000 ,
382
+ "value" : "100000" ,
383
+ "blockNumber" : 16784600
384
+ } ) ;
385
+
386
+ let res = warp:: test:: request ( )
387
+ . method ( "POST" )
388
+ . path ( "/simulate" )
389
+ . json ( & json)
390
+ . reply ( & filter)
391
+ . await ;
392
+
393
+ assert_eq ! ( res. status( ) , 400 ) ;
394
+
395
+ let body: ErrorMessage = serde_json:: from_slice ( res. body ( ) ) . unwrap ( ) ;
396
+
397
+ assert_eq ! ( body. message, "INCORRECT_CHAIN_ID" . to_string( ) ) ;
398
+ } )
405
399
. await ;
406
400
}
407
401
0 commit comments