Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ impl EasyPrivateUint {

// Very similar to `value_note::utils::increment`.
pub fn add(self, addend: u64, owner: AztecAddress) {
assert(self.context.public.is_none(), "EasyPrivateUint::add can be called from private only.");

// Creates new note for the owner.
let mut addend_note = ValueNote::new(addend as Field, owner);

Expand All @@ -31,6 +33,8 @@ impl EasyPrivateUint {

// Very similar to `value_note::utils::decrement`.
pub fn sub(self, subtrahend: u64, owner: AztecAddress) {
assert(self.context.public.is_none(), "EasyPrivateUint::sub can be called from private only.");

// docs:start:get_notes
let options = NoteGetterOptions::with_filter(filter_notes_min_sum, subtrahend as Field);
let maybe_notes = self.set.get_notes(options);
Expand Down