Skip to content

Commit

Permalink
chore: update docs url in config (#2386)
Browse files Browse the repository at this point in the history
This PR updates the docs config url. Also added some links to Aztec.nr
and aztec.js source, and other internal docs links.

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [x] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [x] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
  • Loading branch information
critesjosh authored Sep 20, 2023
1 parent b57182d commit e44066d
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 43 deletions.
10 changes: 6 additions & 4 deletions docs/docs/about_aztec/roadmap/features_initial_ldt.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Here's a summary of the features we intend to support with the first release of

## Aztec.nr Contracts

See the source on Github [here](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/aztec-nr).

- Noir `contract` scopes.
- Declare a `contract`, containing a collection of state variables and functions.
- private state variables:
Expand Down Expand Up @@ -46,16 +48,16 @@ Here's a summary of the features we intend to support with the first release of

## `aztec.js`

A typescript wrapper for making RPC calls to an Aztec Sandbox node.
A typescript wrapper for making RPC calls to an Aztec Sandbox node. See the source on Github [here](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/aztec.js).

- Similar in purpose to `web3.js`/`ethers.js`/`viem`, but for interacting with Aztec Network nodes. The RPC interface for an Aztec node is necessarily different from that of an Ethereum node, because it deals with encrypted transactions and state variables.
- A library for public/private key management.
- Construct `Contract` instances from a Aztec.nr contract's JSON ABI.
- Deploy new contracts to the Aztec LDT.
- Deploy new contracts to the Aztec Sandbox.
- Construct tx requests, passing arguments to a function of a contract.
- Sign tx requests.
- Send txs to the LDT node, for simulating.
- Send txs to the LDT node, to be sent to the LDT network.
- Send txs to the Sandbox node, for simulating.
- Send txs to the Sandbox node, to be sent to the Sandbox network.
- Call `unconstrained` functions of a Aztec.nr contract, to perform `pure` calculations or retrieve state.

## Aztec Sandbox Node
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/dev_docs/contracts/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ To write an Aztec.nr contract, you need to write Noir, and to write Noir, you ne

There are a number of tools to make writing Aztec.nr contracts more pleasant. See [here](https://github.com/noir-lang/awesome-noir#get-coding).

## Quickstart

See the [contracts quickstart](../getting_started/noir_contracts.md) for more info on getting set up to write contracts.

## Learn more

<DocCardList />
2 changes: 1 addition & 1 deletion docs/docs/dev_docs/getting_started/noir_contracts.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Aztec.nr Contracts
title: Aztec.nr Contracts Quickstart
---

## Introduction
Expand Down
19 changes: 11 additions & 8 deletions docs/docs/dev_docs/getting_started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
title: Quickstart
---

Get started with the Aztec Sandbox
Get started with the Aztec Sandbox.

## Introduction

The Aztec Sandbox is an environment for local development on the Aztec Network. It's easy to get setup with just a single, simple command, and contains all the components needed to develop and test Aztec contracts and applications.

This is a 1 page introduction to getting started with running the sandbox, and interacting with it via the CLI. We will go over how to deploy a token contract to the sandbox, mint tokens and transfer them between accounts. You will find more in depth information on the following pages in this Getting Started section.

### Background

Aztec's Layer 2 network is a fully programmable combined private/public ZK rollup. To achieve this, the network contains the following primary components:
Expand All @@ -30,6 +32,11 @@ With the help of Aztec.js you will be able to:

This quickstart walks you through installing the Sandbox, deploying your first Noir contract, and verifying its execution!

## Requirements

- Node.js >= v18 (recommend installing with [nvm](https://github.com/nvm-sh/nvm))
- Docker and Docker Compose (Docker Desktop under WSL2 on windows)

## Installation

You can run the Sandbox using either Docker or npm.
Expand Down Expand Up @@ -64,15 +71,15 @@ npx @aztec/aztec-sandbox

### CLI

To interact with the sandbox now that it's running locally, install the Aztec CLI:
To interact with the sandbox now that it's running locally, install the [Aztec CLI](https://www.npmjs.com/package/@aztec/cli):

```bash
npm install -g @aztec/cli
```

## Deploying a contract

The sandbox is preloaded with two accounts. Let's assign them to shell variables. Run the following in your terminal, so we can refer to the accounts as $ALICE and $BOB from now on:
The sandbox is preloaded with multiple accounts. Let's assign them to shell variables. Run the following in your terminal, so we can refer to the accounts as $ALICE and $BOB from now on:

:::note
The default accounts that come with sandbox will likely change over time. Save two of the "Initial accounts" that are printed in the terminal when you started the sandbox.
Expand All @@ -84,11 +91,7 @@ Start by deploying a token contract. After it is deployed, we check that the dep

#include_code deploy yarn-project/end-to-end/src/guides/up_quick_start.sh bash

The contract address of the newly-deployed contract should be printed to the console. Store this contract address for future commands:

```bash
CONTRACT="Paste the contract address here"
```
Note that the deployed contract address is exported, so we can use it as `$CONTRACT` later on.

## Calling a contract

Expand Down
26 changes: 2 additions & 24 deletions docs/docs/dev_docs/getting_started/sandbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ Here we will walkthrough the process of retrieving the Sandbox, installing the c

## What do you need?

- Node.Js >= v18
- Node.js >= v18
- Docker and Docker Compose (Docker Desktop under WSL2 on windows)

That's it...

## Ok, so how do I try it out?

Well, you can find instructions [at the website](https://sandbox.aztec.network).

Or you can just curl the site instead like this:
You can just curl the site like this:

```sh
/bin/bash -c "$(curl -fsSL 'https://sandbox.aztec.network')"
Expand All @@ -38,26 +36,6 @@ Within a few seconds the Sandbox should be up and running!

<Image img={require("/img/sandbox.png")} />

## Great, but what can I do with it?

Aztec's Layer 2 network is a fully programmable combined private/public ZK rollup. To achieve this, the network contains the following primary components:

- Aztec Node - Aggregates all of the 'backend' services necessary for the building and publishing of rollups.
- Aztec RPC Server - Normally residing with the end client, this decrypts and stores a client's private state, executes simulations and submits transactions to the Aztec Node.
- Aztec.js - Aztec's client library for interacting with the Aztec RPC Server (think Ethers.js).

All of this is included in the Sandbox, with the exception of Aztec.js which you can use to interact with it.

With the help of Aztec.js you will be able to:

- Create an account
- Deploy a contract
- Call view methods on contracts
- Simulate the calling of contract functions
- Send transactions to the network
- Be notified when transactions settle
- Query chain state such as chain id, block number etc.

## I have the Sandbox running, show me how to use it

We will deploy a token contract, and send tokens privately, using the Sandbox. You can see the final result of the [tutorial code here](https://github.com/AztecProtocol/dev-rel/tree/main/tutorials/sandbox-tutorial/token), if you don't want to follow along, copy and pasting the example code.
Expand Down
12 changes: 10 additions & 2 deletions docs/docs/dev_docs/getting_started/token_contract_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -902,8 +902,16 @@ Now that the contract is complete, you should be able to compile it with the `az
aztec-cli compile /path/to/token_contracts_folder
```

## Testing
## Next Steps

End to end tests for reference:
### Testing

Review the end to end tests for reference:

https://github.com/AztecProtocol/aztec-packages/blob/master/yarn-project/end-to-end/src/e2e_token_contract.test.ts

### Token Bridge Contract

The [token bridge tutorial](https://github.com/AztecProtocol/dev-rel/tree/main/tutorials/token-bridge-standard) is a great follow up to this one.

It builds on the Token contract described here and goes into more detail about Aztec contract composability and Ethereum (L1) and Aztec (L2) cross-chain messaging.
8 changes: 4 additions & 4 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const fs = require("fs");
const config = {
title: "Aztec Docs",
tagline: "Ethereum, encrypted",
url: "https://aztec-docs-dev.netlify.app/",
url: "https://docs.aztec.network/",
baseUrl: "/",
trailingSlash: false,
onBrokenLinks: "throw",
Expand Down Expand Up @@ -124,9 +124,9 @@ const config = {
},
],
algolia: {
appId: "YOMNCJ88NY",
apiKey: "ef5490899a6f9618f55c7997ba5b35b4",
indexName: "aztec--dev",
appId: "CL4NK79B0W",
apiKey: "21d89dadaa37a4d1b6bf4b17978dcf7f",
indexName: "aztec",
},
colorMode: {
defaultMode: "light",
Expand Down

0 comments on commit e44066d

Please sign in to comment.