feat: add get_minter() view to token contract - #17
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
alejoamiras
force-pushed
the
stack/get-minter
branch
from
August 12, 2026 12:49
52f3a3c to
c079225
Compare
This comment has been minimized.
This comment has been minimized.
minter was the only documented storage field without a view getter — every other field (name, symbol, decimals, total_supply, auth_contract) has one, and MultiToken already exposes get_minter(). Add the getter, README entry, and a view test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
IlyasRidhuan
force-pushed
the
stack/get-minter
branch
from
August 12, 2026 16:40
c079225 to
dbbf7e0
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
get_minter()public view to the Token contract.minterwas the only documented storage field without a getter —name,symbol,decimals,total_supply, andauth_contractall have one, and MultiToken already exposesget_minter().The bug codex caught
PublicImmutable::read()asserts initialization in aztec-nr v5.1.0, andconstructor_with_initial_supplynever initializedminter— so the new getter (and a doc claim that it returns zero) would have reverted for initial-supply tokens. Fix: that constructor now explicitly initializesminterto the zero address, matching howauth_contractis handled. Side effect is strictly clarifying: mint functions on initial-supply tokens now revert with "caller is not minter" instead of "Trying to read from uninitialized PublicImmutable"; no authorization is weakened (verified in codex re-review).Validation
aztec compile✓ · fulltoken_contractNoir suite (81 tests) ✓, including two new view tests covering both constructor paths.🤖 Generated with Claude Code