You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
➕ Better at discovering edge cases around note selection, recursion limits, and overflow/underflow
➕ Can validate invariants (conservation, isolation per id) over many runs
➖ More setup complexity (oracles, determinism) and potentially flaky runs
➖ Harder to assert exact revert strings/embedded overflow expressions
Recommendation: Keep the current explicit, scenario-based tests: they match Aztec/Noir debugging needs (precise revert reasons, explicit authwit/proxy flows, and ARC-403 hook expectations). Consider incremental refactors later to parameterize repeated patterns (especially the on-behalf authwit cases) once the suite stabilizes.
Files changed (20) +2390 / -1
Tests (18) +2388 / -1
test.nrRegister MultiToken test modules+16/-0
Register MultiToken test modules
• Introduces the root test module file that wires in all scenario test modules plus a shared 'utils' module.
authorization.nrAdd ARC-403 authorization hook tests (called, not called, and rejection)+419/-0
Add ARC-403 authorization hook tests (called, not called, and rejection)
• Adds tests asserting the authorization hook fires for relevant transfer/burn operations, does not fire for mint/commitment initialization, and causes reverts when the spy contract rejects operations. Also validates selector/from_public correctness and id integrity.
burn_private.nrAdd burn_private tests including proxy/authwit paths and failure modes+128/-0
Add burn_private tests including proxy/authwit paths and failure modes
• Covers burning from private balance (self and on-behalf via GenericProxy + private authwit), validates balance reductions, and asserts correct failures for over-burn and missing/incorrect authwits.
• Verifies commitment initialization does not fire the auth hook and demonstrates that token id binding happens at completion (mint_to_commitment) rather than during initialization.
main.nrExpose last auth-hook call via view for assertions+9/-1
Expose last auth-hook call via view for assertions
• Adds a public 'get_last_call()' view entrypoint to read the most recent recorded hook invocation, enabling tests to assert selector/from/id/amount and hook variant. Imports the 'view' macro to support the new view method.
transfer_private_to_commitment.nrAdd transfer_private_to_commitment tests including completer constraints+145/-0
Add transfer_private_to_commitment tests including completer constraints
• Covers successful private-to-commitment transfers, on-behalf transfers via proxy/authwit, and failure cases for wrong completer and insufficient balance.
transfer_private_to_public.nrAdd transfer_private_to_public tests with proxy/authwit and failure modes+126/-0
Add transfer_private_to_public tests with proxy/authwit and failure modes
• Covers successful private-to-public transfers, on-behalf via proxy/authwit, and expected failures for insufficient private balance and missing authwits.
transfer_public_to_commitment.nrAdd transfer_public_to_commitment tests including invalid commitment and underflow+92/-0
Add transfer_public_to_commitment tests including invalid commitment and underflow
• Covers successful public-to-commitment transfers (public debit then private credit) and expected failures for uninitialized commitments and public balance underflow.
transfer_public_to_public.nrAdd transfer_public_to_public tests including authwit and authorization failures+193/-0
Add transfer_public_to_public tests including authwit and authorization failures
• Covers successful public transfers (including self-transfer), on-behalf via public authwit, and expected failures for underflow and unauthorized callers. Also validates per-id isolation for public balances.
utils.nrIntroduce shared test harness utilities for deployment, balances, auth hook, and proxy flows+287/-0
Introduce shared test harness utilities for deployment, balances, auth hook, and proxy flows
• Adds reusable setup/deploy helpers, deterministic private minting via oracle mocking, balance read/assert helpers, and authorization spy assertions via a new 'get_last_call()' view. Includes proxy-based setup helpers to test private authwit validation when msg_sender differs from 'from'.
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 freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
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.
🤖 Linear
Closes AZT-855
Description
nr tests