Skip to content

Commit

Permalink
chore: align test util executable_declare_tx with account tx counterp…
Browse files Browse the repository at this point in the history
…art (#779)
  • Loading branch information
ArniStarkware authored Sep 15, 2024
1 parent 231ed6f commit 7c12924
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions crates/starknet_api/src/test_utils/declare.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::contract_class::ClassInfo;
use crate::core::{ChainId, ClassHash, CompiledClassHash, ContractAddress, Nonce};
use crate::core::{ClassHash, CompiledClassHash, ContractAddress, Nonce};
use crate::data_availability::DataAvailabilityMode;
use crate::executable_transaction::DeclareTransaction as ExecutableDeclareTransaction;
use crate::transaction::{
Expand All @@ -12,7 +12,6 @@ use crate::transaction::{
PaymasterData,
Tip,
TransactionHash,
TransactionHasher,
TransactionSignature,
TransactionVersion,
ValidResourceBounds,
Expand Down Expand Up @@ -125,10 +124,7 @@ pub fn executable_declare_tx(
declare_tx_args: DeclareTxArgs,
class_info: ClassInfo,
) -> ExecutableDeclareTransaction {
let transaction_version = declare_tx_args.version;
let tx_hash = declare_tx_args.tx_hash;
let tx = declare_tx(declare_tx_args);
let tx_hash = tx
.calculate_transaction_hash(&ChainId::create_for_testing(), &transaction_version)
.unwrap();
ExecutableDeclareTransaction { tx, tx_hash, class_info }
}

0 comments on commit 7c12924

Please sign in to comment.