docs(v5-next): backport counter tutorial alignment from #23517 - #24243
Merged
Conversation
critesjosh
marked this pull request as ready for review
June 23, 2026 16:23
critesjosh
approved these changes
Jun 23, 2026
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.
Backports the counter-tutorial half of #23517 (
docs: align counter tutorial example with the aztec init template and add TXE tests, merged tonextJun 22) tov5-next.Why this is the right scope
#23517's core intent was to align the counter tutorial example with what
aztec initgenerates. Onv5-nextthe scaffold template is already updated —yarn-project/aztec/scripts/templates/counter/contract/src/main.nralready definesfn constructor(initial_value: u128, ...). But the tutorial prose and the inlined example contract are still on the oldinitialize(headstart)naming, so the v5 tutorial currently contradicts the codeaztec initproduces. This backport closes that gap.Files (2)
docs/docs-developers/docs/tutorials/contract_tutorials/counter_contract.md—initialize→constructor,headstart→initial_value, intro reworded (encrypted private state), heading casing.docs/examples/contracts/counter_contract/src/main.nr— same rename, so the tutorial's#include_code constructorblock matches both the prose and the v5 scaffold template.Deliberately excluded
counter_contract_test, thedocs/examples/bootstrap.sh test-contractsstep,Nargo.tomlmember,logging_example_testtweak) — that's CI tooling, not docs, andcounter_contract_testdoesn't exist onv5-next.v5-next; no change needed.Safety check
recursive_verification_contractalso uses aheadstartparameter, but it's an independent contract with its ownconstructor(headstart: Field, ...)(untouched by #23517 even onnext), so the counter rename doesn't affect it.Source PR: #23517. No tracked issue is closed by this backport.
Created by claudebox · group:
slackbot