From b1804bb4e80d1cec0a0bf397d2e1a94beb89c6e9 Mon Sep 17 00:00:00 2001 From: giladchase Date: Sun, 14 Jul 2024 15:35:01 +0300 Subject: [PATCH] refactor: move deploy_account_tx next to peers (#458) Moved next to similar constructors `invoke_tx()` and `declare_tx()`. NOTE: Only move, no internal changes. Co-Authored-By: Gilad Chase --- .../src/starknet_api_test_utils.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/mempool_test_utils/src/starknet_api_test_utils.rs b/crates/mempool_test_utils/src/starknet_api_test_utils.rs index 60e2342e9..3177a09bd 100644 --- a/crates/mempool_test_utils/src/starknet_api_test_utils.rs +++ b/crates/mempool_test_utils/src/starknet_api_test_utils.rs @@ -119,6 +119,15 @@ pub fn invoke_tx(cairo_version: CairoVersion) -> RPCTransaction { .generate_default_invoke() } +// TODO(Yael 18/6/2024): Get a final decision from product whether to support Cairo0. +pub fn deploy_account_tx() -> RPCTransaction { + let default_account = FeatureContract::AccountWithoutValidations(CairoVersion::Cairo1); + + MultiAccountTransactionGenerator::new_for_account_contracts([default_account]) + .account_with_id(0) + .generate_default_deploy_account() +} + // TODO: when moving this to Starknet API crate, move this const into a module alongside // MultiAcconutTransactionGenerator. type AccountId = u16; @@ -472,15 +481,6 @@ pub fn external_tx_to_json(tx: &RPCTransaction) -> String { to_string_pretty(&tx_json).expect("Failed to serialize transaction") } -// TODO(Yael 18/6/2024): Get a final decision from product whether to support Cairo0. -pub fn deploy_account_tx() -> RPCTransaction { - let default_account = FeatureContract::AccountWithoutValidations(CairoVersion::Cairo1); - - MultiAccountTransactionGenerator::new_for_account_contracts([default_account]) - .account_with_id(0) - .generate_default_deploy_account() -} - pub fn deployed_account_contract_address(deploy_tx: &RPCTransaction) -> ContractAddress { let tx = assert_matches!( deploy_tx,