Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions noir-projects/aztec-nr/aztec/src/note/note_metadata.nr
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,21 @@ impl NoteMetadata {
}
}

/// Returns true if the note is pending **and** from the same phase, i.e. if it's been created in the current
/// Returns `true` if the note is pending **and** from the same phase, i.e. if it's been created in the current
/// transaction during the current execution phase (either non-revertible or revertible).
pub fn is_pending_same_phase(self) -> bool {
self.stage == NoteStage.PENDING_SAME_PHASE
}

/// Returns true if the note is pending **and** from the previous phase, i.e. if it's been created in the current
/// Returns `true` if the note is pending **and** from the previous phase, i.e. if it's been created in the current
/// transaction during an execution phase prior to the current one. Because private execution only has two phases
/// with strict ordering, this implies that the note was created in the non-revertible phase, and that the current
/// phase is the revertible phase.
pub fn is_pending_previous_phase(self) -> bool {
self.stage == NoteStage.PENDING_PREVIOUS_PHASE
}

/// Returns true if the note is settled, i.e. if it's been created in a prior transaction and is therefore already
/// Returns `true` if the note is settled, i.e. if it's been created in a prior transaction and is therefore already
/// in the note hash tree.
pub fn is_settled(self) -> bool {
self.stage == NoteStage.SETTLED
Expand Down
4 changes: 2 additions & 2 deletions noir-projects/aztec-nr/aztec/src/oracle/nullifiers.nr
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub fn notify_created_nullifier(inner_nullifier: Field) {
#[oracle(aztec_prv_notifyCreatedNullifier)]
unconstrained fn notify_created_nullifier_oracle(_inner_nullifier: Field) {}

/// Returns true if the nullifier has been emitted in the same transaction, i.e. if [`notify_created_nullifier`] has
/// Returns `true` if the nullifier has been emitted in the same transaction, i.e. if [`notify_created_nullifier`] has
/// been
/// called for this inner nullifier from the contract with the specified address.
///
Expand All @@ -29,7 +29,7 @@ pub unconstrained fn is_nullifier_pending(inner_nullifier: Field, contract_addre
#[oracle(aztec_prv_isNullifierPending)]
unconstrained fn is_nullifier_pending_oracle(_inner_nullifier: Field, _contract_address: AztecAddress) -> bool {}

/// Returns true if the nullifier exists. Note that a `true` value can be constrained by proving existence of the
/// Returns `true` if the nullifier exists. Note that a `true` value can be constrained by proving existence of the
/// nullifier, but a `false` value should not be relied upon since other transactions may emit this nullifier before
/// the current transaction is included in a block. While this might seem of little use at first, certain design
/// patterns benefit from this abstraction (see e.g. `PrivateMutable`).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ where
self.compute_initialization_nullifier(secret)
}

/// Returns whether this PrivateImmutable has been initialized.
/// Returns `true` if this PrivateImmutable has been initialized.
pub unconstrained fn is_initialized(self) -> bool {
let nullifier = self.get_initialization_nullifier();
check_nullifier_exists(nullifier)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ impl<T> PublicImmutable<T, PublicContext> {
WithHash::public_storage_read(self.context, self.storage_slot)
}

/// Returns true if the `PublicImmutable` has been initialized.
/// Returns `true` if the `PublicImmutable` has been initialized.
///
/// ## Examples:
///
Expand Down Expand Up @@ -263,7 +263,7 @@ impl<T> PublicImmutable<T, UtilityContext> {
WithHash::utility_public_storage_read(self.context, self.storage_slot)
}

/// Returns true if the `PublicImmutable` has been initialized.
/// Returns `true` if the `PublicImmutable` has been initialized.
pub unconstrained fn is_initialized(self) -> bool {
let nullifier = self.compute_initialization_inner_nullifier();
check_nullifier_exists(nullifier)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ where
self.compute_initialization_nullifier(secret)
}

/// Returns whether this SinglePrivateImmutable has been initialized.
/// Returns `true` if this SinglePrivateImmutable has been initialized.
pub unconstrained fn is_initialized(self) -> bool {
let nullifier = self.get_initialization_nullifier();
check_nullifier_exists(nullifier)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ where
self.compute_initialization_nullifier(secret)
}

/// Returns whether this SinglePrivateImmutable has been initialized.
/// Returns `true` if this SinglePrivateMutable has been initialized.
pub unconstrained fn is_initialized(self) -> bool {
let nullifier = self.get_initialization_nullifier();
check_nullifier_exists(nullifier)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl SingleUseClaim<&mut PrivateContext> {
}

impl SingleUseClaim<UtilityContext> {
/// Returns whether an owner has claimed this single use claim.
/// Returns `true` if an owner has claimed this single use claim.
pub unconstrained fn has_claimed(self) -> bool {
let owner_nhk_app = get_nhk_app(get_public_keys(self.owner).npk_m.hash());
check_nullifier_exists(self.compute_nullifier(owner_nhk_app))
Expand Down
Loading