Skip to main content

Updating

TL;DR

  1. Updating the sandbox and CLI:
aztec-up
  1. Updating aztec-nr and individual @aztec dependencies:

Inside your project run:

cd your/aztec/project
aztec-cli update . --contract src/contract1 --contract src/contract2

The sandbox must be running for the update command to work. Make sure it is installed and running.

  1. Refer Migration Notes on any breaking changes that might affect your dapp

There are four components whose versions need to be kept compatible:

  1. Aztec Sandbox
  2. Aztec CLI
  3. aztec-nargo
  4. Aztec.nr, the Noir framework for writing Aztec contracts

First three are packaged together in docker and are kept compatible by running aztec-up. But you need to update your Aztec.nr version manually or using aztec-cli update.

Updating Aztec.nr packages

Automatic update

aztec-cli will update your Aztec.nr packages to the appropriate version with the aztec-cli update command. Run this command from the root of your project and pass the paths to the folders containing the Nargo.toml files for your projects like so:

aztec-cli update . --contract src/contract1 --contract src/contract2

Manual update

To update the aztec.nr packages manually, update the tags of the aztec.nr dependencies in the Nargo.toml file.

[dependencies]
-aztec = { git="https://github.com/AztecProtocol/aztec-packages", tag="aztec-packages-v0.7.5", directory="noir-projects/aztec-nr/aztec" }
+aztec = { git="https://github.com/AztecProtocol/aztec-packages", tag="aztec-packages-v0.24.0", directory="noir-projects/aztec-nr/aztec" }
-value_note = { git="https://github.com/AztecProtocol/aztec-packages", tag="aztec-packages-v0.7.5", directory="noir-projects/aztec-nr/value-note" }
+value_note = { git="https://github.com/AztecProtocol/aztec-packages", tag="aztec-packages-v0.24.0", directory="noir-projects/aztec-nr/value-note" }

Go to the contract directory and try compiling it with aztec-nargo compile to verify that the update was successful:

cd /your/contract/directory
aztec-nargo compile

If the dependencies fail to resolve ensure that the tag matches a tag in the aztec-packages repository.

Updating aztec-nargo

aztec-nargo is updated by running:

aztec-up