Skip to content

Commit 4f3af3f

Browse files
starknet_os_flow_tests: migrate test_new_class_flow
1 parent 4a982ca commit 4f3af3f

File tree

5 files changed

+591
-4
lines changed

5 files changed

+591
-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
@@ -31,7 +31,7 @@ use starknet_api::invoke_tx_args;
3131
use starknet_api::state::{SierraContractClass, StorageKey};
3232
use starknet_api::test_utils::invoke::{invoke_tx, InvokeTxArgs};
3333
use starknet_api::test_utils::{NonceManager, CHAIN_ID_FOR_TESTS};
34-
use starknet_api::transaction::fields::Calldata;
34+
use starknet_api::transaction::fields::{Calldata, Tip};
3535
use starknet_api::transaction::MessageToL1;
3636
use starknet_committer::block_committer::input::{IsSubset, StarknetStorageKey, StateDiff};
3737
use starknet_os::hints::hint_implementation::state_diff_encryption::utils::compute_public_keys;
@@ -394,6 +394,11 @@ impl<S: FlowTestState> TestManager<S> {
394394
});
395395
}
396396

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

0 commit comments

Comments
 (0)