Skip to content

Commit

Permalink
Set function internal flag based on attribute during macro run
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino committed Mar 4, 2024
1 parent bd4b955 commit e3130fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion noir/noir-repo/aztec_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -684,10 +684,11 @@ fn transform_function(
let inputs_name = format!("{}ContextInputs", ty);
let return_type_name = format!("{}CircuitPublicInputs", ty);

// Add check that msg sender equals this address
// Add check that msg sender equals this address and flag function as internal
if is_internal {
let is_internal_check = create_internal_check(func.name());
func.def.body.0.insert(0, is_internal_check);
func.def.is_internal = true;
}

// Add initialization check
Expand Down

0 comments on commit e3130fd

Please sign in to comment.