Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Maddiaa <[email protected]>
Co-authored-by: Lasse Herskind <[email protected]>
  • Loading branch information
3 people committed Sep 1, 2023
1 parent effab00 commit 33be50b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/docs/dev_docs/getting_started/noir.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Noir is designed for accessible and flexible development of provable programs. I
Noir is a public good for developing ZK-provable programs and is independent from building products on the existing Aztec network.
:::

While "Vanilla" Noir will be used to write circuits, we have created a library on top of Noir that will be used to write smart contracts on top of the Aztec Sandbox. Since noir files use the `.nr` extension, we are calling this library "Aztec.nr".
While "Vanilla" Noir will be used to write circuits, we have created a library on top of Noir that can be used to write smart contracts for Aztec. Since noir files use the `.nr` extension, we are calling this library "Aztec.nr".

## Who is Noir for?

Expand Down
16 changes: 8 additions & 8 deletions docs/docs/dev_docs/getting_started/noir_contracts.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
title: Setting up Aztec.nr Contracts
title: Aztec.nr Contracts
---

## Introduction

This guide explains the necessary set up required to write your own contract using the Aztec.nr library and deploy it on the sandbox
This guide explains the set up required to write a contract using the Aztec.nr library; then deploy it to the sandbox

:::info Prerequisite reading
If you haven't read [Aztec Sandbox](./sandbox.md) and [Noir](./noir.md), we recommend going there first.
:::

### Dependencies
1. 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:
1. You will need Noir's build tool `nargo`, which you can install via [`noirup`](https://github.com/noir-lang/noirup). Make sure you install the `aztec` version of nargo:

```bash
curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash
Expand All @@ -34,7 +34,7 @@ cd contracts
nargo new example_contract
```

This creates a noir project with Nargo.toml (which is the manifest file of the project). Also, you will see a file in `example_contract/src/main.nr` which is where we will write our contract.
This creates a noir project with a Nargo.toml (which is the manifest file of the project). This file is found at `example_contract/src/main.nr`, where we will write our contract.

Your folder should look like:
```
Expand All @@ -47,7 +47,7 @@ Your folder should look like:
| |--index.ts
```

But before writing the contracts, we must add the aztec.nr library that adds smart contract syntax to Noir that the aztec sandbox can understand.
Before writing the contracts, we must add the aztec.nr library. This adds smart contract utility functions for interacting with the Aztec network.

3. Build the aztec.nr library on your machine.

Expand Down Expand Up @@ -81,10 +81,10 @@ You can replace the content of the generated file `example_contract/src/main.nr`

## Next Steps
You can learn more about writing contracts from the [Contracts section](../contracts/main.md).
For now you can use the [PrivateToken contract example here](https://github.com/AztecProtocol/aztec-packages/blob/master/yarn-project/noir-contracts/src/contracts/private_token_contract/src/main.nr)
For now you can use the [PrivateToken contract example here](https://github.com/AztecProtocol/aztec-packages/blob/master/yarn-project/noir-contracts/src/contracts/private_token_contract/src/main.nr).

After writing the contract, you have to compile it. Details can be found [here](../contracts/compiling.md)
After writing the contract, you have to compile it. Details can be found [here](../contracts/compiling.md).

After compiling, you can deploy your contract to the Aztec network. Relevant instructions and explainations can be found [here](../contracts/deploying.md)
After compiling, you can deploy your contract to the Aztec network. Relevant instructions and explainations can be found [here](../contracts/deploying.md).

Thereafter, you can interact with the contracts similar to how it was shown in the the [Creating and submitting transactions section on the Sandbox page](./sandbox.md#creating-and-submitting-transactions).
2 changes: 1 addition & 1 deletion docs/docs/dev_docs/getting_started/sandbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,4 +353,4 @@ That's it! We have successfully deployed a private token contract to an instance
## Next Steps
Here we showed how to interact with the sandbox, but didn't go into details on how to write your own contract or any relevant setup needed for it.

You can find details on setting up [here](./noir_contracts.md) and refer to the [Contracts section](../contracts/) on syntax, compiling, deploying and interacting with how to start writing contracts.
You can find details on setting up [here](./noir_contracts.md) and refer to the [Contracts section](../contracts/main.md) on syntax, compiling, deploying and interacting with how to start writing contracts.

0 comments on commit 33be50b

Please sign in to comment.