/aztec-nr

Primary LanguageRustApache License 2.0Apache-2.0

Aztec.nr

Aztec Smart Contract Framework

Build Status Aztec Website Discord Chat License

Aztec.nr

Aztec-nr is a Noir framework for smart contracts on Aztec.

Directory Structure

.
├── aztec               // The core of the aztec framework
├── easy-private-state  // A library for easily creating private state
├── safe-math           // A library for safe arithmetic
└── value-note          // A library for storing arbitrary values

Installing Aztec-nr libraries

[package]
name = "your_contract"
authors = ["you! ;) "]
compiler_version = "<current_noir_version>"
type = "contract"

[dependencies]
# To install the aztec framework (required to create aztec contracts).
aztec = { git = "https://github.com/AztecProtocol/aztec-nr", tag = "master" , directory = "aztec" }

# Optional libraries
easy_private_state = { git = "https://github.com/AztecProtocol/aztec-nr", tag = "master" , directory = "easy-private-state" }
safe_math = { git = "https://github.com/AztecProtocol/aztec-nr", tag = "master" , directory = "safe-math" }
value_note = { git = "https://github.com/AztecProtocol/aztec-nr", tag = "master" , directory = "value-note" }

Prerequisites

To use Aztec.nr you must have Noir installed. Noir is a general purpose programming language for creating zero-knowledge-proofs. Aztec.nr supercharges the Noir language with Aztec Smart Contract capabilities.

Quick Installation

The fastest way to install is with noirup.

To use Aztec-nr the aztec version of Noir is required (Note; this version is temporarily required if you would like to use #[aztec()] macros).

Once noirup is installed, you can run the following:

noirup -v NARGO_VERSION_COMPATIBLE_WITH_YOUR_SANDBOX

Replace NARGO_VERSION_COMPATIBLE_WITH_YOUR_SANDBOX with the version from the output of aztec-cli get-node-info:

aztec-cli get-node-info

For more installation options, please view Noir's getting started.