Skip to content

Commit

Permalink
Fix: update ENTER_CALL hint
Browse files Browse the repository at this point in the history
The signature of enter_call was updated to rename the parameter. This
does not alter the behavior of the hint.
  • Loading branch information
odesenfans committed Aug 30, 2024
1 parent 0fcfdbc commit d94ac29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 7 additions & 4 deletions crates/starknet-os/src/hints/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,11 @@ where
execute_coroutine(end_tx_async::<PCS>(exec_scopes))?
}

#[rustfmt::skip]
pub const ENTER_CALL: &str = indoc! {r#"
execution_helper.enter_call(
execution_info_ptr=ids.execution_context.execution_info.address_)"#
};
execution_helper.enter_call(
cairo_execution_info=ids.execution_context.execution_info)"#};

pub async fn enter_call_async<PCS>(
vm: &mut VirtualMachine,
exec_scopes: &mut ExecutionScopes,
Expand All @@ -492,7 +493,9 @@ where
PCS: PerContractStorage + 'static,
{
let execution_info_ptr = vm.get_relocatable(
(get_ptr_from_var_name(vars::ids::EXECUTION_CONTEXT, vm, ids_data, ap_tracking)? + 4i32).unwrap(),
(get_ptr_from_var_name(vars::ids::EXECUTION_CONTEXT, vm, ids_data, ap_tracking)?
+ ExecutionContext::execution_info_offset())
.unwrap(),
)?;

let execution_helper = exec_scopes.get::<ExecutionHelperWrapper<PCS>>(vars::scopes::EXECUTION_HELPER)?;
Expand Down
4 changes: 0 additions & 4 deletions crates/starknet-os/src/hints/unimplemented.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ output = sha2_compress_function(IV, w)
padding = (message + IV + output) * number_of_missing_blocks
segments.write_arg(ids.sha256_ptr_end, padding)"#};

#[allow(unused)]
pub const HINT_2: &str = indoc! {r#"execution_helper.enter_call(
cairo_execution_info=ids.execution_context.execution_info)"#};

#[allow(unused)]
pub const HINT_3: &str = indoc! {r#"memory[ap] = to_felt_or_relocatable(os_input.prev_block_hash)"#};

Expand Down

0 comments on commit d94ac29

Please sign in to comment.