MCPcopy Create free account
hub / github.com/EnsoBuild/temper / post_simulate_invalid_data

Function post_simulate_invalid_data

tests/api.rs:487–515  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

485
486#[tokio::test(flavor = "multi_thread")]
487async fn post_simulate_invalid_data() {
488 let filter = filter(config());
489
490 let json = serde_json::json!({
491 "chainId": 1,
492 "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
493 "to": "0x66fc62c1748e45435b06cf8dd105b73e9855f93e",
494 "data": "0xffa2ca3b44eea7c8e659973cbdf476546e9e6adfd1c580700537e52ba7124933a97904ea000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001d0e30db00300ffffffffffffc02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000186a",
495 "gasLimit": 500000,
496 "value": "100000",
497 "blockNumber": 16784600
498 });
499
500 let res = warp::test::request()
501 .method("POST")
502 .path("/simulate")
503 .json(&json)
504 .reply(&filter)
505 .await;
506
507 assert_eq!(res.status(), 400);
508
509 let body: ErrorMessage = serde_json::from_slice(res.body()).unwrap();
510
511 assert_eq!(
512 body.message,
513 "BAD REQUEST: Odd number of digits at line 1 column 709".to_string()
514 );
515}
516
517#[tokio::test(flavor = "multi_thread")]
518async fn post_simulate_bundle_multiple_block_numbers() {

Callers

nothing calls this directly

Calls 2

filterFunction · 0.85
configFunction · 0.85

Tested by

no test coverage detected