Skip to content

Commit

Permalink
Add comment for ENTRY_POINT_INITIAL_BUDGET refund. (#6363)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyalesokhin-starkware authored Sep 8, 2024
1 parent e058c57 commit d248e2b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/cairo-lang-runner/src/casm_run/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,8 @@ impl<'a> CairoHintProcessor<'a> {
.run_function_with_starknet_context(
function,
&[Arg::Array(calldata.into_iter().map(Arg::Value).collect())],
// The costs of the relevant syscall include `ENTRY_POINT_INITIAL_BUDGET` so we
// need to refund it here before running the entry point to avoid double charging.
Some(*gas_counter + gas_costs::ENTRY_POINT_INITIAL_BUDGET),
self.starknet_state.clone(),
)
Expand Down

0 comments on commit d248e2b

Please sign in to comment.