Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Sep 15, 2023
1 parent 1c2669c commit 1993636
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
35 changes: 28 additions & 7 deletions docs/docs/dev_docs/contracts/compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
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:

```
Expand Down
16 changes: 9 additions & 7 deletions docs/docs/dev_docs/getting_started/noir_contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<!-- TODO([#1056](https://github.com/AztecProtocol/aztec-packages/issues/1056)): Add a step for the starter kit -->

#### `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
Expand Down
7 changes: 6 additions & 1 deletion yarn-project/aztec-nr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1993636

Please sign in to comment.