Skip to content

Commit

Permalink
addressing stale comments
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Oct 31, 2024
1 parent d10d92f commit 53c154c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,8 @@ contract Token {
finalization_payload.emit();
}

// Transfers token `amount` from public balance of message sender to a private balance of `to`.
/// Mints token `amount` to a private balance of `to`. Message sender has to have minter permissions (checked
/// in the enqueud call).
#[private]
fn mint_to_private(to: AztecAddress, amount: Field) {
let from = context.msg_sender();
Expand All @@ -610,7 +611,8 @@ contract Token {
let hiding_point_slot = _prepare_transfer_to_private(to, &mut context, storage);

// At last we finalize the mint. Usage of the `unsafe` method here is safe because we set the `from`
// function argument to a message sender, guaranteeing that he can transfer only his own tokens.
// function argument to a message sender, guaranteeing that only a message sender with minter permissions
// can successfully execute the function.
token._finalize_mint_to_private_unsafe(from, amount, hiding_point_slot).enqueue(&mut context);
}

Expand Down

0 comments on commit 53c154c

Please sign in to comment.