Aztec macros
All Aztec macros
All Aztec macros
A contract is a collection of persistent state variables and functions which may manipulate these variables.
Functions serve as the building blocks of smart contracts. Functions can be either public, ie they are publicly available for anyone to see and can directly interact with public state, or private, meaning they are executed completely client-side in the PXE. Read more about how private functions work here.
This page explains how to write an initializer function, also known as a constructor.
On this page you will learn about function attributes and macros.
This guide explains how to simulate a function call using Aztec.js.
Below, we go more into depth of what is happening under the hood when you create a function in an Aztec contract. The next page will give you more information about what the attributes are really doing.
This page goes over what oracles are in Aztec and how they work.
Aztec operates on a model of private and public functions that are able to work together. Private functions work by providing evidence of correct execution generated locally through kernel proofs. Public functions, on the other hand, are able to utilize the latest state to manage updates and perform alterations.
What is the context
popCapsule is used for passing artbitrary data. We have not yet included this in Aztec.nr, so it is a bit more complex than the other oracles. You can follow this how-to:
In Aztec there are multiple different types of visibility that can be applied to functions. Namely we have data visibility and function visibility. This page explains these types of visibility.