Developing Smart Contracts
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="master", directory="noir-projects/aztec-nr/aztec" }
- Profile the private functions in your contract to get a sense of how long generating client side proofs will take
- Write unit tests directly in Noir and end-to-end tests with TypeScript
- Compile your contract
- Deploy your contract with Aztec.js
Section Contents
📄️ Project Structure
Learn how to set up and structure your project for Aztec smart contracts.
📄️ Declare Contract Storage
Comprehensive guide to storage management in your Aztec smart contracts.
📄️ Storage Types
Learn about how data is stored in Aztec contracts.
📄️ Note Types
Learn about note types and how to implement custom note types in your Aztec smart contracts.
📄️ Define Functions
Learn how to define functions in your Aztec smart contracts.
📄️ Contract Composability
Learn how to call other contracts from your Aztec smart contracts.
📄️ Emitting Events
Learn how to emit events from your Aztec smart contracts for off-chain applications to consume.
📄️ Permit Contract Actions
Developer Documentation to use Authentication Witness for authorizing actions by other contracts.
📄️ Cross-Chain Communication
Learn how to communicate with L1 contracts through portals in your Aztec smart contracts.
📄️ Prove Historic State
Learn how to prove historical state transitions in your Aztec smart contracts.
📄️ Compile Contracts
Learn how to compile your Noir smart contracts for deployment on Aztec.
📄️ Testing Contracts
Learn how to write and run tests for your Aztec smart contracts.
🗃️ Advanced Topics
4 items