feat(aztec.js): expose #[abi] globals on generated contract classes - #25217
Draft
vezenovm wants to merge 27 commits into
Draft
feat(aztec.js): expose #[abi] globals on generated contract classes#25217vezenovm wants to merge 27 commits into
vezenovm wants to merge 27 commits into
Conversation
ContractArtifact.outputs.globals keeps the named values emitted by Noir instead of stripping names on load. Adds getNamedContractGlobals for name-based lookup. Legacy bare-globals artifacts (incl. the pinned standard contracts) hash identically to before; freshly compiled artifacts get new metadata hashes and class IDs.
Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
Drop the bare-globals compat arm: outputs.globals entries are always
{name, value}, artifacts compiled before Noir exported global names are
rejected on load. Bump PXE data schema 13->14 and re-pin the standard
contracts (folds in compile drift accumulated since the July pin).
"cutover" is not in the cspell dictionary, which failed the spellcheck step of the docs build.
…odegen # Conflicts: # docs/docs-developers/docs/aztec-nr/framework-description/contract_artifact.md
Base automatically changed from
mv/f-619-artifact-global-names
to
merge-train/fairies
August 13, 2026 19:26
…19-globals-codegen # Conflicts: # docs/docs-developers/docs/aztec-nr/framework-description/contract_artifact.md # docs/docs-developers/docs/resources/migration_notes.md
…s and reserved storage tags
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.
Resolves UX improvements as part of resolving #21761
Stacked on #25184. Generated contract classes now expose
#[abi(tag)]globals as decoded values, grouped by tag.Before (runtime accessor over kind-tagged
AbiValues):After (baked into the generated class, fully typed):
Also versions the codegen cache so generator changes regenerate wrappers whose artifact hashes are unchanged.
Audit fixes
Resolves AztecProtocol/barretenberg-claude#4481
Resolves AztecProtocol/barretenberg-claude#4479
#[abi(storage)]tag is rejected with a clear error instead of crashingObject.prototypemembers (toString,__proto__, etc.) return{}as documented instead of throwing.__proto__record keys (zod's record parser skipped them)contract_name(a dependency contract sharing the root contract's unqualified name) raise an explicit ambiguity error instead of the first one silently supplying the layout.