Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(AztecMacro): Function types and visibility #5057

Open
Tracked by #5077
spalladino opened this issue Mar 7, 2024 · 1 comment
Open
Tracked by #5077

feat(AztecMacro): Function types and visibility #5057

spalladino opened this issue Mar 7, 2024 · 1 comment

Comments

@spalladino
Copy link
Collaborator

Update the aztec macros so that we have:

  • #[aztec(private)]: Private constrained functions
  • #[aztec(public)]: Public constrained functions
  • #[aztec(internal)]: Functions only callable via an aztec function call from the same contract (used with either of the two above)
  • #[aztec(query)]: Unconstrained query function (requires unconstrained)
  • unconstrained (no attribute): Unconstrained helper function that is inlined
  • no attribute: Constrained helper function that is inlined

Before implementing this, we still need agreement on the name aztec(query).

Full discussion in this forum thread.

@github-project-automation github-project-automation bot moved this to Todo in A3 Mar 7, 2024
@LHerskind LHerskind changed the title Remove contract-library-method and introduce an attribute for query methods feat(AztecMacro): Remove contract-library-method and introduce an attribute for query methods Mar 8, 2024
@LHerskind LHerskind changed the title feat(AztecMacro): Remove contract-library-method and introduce an attribute for query methods feat(AztecMacro): Function types and visibility Mar 8, 2024
@LHerskind LHerskind removed their assignment Mar 11, 2024
@nventuro
Copy link
Contributor

I for one like query. It's distinct from other ethereum terms (e.g. it's not 'view'), so there'll be no confusion, and it nicely conveys the purpose.

We've also been toying with the idea of a fouth category, tentatively called 'provable', which would be functions whose execution you could easily prove off-chain (e.g. you'd submit a proof for NFT.owner_of(token_id) at some block number).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

3 participants