Skip to content

Commit

Permalink
refactor(blockifier): revert contract test
Browse files Browse the repository at this point in the history
  • Loading branch information
AvivYossef-starkware committed Dec 25, 2024
1 parent 3ee6e46 commit ad5e86b
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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],
);
Expand Down Expand Up @@ -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,
);
Expand Down

0 comments on commit ad5e86b

Please sign in to comment.