Skip to content

Commit 0cf5508

Browse files
starknet_os_flow_tests: run cairo0 contract in diff scenario (#9432)
1 parent 40e064c commit 0cf5508

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

crates/starknet_os_flow_tests/src/test_manager.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,9 @@ impl<S: FlowTestState> TestManager<S> {
560560
pub fn block_context_for_flow_tests(block_number: BlockNumber, use_kzg_da: bool) -> BlockContext {
561561
let fee_token_addresses = FeeTokenAddresses {
562562
strk_fee_token_address: *STRK_FEE_TOKEN_ADDRESS,
563-
eth_fee_token_address: ContractAddress::default(),
563+
// Reuse the same token address for ETH fee token, for ease of testing (only need to fund
564+
// accounts with one token to send deprecated declares).
565+
eth_fee_token_address: *STRK_FEE_TOKEN_ADDRESS,
564566
};
565567
BlockContext::new(
566568
BlockInfo { block_number, use_kzg_da, ..BlockInfo::create_for_testing() },

crates/starknet_os_flow_tests/src/tests.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,18 @@ async fn declare_deploy_scenario(
183183
async fn trivial_diff_scenario(
184184
#[values(false, true)] use_kzg_da: bool,
185185
#[values(false, true)] full_output: bool,
186+
#[values(
187+
FeatureContract::TestContract(CairoVersion::Cairo0),
188+
FeatureContract::TestContract(CairoVersion::Cairo1(RunnableCairo1::Casm))
189+
)]
190+
test_contract: FeatureContract,
186191
) {
187192
// Initialize the test manager with a default initial state and get the nonce manager to help
188193
// keep track of nonces.
189194

190195
let (mut test_manager, mut nonce_manager, [test_contract_address]) =
191196
TestManager::<DictStateReader>::new_with_default_initial_state([(
192-
FeatureContract::TestContract(CairoVersion::Cairo1(RunnableCairo1::Casm)),
197+
test_contract,
193198
calldata![Felt::ONE, Felt::TWO],
194199
)])
195200
.await;

0 commit comments

Comments
 (0)