aztec-nr - noir_aztec::macros::functions::initialization_utils

Function mark_as_initialized_from_private_initializer

pub fn mark_as_initialized_from_private_initializer(
    context: &mut PrivateContext,
    emit_public_init_nullifier: bool,
)

Emits the private initialization nullifier and, if relevant, enqueues the emission of the public one.

If the contract has public functions that perform initialization checks (i.e. that don't have #[noinitcheck]), this also enqueues a call to the auto-generated __emit_public_init_nullifier function so the public initialization nullifier is emitted in public. Called by private initializer macros.