-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(docs): set up noir contracts in getting-started #1770
Conversation
@dan-aztec once the |
I think we're 95% sure that the |
2e5b07a
to
a2742c4
Compare
@iAmMichaelConnor done on the entire |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall solid section, ive a few minor nits
::: | ||
|
||
### 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I would alter this section such that the bullet points are supported by sentences, rather than being sentences.
-
Nargo
nargo install instructions ... -
Sandbox
Sandbox installation instructions / link -
Starter repo
Link to starter repo
mkdir contracts | ||
``` | ||
|
||
All contract projects will reside within this folder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth noting that it does not need to live in contracts, this is just a style choice
|
||
3. Build the aztec.nr library on your machine. | ||
|
||
For this, clone the `aztec-packages` repository (which is the monorepo where the library resides) and build it anywhere on your machine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: make an issue to adjust this, we need the library to be hosted elsewhere before launching
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For sure. Removing step 3 entirely, and adding the git repo in toml should be the way to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this, clone the `aztec-packages` repository (which is the monorepo where the library resides) and build it anywhere on your machine | |
For this, clone the `aztec-packages` repository (which is the monorepo where the library resides) and build it anywhere on your machine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated -> nargo.toml can now directly talk to a directory in a gh repo!
|
||
You are now ready to write your own contracts! | ||
|
||
You can replace the content of the generated file `example_contract/src/main.nr` with your contract code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth noting the current nargo new output is just a main file. We need to tell them to add the contract scope (granted that may be said in the linked next steps section below ) ( if it is ignore this )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like something that should the starter-kit should handle or aztec cli init or just template on gh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Contract scope replalcement is explained in another link
@@ -6,7 +6,7 @@ import Image from "@theme/IdealImage"; | |||
|
|||
## Introduction | |||
|
|||
The Aztec Sandbox aims to provide a local development system against which you can build and test Noir contracts in a fast, safe, and free environment. | |||
The Aztec Sandbox aims to provide a local development system against which you can build and test Aztec.nr (read "aztec-noir") contracts in a fast, safe, and free environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think the Aztec.nr
distinction should be made here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. Think it is fine to leave it out, readers will figure out when they hit the page named Aztec.nr
just a second later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent use of .
at numbered lists at the end, and think it would be more easily to tell steps apart with a smaller heading instead of the list like that.
@@ -195,6 +195,7 @@ const sidebars = { | |||
"dev_docs/getting_started/noir", | |||
"dev_docs/getting_started/sandbox", | |||
"dev_docs/getting_started/cli", | |||
"dev_docs/getting_started/noir_contracts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ordering wise, you could probably move this up above the cli. Logically, would like it to be right after noir, but since you are showing things into sandbox directories probably fine to have it there.
This is more a comment/reflection that something that necessarily needs changing.
@@ -6,7 +6,7 @@ import Image from "@theme/IdealImage"; | |||
|
|||
## Introduction | |||
|
|||
The Aztec Sandbox aims to provide a local development system against which you can build and test Noir contracts in a fast, safe, and free environment. | |||
The Aztec Sandbox aims to provide a local development system against which you can build and test Aztec.nr (read "aztec-noir") contracts in a fast, safe, and free environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. Think it is fine to leave it out, readers will figure out when they hit the page named Aztec.nr
just a second later.
noirup -v aztec | ||
``` | ||
|
||
2. [Have a running sandbox and a code repo to interact with it](./sandbox.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would probably use a small header rather than the list. When looking over the steps it "vanishes in the crowd". Also would benefit by #1770 (comment).
|
||
You are now ready to write your own contracts! | ||
|
||
You can replace the content of the generated file `example_contract/src/main.nr` with your contract code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like something that should the starter-kit should handle or aztec cli init or just template on gh.
|
||
3. Build the aztec.nr library on your machine. | ||
|
||
For this, clone the `aztec-packages` repository (which is the monorepo where the library resides) and build it anywhere on your machine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this, clone the `aztec-packages` repository (which is the monorepo where the library resides) and build it anywhere on your machine | |
For this, clone the `aztec-packages` repository (which is the monorepo where the library resides) and build it anywhere on your machine. |
@@ -16,6 +16,8 @@ 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". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this page a duplicate of the landing page of the proper Noir docs? If so, we should probably replace all the text of this page with a link to Noir's docs.
69a8dee
to
33be50b
Compare
Co-authored-by: Maddiaa <[email protected]> Co-authored-by: Lasse Herskind <[email protected]>
b0df6dd
to
771bc0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the broken link.
🤖 I have created a new Aztec Packages release --- ## [0.1.0-alpha52](v0.1.0-alpha51...v0.1.0-alpha52) (2023-09-05) ### Features * **docs:** set up noir contracts in getting-started ([#1770](#1770)) ([33eb99d](33eb99d)) ### Bug Fixes * Complete JS call stacks across ACVM wasm boundaries ([#2013](#2013)) ([8e84e46](8e84e46)) * deploy_ecr calculating CONTENT_HASH ([#2024](#2024)) ([edee198](edee198)) * Option to fail silently when retrying ([#2015](#2015)) ([453c9c1](453c9c1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fix #1699 - there was no set-up guide for noir contracts on getting started
Don't see a point to explain how to write, compile or deploy when these are already covered in multiple other places