-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: set tx_hash as default in create declare tx for testing
- Loading branch information
1 parent
ae4ae2f
commit 210e0d6
Showing
2 changed files
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
use starknet_api::test_utils::declare::DeclareTxArgs; | ||
use starknet_api::transaction::TransactionHash; | ||
|
||
use crate::execution::contract_class::ClassInfo; | ||
use crate::transaction::account_transaction::AccountTransaction; | ||
use crate::transaction::transactions::DeclareTransaction; | ||
|
||
pub fn declare_tx(declare_tx_args: DeclareTxArgs, class_info: ClassInfo) -> AccountTransaction { | ||
let tx_hash = declare_tx_args.tx_hash; | ||
let default_tx_hash = TransactionHash::default(); | ||
let declare_tx = starknet_api::test_utils::declare::declare_tx(declare_tx_args); | ||
|
||
AccountTransaction::Declare(DeclareTransaction::new(declare_tx, tx_hash, class_info).unwrap()) | ||
AccountTransaction::Declare( | ||
DeclareTransaction::new(declare_tx, default_tx_hash, class_info).unwrap(), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters