From 8f82ab864bba3e3d42ee2b3a705806ba536cf721 Mon Sep 17 00:00:00 2001 From: t00ts Date: Fri, 10 Jan 2025 12:05:01 +0400 Subject: [PATCH] chore(rpc): fix `test_multiple_transactions` for rpc `v08` --- crates/rpc/src/method/simulate_transactions.rs | 11 +++++++---- crates/rpc/src/method/trace_block_transactions.rs | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/crates/rpc/src/method/simulate_transactions.rs b/crates/rpc/src/method/simulate_transactions.rs index 946021fcdf..cf6dcc5635 100644 --- a/crates/rpc/src/method/simulate_transactions.rs +++ b/crates/rpc/src/method/simulate_transactions.rs @@ -741,7 +741,7 @@ pub(crate) mod tests { l1_gas: 0, l1_data_gas: 192, }, - l1_gas: 0, + l1_gas: 878, l1_data_gas: 192, l2_gas: 0, }, @@ -1004,7 +1004,7 @@ pub(crate) mod tests { l1_gas: 0, l1_data_gas: 224, }, - l1_gas: 0, + l1_gas: 16, l1_data_gas: 224, l2_gas: 0, }, @@ -1415,7 +1415,7 @@ pub(crate) mod tests { l1_gas: 0, l1_data_gas: 128, }, - l1_gas: 0, + l1_gas: 12, l1_data_gas: 128, l2_gas: 0, }, @@ -1645,7 +1645,10 @@ pub(crate) mod tests { ..Default::default() }, execution_resources: - pathfinder_executor::types::InnerCallExecutionResources::default(), + pathfinder_executor::types::InnerCallExecutionResources { + l1_gas: 12840, + ..Default::default() + }, }], class_hash: Some(DUMMY_ACCOUNT_CLASS_HASH.0), entry_point_type: pathfinder_executor::types::EntryPointType::External, diff --git a/crates/rpc/src/method/trace_block_transactions.rs b/crates/rpc/src/method/trace_block_transactions.rs index 99a38a32f4..3444961083 100644 --- a/crates/rpc/src/method/trace_block_transactions.rs +++ b/crates/rpc/src/method/trace_block_transactions.rs @@ -769,6 +769,7 @@ pub(crate) mod tests { include_state_diffs: true, }; + // V07 pretty_assertions_sorted::assert_eq!( output .serialize(Serializer { @@ -781,6 +782,20 @@ pub(crate) mod tests { }) .unwrap(), ); + + // V08 + pretty_assertions_sorted::assert_eq!( + output + .serialize(Serializer { + version: RpcVersion::V08, + }) + .unwrap(), + expected + .serialize(Serializer { + version: RpcVersion::V08, + }) + .unwrap(), + ); Ok(()) }