Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/blockifier/src/bouncer_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -776,11 +776,11 @@ fn class_hash_migration_data_from_state(

if should_migrate {
expect![[r#"
102995104
104821282
"#]]
.assert_debug_eq(&migration_sierra_gas.0);
expect![[r#"
250765450
255209630
"#]]
.assert_debug_eq(&migration_proving_gas.0);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,20 @@ fn test_call_contract_that_panics(runnable_version: RunnableCairo1) {

let new_class_hash = empty_contract.get_class_hash();
let to_panic = true.into();
let is_meta_tx = false.into();
let outer_entry_point_selector = selector_from_name("test_call_contract_revert");
let calldata = create_calldata(
test_contract.get_instance_address(0),
"test_revert_helper",
&[new_class_hash.0, to_panic],
let inner_calldata_args = &[new_class_hash.0, to_panic];
let calldata = Calldata::from(
[
vec![
**test_contract.get_instance_address(0),
selector_from_name("test_revert_helper").0,
inner_calldata_args.len().into(),
],
inner_calldata_args.to_vec(),
vec![is_meta_tx],
]
.concat(),
);
let entry_point_call = CallEntryPoint {
entry_point_selector: outer_entry_point_selector,
Expand Down Expand Up @@ -97,10 +106,18 @@ fn test_call_contract_and_than_revert(#[case] runnable_version: RunnableCairo1)
);

// Calldata of contract A
let calldata = create_calldata(
test_contract.get_instance_address(0),
"middle_revert_contract",
&middle_call_data.0,
let is_meta_tx = false.into();
let calldata = Calldata::from(
[
vec![
**test_contract.get_instance_address(0),
selector_from_name("middle_revert_contract").0,
middle_call_data.0.len().into(),
],
middle_call_data.0.to_vec(),
vec![is_meta_tx],
]
.concat(),
);

// Create the entry point call to contract A.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2122,23 +2122,25 @@ fn test_call_contract_that_panics(

let new_class_hash = FeatureContract::TestContract(cairo_version).get_class_hash();
let to_panic = true.into();
let meta_tx = false.into();

let calldata = [
*contract_address.0.key(),
selector_from_name(inner_selector).0,
felt!(2_u8),
new_class_hash.0,
to_panic,
meta_tx,
];

// Invoke a function that changes the state and reverts.
let tx_args = invoke_tx_args! {
sender_address: account_address,
calldata: create_calldata(
contract_address,
"test_call_contract_revert",
&calldata
),
"test_call_contract_revert",
&calldata
),
nonce: nonce_manager.next(account_address)
};
let tx_execution_info = run_invoke_tx(
Expand Down
Loading
Loading