-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Option<T>
type to Noir Contracts stdlib
#1020
Comments
noir-lang/noir#1781 (comment) <-- recommendation from Jake |
6 tasks
iAmMichaelConnor
added a commit
that referenced
this issue
Aug 1, 2023
# Description closes: #1020 Introduce `Option<T>` type to Noir. Update `get_notes` logic: - Remove the `is_real` member of some notes. `Option::is_some()` can now be used instead. - Remove the `is_dummy` method of the `NoteInterface`. - When calling the `get_notes` oracle, a boolean `is_some` is injected after the `nonce` to convey whether the note is a dummy or not. - Change contract logic to `unwrap` `Option<Note>` types. It's slightly more verbose in places, but it makes the notion of a dummy note more enshrined (and actually aligns more closely to our inital sketches of what utxo syntax might look like). Thanks to Jake for the Option implementation!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This would make the syntax for getting dummy notes tidier and uniform across apps and across custom note implementations.
I believe there's a PR in Noir to introduce this type.
The text was updated successfully, but these errors were encountered: