From ad5e86b904c10028c41feac8e0a95ce28c830890 Mon Sep 17 00:00:00 2001 From: AvivYossef-starkware Date: Wed, 25 Dec 2024 10:29:51 +0200 Subject: [PATCH] refactor(blockifier): revert contract test --- .../syscalls/syscall_tests/call_contract.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs index a01ecdb700..0700db9099 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs @@ -40,8 +40,7 @@ fn test_call_contract_that_panics(runnable_version: RunnableCairo1) { let to_panic = true.into(); let outer_entry_point_selector = selector_from_name("test_call_contract_revert"); let calldata = create_calldata( - FeatureContract::TestContract(CairoVersion::Cairo1(RunnableCairo1::Casm)) - .get_instance_address(0), + test_contract.get_instance_address(0), "test_revert_helper", &[new_class_hash.0, to_panic], ); @@ -95,18 +94,16 @@ fn test_call_contract_and_than_revert(#[case] runnable_version: RunnableCairo1) let new_class_hash = empty_contract.get_class_hash(); let to_panic = false.into(); - // Call data of contract B + // Calldata of contract B let middle_call_data = create_calldata( - FeatureContract::TestContract(CairoVersion::Cairo1(RunnableCairo1::Casm)) - .get_instance_address(0), + test_contract.get_instance_address(0), "test_revert_helper", &[new_class_hash.0, to_panic], ); - // Call data of contract A + // Calldata of contract A let calldata = create_calldata( - FeatureContract::TestContract(CairoVersion::Cairo1(RunnableCairo1::Casm)) - .get_instance_address(0), + test_contract.get_instance_address(0), "middle_revert_contract", &middle_call_data.0, );