feat: add first-class ARC-403 interface packages - #16
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The only in-repo definition of the ARC-403 hook interface was the test spy contract, which production Token/MultiToken imported directly, and the README pointed implementers at a reference repo that no longer exists (404). Add canonical interface packages: - arc403_interface (Arc403Authorizer): the fungible-token hook - arc403_interface/multitoken (Arc403MultiTokenAuthorizer): the id-bearing variant (Noir allows one contract per package) Token and MultiToken now import the interface packages; the test spies stay test-only. Bodies are empty stubs (bb cannot derive VKs for assert(false) circuits); READMEs and doc comments warn loudly that deploying a stub yields an allow-all authorizer. Function names and signatures are unchanged, so selectors and behavior are identical — verified by the 28 existing authorization tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codex review flagged that the interface packages' warning only lived in src/arc403_interface/README.md, which is not part of the published npm package — consumers would see deployable stub artifacts with no notice. The root README ships; put the warning there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reviewers reasonably ask whether an empty-bodied contract-as-interface is idiomatic Aztec Noir or Solidity thinking. It is precedented: aztec-packages ships the same pattern in noir-contracts/contracts/protocol_interface (FeeJuice, ContractInstanceRegistry). Cite that lineage in the crate docs, note that the macro derives call interfaces from signatures only (bodies are never read), and record why the raw-FunctionSelector alternative was rejected. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
IlyasRidhuan
force-pushed
the
stack/arc403-interface
branch
from
August 12, 2026 16:40
f153881 to
5278d33
Compare
IlyasRidhuan
approved these changes
Aug 12, 2026
Benchmark Comparison
Contract: escrow
Contract: logic
Contract: multitoken
Contract: nft
Contract: token
Contract: vault
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
What
Adds first-class ARC-403 interface packages and switches production contracts to them:
arc403_interface→ contractArc403Authorizer: the fungible-token hook (authorize_private/authorize_publicwith(from, amount, selector)).arc403_interface/multitoken→ contractArc403MultiTokenAuthorizer: the id-bearing variant (Noir allows one contract per package, hence the sub-package).TokenandMultiTokennow import the interface packages instead of their test spy contracts; the spies remain, test-only.defi-wonderland/aztec-arc403-extensions).Why
ARC-403 is the standard with active ecosystem demand, and the only in-repo definition of its hook interface was a test mock that production code imported directly. Implementers now get a canonical, importable artifact. The interface is loudly labeled draft — it tracks the ARC-403 forum discussion, which is still evolving.
Notes
name(param_types)— call behavior is unchanged. Token bytecode is bit-identical to main; MultiToken's private note-spending functions show benign bytecode renumbering from the added dependency (class ID changes, as it does on every aztec version bump).assert(false)circuits. The root README (which ships in the npm package) carries a CAUTION: never deploy the stubs — an empty hook approves everything.Validation
aztec compile(13 artifacts) ✓ · fulltoken_contract(79) andmultitoken_contract(77) Noir suites ✓ · 28 authorization tests exercise the hook end-to-end against the spies.🤖 Generated with Claude Code