Skip to content

docs: document how to make nested utility calls#24478

Merged
nchamo merged 3 commits into
merge-train/fairies-v5from
nchamo/f-627-document-how-to-make-nested-utility-calls
Jul 2, 2026
Merged

docs: document how to make nested utility calls#24478
nchamo merged 3 commits into
merge-train/fairies-v5from
nchamo/f-627-document-how-to-make-nested-utility-calls

Conversation

@nchamo

@nchamo nchamo commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a "Utility calls" section to the calling contracts guide: utility-to-utility calls via self.call(), private-to-utility calls via unsafe { self.utility.call(...) }, the call_self stubs, cross-contract authorization, and msg_sender semantics for nested calls.
  • Fixes stale claims in the function definition guide and call types page that utility functions cannot be called from private functions.
  • Rewrites the doc comments on the two utility call methods in aztec-nr, which still said only same-contract calls were supported.

Fixes F-627

@nchamo nchamo added ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure ci-draft Run CI on draft PRs. labels Jul 2, 2026
@nchamo nchamo self-assigned this Jul 2, 2026
@nchamo
nchamo changed the base branch from next to merge-train/fairies-v5 July 2, 2026 20:20
@nchamo
nchamo marked this pull request as ready for review July 2, 2026 20:23
@nchamo
nchamo requested a review from nventuro as a code owner July 2, 2026 20:23

Public functions cannot call utility functions: they run on the sequencer, which has no access to private state or PXE.

### Cross-contract authorization

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the error message PXE emits on lack of authorization contain an link to an errors page with the netlify redirect set to point at this section

@nchamo
nchamo enabled auto-merge (squash) July 2, 2026 22:17
@nchamo
nchamo merged commit 7cdbf3a into merge-train/fairies-v5 Jul 2, 2026
12 checks passed
@nchamo
nchamo deleted the nchamo/f-627-document-how-to-make-nested-utility-calls branch July 2, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants