Skip to content

Commit

Permalink
test: use the exeutable tx creator test util for the account tx creat…
Browse files Browse the repository at this point in the history
…or test util
  • Loading branch information
ArniStarkware committed Nov 18, 2024
1 parent 13c0170 commit d99efc2
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions crates/blockifier/src/test_utils/invoke.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
use starknet_api::executable_transaction::{
AccountTransaction as ExecutableTransaction,
InvokeTransaction as ExecutableInvokeTransaction,
};
use starknet_api::test_utils::invoke::InvokeTxArgs;
use starknet_api::executable_transaction::AccountTransaction as ExecutableTransaction;
use starknet_api::test_utils::invoke::{executable_invoke_tx, InvokeTxArgs};

use crate::transaction::account_transaction::AccountTransaction;

pub fn invoke_tx(invoke_args: InvokeTxArgs) -> AccountTransaction {
let tx_hash = invoke_args.tx_hash;
let only_query = invoke_args.only_query;
let invoke_tx = starknet_api::test_utils::invoke::invoke_tx(invoke_args);

let invoke_tx =
ExecutableTransaction::Invoke(ExecutableInvokeTransaction { tx: invoke_tx, tx_hash });
let invoke_tx = ExecutableTransaction::Invoke(executable_invoke_tx(invoke_args));

match only_query {
true => AccountTransaction::new_for_query(invoke_tx),
Expand Down

0 comments on commit d99efc2

Please sign in to comment.