Skip to content

feat: add aztecaddress::is_valid#21072

Merged
nventuro merged 1 commit intomerge-train/fairiesfrom
nico/f-379-add-address-validity-methods-to-aztecaddress
Mar 5, 2026
Merged

feat: add aztecaddress::is_valid#21072
nventuro merged 1 commit intomerge-train/fairiesfrom
nico/f-379-add-address-validity-methods-to-aztecaddress

Conversation

@nventuro
Copy link
Contributor

@nventuro nventuro commented Mar 3, 2026

Suggested by @iAmMichaelConnor.

@nventuro nventuro requested a review from LeilaWang as a code owner March 3, 2026 19:16
@nventuro nventuro requested a review from nchamo March 4, 2026 18:05
// 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@nventuro nventuro merged commit ef234a3 into merge-train/fairies Mar 5, 2026
13 of 14 checks passed
@nventuro nventuro deleted the nico/f-379-add-address-validity-methods-to-aztecaddress branch March 5, 2026 18:44
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants