You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
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).
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 (requiresunconstrained
)unconstrained
(no attribute): Unconstrained helper function that is inlinedBefore implementing this, we still need agreement on the name
aztec(query)
.Full discussion in this forum thread.
The text was updated successfully, but these errors were encountered: