diff --git a/crates/blockifier/src/test_utils/deploy_account.rs b/crates/blockifier/src/test_utils/deploy_account.rs index ffcd247dad..092e659c86 100644 --- a/crates/blockifier/src/test_utils/deploy_account.rs +++ b/crates/blockifier/src/test_utils/deploy_account.rs @@ -1,7 +1,6 @@ use starknet_api::core::calculate_contract_address; use starknet_api::test_utils::deploy_account::DeployAccountTxArgs; use starknet_api::test_utils::NonceManager; -use starknet_api::transaction::TransactionHash; use crate::transaction::transactions::DeployAccountTransaction; @@ -9,7 +8,7 @@ pub fn deploy_account_tx( deploy_tx_args: DeployAccountTxArgs, nonce_manager: &mut NonceManager, ) -> DeployAccountTransaction { - let default_tx_hash = TransactionHash::default(); + let tx_hash = deploy_tx_args.tx_hash; let contract_address = calculate_contract_address( deploy_tx_args.contract_address_salt, deploy_tx_args.class_hash, @@ -22,5 +21,5 @@ pub fn deploy_account_tx( deploy_tx_args, nonce_manager.next(contract_address), ); - DeployAccountTransaction::new(deploy_account_tx, default_tx_hash, contract_address) + DeployAccountTransaction::new(deploy_account_tx, tx_hash, contract_address) } diff --git a/crates/blockifier/src/test_utils/invoke.rs b/crates/blockifier/src/test_utils/invoke.rs index a5898d31fb..65f032d8a2 100644 --- a/crates/blockifier/src/test_utils/invoke.rs +++ b/crates/blockifier/src/test_utils/invoke.rs @@ -1,12 +1,12 @@ use starknet_api::test_utils::invoke::InvokeTxArgs; -use starknet_api::transaction::{InvokeTransactionV0, TransactionHash, TransactionVersion}; +use starknet_api::transaction::{InvokeTransactionV0, TransactionVersion}; use crate::abi::abi_utils::selector_from_name; use crate::transaction::constants::EXECUTE_ENTRY_POINT_NAME; use crate::transaction::transactions::InvokeTransaction; pub fn invoke_tx(invoke_args: InvokeTxArgs) -> InvokeTransaction { - let default_tx_hash = TransactionHash::default(); + let tx_hash = invoke_args.tx_hash; let only_query = invoke_args.only_query; // TODO: Make TransactionVersion an enum and use match here. let invoke_tx = if invoke_args.version == TransactionVersion::ZERO { @@ -23,7 +23,7 @@ pub fn invoke_tx(invoke_args: InvokeTxArgs) -> InvokeTransaction { }; match only_query { - true => InvokeTransaction::new_for_query(invoke_tx, default_tx_hash), - false => InvokeTransaction::new(invoke_tx, default_tx_hash), + true => InvokeTransaction::new_for_query(invoke_tx, tx_hash), + false => InvokeTransaction::new(invoke_tx, tx_hash), } }