Skip to content

Commit

Permalink
test(starknet_api): set l1 handler tx version to default zero
Browse files Browse the repository at this point in the history
  • Loading branch information
ArniStarkware committed Dec 19, 2024
1 parent 3437855 commit e41a553
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/papyrus_rpc/src/v0_8/execution_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ async fn pending_trace_block_transactions_and_trace_transaction_execution_contex
#[test]
fn message_from_l1_to_l1_handler_tx() {
let l1_handler_tx = L1HandlerTransaction::from(MESSAGE_FROM_L1.clone());
assert_eq!(l1_handler_tx.version, TransactionVersion::ONE);
assert_eq!(l1_handler_tx.version, L1HandlerTransaction::VERSION);
assert_eq!(l1_handler_tx.contract_address, *CONTRACT_ADDRESS);
assert_eq!(l1_handler_tx.entry_point_selector, selector_from_name("l1_handle"));
// The first item of calldata is the from_address.
Expand Down
2 changes: 1 addition & 1 deletion crates/papyrus_rpc/src/v0_8/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ impl From<MessageFromL1> for L1HandlerTransaction {
calldata.extend_from_slice(&message.payload.0);
let calldata = Calldata(Arc::new(calldata));
Self {
version: TransactionVersion::ONE,
version: L1HandlerTransaction::VERSION,
contract_address: message.to_address,
entry_point_selector: message.entry_point_selector,
calldata,
Expand Down
2 changes: 1 addition & 1 deletion crates/starknet_api/src/test_utils/l1_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct L1HandlerTxArgs {
impl Default for L1HandlerTxArgs {
fn default() -> Self {
L1HandlerTxArgs {
version: TransactionVersion::THREE,
version: L1HandlerTransaction::VERSION,
nonce: Nonce::default(),
contract_address: ContractAddress::default(),
entry_point_selector: EntryPointSelector::default(),
Expand Down

0 comments on commit e41a553

Please sign in to comment.