From 1993636747d387e128dade9740a57ee638adf682 Mon Sep 17 00:00:00 2001 From: benesjan Date: Fri, 15 Sep 2023 18:04:25 +0000 Subject: [PATCH] updated docs --- README.md | 4 +-- docs/docs/dev_docs/contracts/compiling.md | 35 +++++++++++++++---- .../getting_started/noir_contracts.md | 16 +++++---- yarn-project/aztec-nr/README.md | 7 +++- 4 files changed, 45 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index a229197bb96..2ee28cc8e21 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ To build the C++ code, follow the [instructions in the circuits subdirectory](./ To build Typescript code, make sure to have [`nvm`](https://github.com/nvm-sh/nvm) (node version manager) installed. -To build noir code, make sure that you are using the `aztec` tagged version of nargo. This is the latest pin version the team works on to ensure local and ci environments are in sync. This should be installed through `noir-contracts/bootstrap.sh` and the regular `bootstrap.sh` script. However if you find yourself wanting to update to the latest `aztec` tag outside of these channels, you can run `noirup -v aztec` to manually download the latest binaries. - +To build noir code, make sure that you are using the version from `yarn-project/noir-compiler/src/noir-version.json`. +Install nargo by running `noirup -v TAG_FROM_THE_FILE`. ## Continuous Integration This repository uses CircleCI for continuous integration. Build steps are managed using [`build-system`](https://github.com/AztecProtocol/build-system). Small packages are built and tested as part of a docker build operation, while larger ones and end-to-end tests spin up a large AWS spot instance. Each successful build step creates a new docker image that gets tagged with the package name and commit. diff --git a/docs/docs/dev_docs/contracts/compiling.md b/docs/docs/dev_docs/contracts/compiling.md index 845ffdf645e..72d90252055 100644 --- a/docs/docs/dev_docs/contracts/compiling.md +++ b/docs/docs/dev_docs/contracts/compiling.md @@ -8,23 +8,44 @@ We'll also cover how to generate a helper [TypeScript interface](#typescript-int ## Prerequisites -You will need the Noir build tool `nargo`, which you can install via [`noirup`](https://github.com/noir-lang/noirup). Make sure you install the `aztec` version of nargo: +You will need Aztec CLI to compile the contracts. +Follow [CLI tutorial](../getting_started/cli.md#installing-the-aztec-cli) and install the version compatible with your Sandbox. + +Start the Sandbox (see [Sandbox tutorial](../getting_started/sandbox.md) if unsure how to do it) and get node info: ```bash +aztec-cli get-node-info +``` +Your output should look like this: + +``` +Node Info: + +Version: 1 +Chain Id: 31337 +Rollup Address: 0x9e545e3c0baab3e08cdfd552c960a1050f373042 +Client: aztec-rpc@0.1.0 +Compatible Nargo Version: NARGO_VERSION +``` + +You will need the Noir build tool `nargo`, which you can install via [`noirup`](https://github.com/noir-lang/noirup). + +Install `noirup`: +```shell curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash -noirup -v aztec +``` + +Now install the version of `nargo` compatible with your Sandbox version by replacing `NARGO_VERSION` with the version from the output of `aztec-cli get-node-info`: +```shell +noirup -v NARGO_VERSION ``` :::info -You can re-run `noirup -v aztec` whenever you want to update to the latest version of Noir supported by the Aztec Network. +Once you'll update the sandbox you will have to run the `noirup` again with the updated `NARGO_VERSION`. ::: ## Compile using the CLI -To compile a contract using the Aztec CLI, first install it: - -`npm install -g @aztec/cli` - Then run the `compile` command with the path to your [contract project folder](./layout.md#directory-structure), which is the one that contains the `Nargo.toml` file: ``` diff --git a/docs/docs/dev_docs/getting_started/noir_contracts.md b/docs/docs/dev_docs/getting_started/noir_contracts.md index 65e27c14643..ab8b12fb12e 100644 --- a/docs/docs/dev_docs/getting_started/noir_contracts.md +++ b/docs/docs/dev_docs/getting_started/noir_contracts.md @@ -11,18 +11,20 @@ If you haven't read [Aztec Sandbox](./sandbox.md), we recommend going there firs ::: ### Dependencies -#### `nargo` -Nargo is Noir's build tool. On your terminal, run: -```bash -curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash -noirup -v aztec -``` -This ensures you are on the aztec branch of nargo. + #### Aztec Sandbox You need to setup the [aztec sandbox](./sandbox.md) +#### `aztec-cli` +Install aztec-cli by following the [CLI tutorial](../getting_started/cli.md#installing-the-aztec-cli). + +#### `nargo` +Nargo is Noir's build tool. + +Install it by following the [Prerequisites section of contract compilation](../contracts/compiling.md#Prerequisites). + ## Set up for aztec.nr contracts 1. Inside the yarn project you created from the [Sandbox](./sandbox.md) page, create a sub-folder where the contracts will reside. ```bash diff --git a/yarn-project/aztec-nr/README.md b/yarn-project/aztec-nr/README.md index b5f09142a4a..a228f280565 100644 --- a/yarn-project/aztec-nr/README.md +++ b/yarn-project/aztec-nr/README.md @@ -59,7 +59,12 @@ To use `Aztec-nr` the `aztec` version of `Noir` is required (Note; this version Once noirup is installed, you can run the following: ```bash -noirup -v aztec +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`: +```bash +aztec-cli get-node-info ``` For more installation options, please view [Noir's getting started.](https://noir-lang.org/getting_started/nargo_installation)