Aztec.nr
Aztec.nr is the smart contract development framework for Aztec. It is a set of utilities that help you write Noir programs to deploy on the Aztec network.
Contract Development
Prerequisites
- Install Aztec Sandbox and tooling
- Install the Noir LSP for your editor.
Flow
- Write your contract and specify your contract dependencies. Every contract written for Aztec will have
aztec-nr as a dependency. Add it to your
Nargo.toml
with
# Nargo.toml
[dependencies]
aztec = { git="https://github.com/AztecProtocol/aztec-packages/", tag="aztec-packages-v0.71.0", directory="noir-projects/aztec-nr/aztec" }
- Write your contracts.
- Profile the private functions in your contract to get a sense of how long generating client side proofs will take
- Write unit tests using the TXE and end-to-end tests with typescript
- Compile your contract
- Deploy your contract
Section Contents
🗃️ Writing Contracts
10 items
📄️ Profiling Transactions
An Aztec transaction typically consists of a private and a public part. The private part is where the user executes contract logic within the PXE and generates a proof of execution, which is then sent to the sequencer.
📄️ Testing Contracts
Aztec contracts can be tested in a variety of ways depending on the needs of a particular application and the complexity of the interactions they must support.
📄️ How to Compile a Contract
Once you have written a contract in Aztec.nr, you will need to compile it into an artifact in order to use it.
📄️ How to Deploy a Contract
Once you have compiled your contracts you can proceed to deploying them using aztec.js which is a Typescript client to interact with the sandbox.