Skip to content

Commit 0903cff

Browse files
starknet_os_flow_tests: migrate test_new_class_flow
1 parent 26b8f8b commit 0903cff

File tree

5 files changed

+594
-4
lines changed

5 files changed

+594
-4
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/starknet_os_flow_tests/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ assert_matches.workspace = true
1010
blockifier = { workspace = true, features = ["testing"] }
1111
blockifier_test_utils.workspace = true
1212
cairo-lang-starknet-classes.workspace = true
13+
cairo-vm.workspace = true
14+
expect-test.workspace = true
1315
itertools.workspace = true
1416
rstest.workspace = true
1517
serde_json.workspace = true

crates/starknet_os_flow_tests/src/test_manager.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use starknet_api::invoke_tx_args;
3232
use starknet_api::state::{SierraContractClass, StorageKey};
3333
use starknet_api::test_utils::invoke::{invoke_tx, InvokeTxArgs};
3434
use starknet_api::test_utils::{NonceManager, CHAIN_ID_FOR_TESTS};
35-
use starknet_api::transaction::fields::Calldata;
35+
use starknet_api::transaction::fields::{Calldata, Tip};
3636
use starknet_api::transaction::MessageToL1;
3737
use starknet_committer::block_committer::input::{IsSubset, StarknetStorageKey, StateDiff};
3838
use starknet_os::hints::hint_implementation::state_diff_encryption::utils::compute_public_keys;
@@ -393,6 +393,11 @@ impl<S: FlowTestState> TestManager<S> {
393393
});
394394
}
395395

396+
pub(crate) fn add_fund_address_tx_with_default_amount(&mut self, address: ContractAddress) {
397+
let transfer_amount = 2 * NON_TRIVIAL_RESOURCE_BOUNDS.max_possible_fee(Tip(0)).0;
398+
self.add_fund_address_tx(address, transfer_amount);
399+
}
400+
396401
pub(crate) fn add_fund_address_tx(&mut self, address: ContractAddress, amount: u128) {
397402
let calldata = create_calldata(
398403
*STRK_FEE_TOKEN_ADDRESS,

0 commit comments

Comments
 (0)