feat: add aztecaddress::is_valid#21072
Merged
nventuro merged 1 commit intomerge-train/fairiesfrom Mar 5, 2026
Merged
Conversation
nchamo
approved these changes
Mar 5, 2026
| // y^2 = x^3 - 17; x = address | ||
| let x = self.inner; | ||
| let y_squared = x * x * x - 17; | ||
| /// Returns `true` if the address is valid. |
Contributor
There was a problem hiding this comment.
Ignorable nit, but I think we can make it a little clearer
Suggested change
| /// Returns `true` if the address is valid. | |
| /// Returns if the address is valid. |
or
Suggested change
| /// Returns `true` if the address is valid. | |
| /// Returns whether the address is valid. |
Contributor
Author
There was a problem hiding this comment.
I don't really care about these as long as we're consistent. It seems Rust uses 'returns true' (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.is_empty, https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.is_some), so I'd just appeal to authority and do that.
I'll update instances of 'whether' to reflect this.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 6, 2026
BEGIN_COMMIT_OVERRIDE fix: empty undefined offchain messages for batch calls (#21157) feat: add aztecaddress::is_valid (#21072) feat: add ergonomic conversions for Noir's `Option<T>` (#21107) chore: use returns `true` for boolean fns (#21186) feat: add salt and secret params to env.deploy (#21183) END_COMMIT_OVERRIDE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Suggested by @iAmMichaelConnor.