Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move deploy_account_tx next to peers #458

Merged
merged 1 commit into from
Jul 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions crates/mempool_test_utils/src/starknet_api_test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
Loading