Skip to content

Commit a91db48

Browse files
iAmMichaelConnorkevaundrayMaddiaa0
authored
chore(docs): rename to aztec.nr (#1943)
Find + replace --------- Co-authored-by: kevaundray <kevtheappdev@gmail.com> Co-authored-by: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com>
1 parent f66077a commit a91db48

File tree

60 files changed

+335
-141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+335
-141
lines changed

docs/docs/about_aztec/roadmap/features_initial_ldt.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Devs should be able to quickly spin up local, emulated instances of an Ethereum
88

99
Here's a summary of the features we intend to support with the first release of the Aztec Sandbox.
1010

11-
## Noir Contracts
11+
## Aztec.nr Contracts
1212

1313
- Noir `contract` scopes.
1414
- Declare a `contract`, containing a collection of state variables and functions.
@@ -21,22 +21,22 @@ Here's a summary of the features we intend to support with the first release of
2121
- public functions
2222
- May read and modify public state.
2323
- `constructor` functions, for initialising contract state.
24-
- `import` other Noir contracts, so their functions may be called.
24+
- `import` other Aztec.nr contracts, so their functions may be called.
2525
- Nested function calls, for contract composability
2626
- private functions can call private functions of other contracts, and receive return values.
2727
- private functions can call public functions any contract.
2828
- public functions can call private functions of any contract.
2929
- public functions can call public functions of other contracts, and receive return values.
3030
- private functions can be called recursively.
3131
- public functions can be called recursively.
32-
- Send messages from Noir contracts to Ethereum L1, for consumption by L1 smart contracts.
32+
- Send messages from Aztec.nr contracts to Ethereum L1, for consumption by L1 smart contracts.
3333
- Useful, for example, if writing an app to withdraw funds from L2 to L1.
3434
- Consume messages which have been sent by:
3535
- L1 functions.
3636
- Useful, for example, if writing an app to deposit funds from L1 to L2.
3737
- public L2 functions.
38-
- Emit `event` data from a Noir Contract.
39-
- Allows applications to subscribe to events which have been emitted by a Noir contract's functions, for example.
38+
- Emit `event` data from a Aztec.nr Contract.
39+
- Allows applications to subscribe to events which have been emitted by a Aztec.nr contract's functions, for example.
4040
- Write `unconstrained` functions.
4141
- These allow developers to write `pure` and `view` functions, which can perform calculations and retrieve state. E.g. for fetching contract-specific information, which may then be consumed by a dapp, without having to generate a zero-knowledge proof or interact with the 'network'.
4242

@@ -46,13 +46,13 @@ A typescript wrapper for making RPC calls to an Aztec LDT node.
4646

4747
- 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.
4848
- A library for public/private key management.
49-
- Construct `Contract` instances from a Noir contract's JSON ABI.
49+
- Construct `Contract` instances from a Aztec.nr contract's JSON ABI.
5050
- Deploy new contracts to the Aztec LDT.
5151
- Construct tx requests, passing arguments to a function of a contract.
5252
- Sign tx requests.
5353
- Send txs to the LDT node, for simulating.
5454
- Send txs to the LDT node, to be sent to the LDT network.
55-
- Call `unconstrained` functions of a Noir contract, to perform `pure` calculations or retrieve state.
55+
- Call `unconstrained` functions of a Aztec.nr contract, to perform `pure` calculations or retrieve state.
5656

5757
## Aztec Local Developer Testnet Node
5858

docs/docs/concepts/advanced/circuits/kernels/private_kernel.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This circuit is executed by the user, on their own device. This is to ensure pri
66

77
- Verifies a user's signature.
88
- Hides the user's address.
9-
- Verifies an app's proof - i.e. a proof which has been output after the execution of some function in a Noir Contract.
9+
- Verifies an app's proof - i.e. a proof which has been output after the execution of some function in an Aztec.nr Contract.
1010
- Performs private state reads and writes.
1111
- Exposes (forwards) the following data to the next recursive circuit:
1212
- new note hashes;
@@ -21,5 +21,5 @@ This circuit is executed by the user, on their own device. This is to ensure pri
2121
- Verifies a previous 'Private Kernel Proof', recursively, when verifying transactions which are composed of many private function calls.
2222
- Optionally can [deploy](../../contract_creation) a new private contract.
2323

24-
> Note: **This is the only core protocol circuit which actually needs to be "zk" (zero knowledge)!!!** That's because this is the only core protocol circuit which handles private data, and hence the only circuit for which proofs must not leak any information about witnesses! (The private data being handled includes: details of the Noir Contract function which has been executed; the address of the user who executed the function; the intelligible inputs and outputs of that function).
24+
> Note: **This is the only core protocol circuit which actually needs to be "zk" (zero knowledge)!!!** That's because this is the only core protocol circuit which handles private data, and hence the only circuit for which proofs must not leak any information about witnesses! (The private data being handled includes: details of the Aztec.nr Contract function which has been executed; the address of the user who executed the function; the intelligible inputs and outputs of that function).
2525
> This is a really interesting point. Most so-called "zk-Rollups" do not make use of this "zero knowledge" property. Their snarks are "snarks"; with no need for zero-knowledge, because they don't seek privacy; they only seek the 'succinct' computation-compression properties of snarks. Aztec's "zk-Rollup" actually makes use of "zero knowledge" snarks. That's why we sometimes call it a "zk-zk-Rollup", or "_actual_ zk-Rollup".

docs/docs/concepts/advanced/circuits/main.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: Circuits
77
In Aztec, circuits come from two sources:
88

99
1. Core protocol circuits
10-
2. User-written circuits (written as Noir Contracts and deployed to the network)
10+
2. User-written circuits (written as Aztec.nr Contracts and deployed to the network)
1111

1212
This page focusses on the core protocol circuits. These circuits check that the rules of the protocol are being adhered to.
1313

docs/docs/concepts/advanced/data_structures/trees.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ So, if an app needs to edit a private state variable (which will be represented
2525

2626
### Example Note
2727

28-
An example blob of data might be defined in a Noir Contract as:
28+
An example blob of data might be defined in an Aztec.nr Contract as:
2929

3030
```rust
3131
struct MyNote {
32-
storage_slot: Field, // determined by the Noir Contract
32+
storage_slot: Field, // determined by the Aztec.nr Contract
3333
value: Field,
3434
owner_public_key: Point, // The owner of this private state
3535
// (and the person who may edit it).
3636
randomness: Field,
3737
}
3838
```
3939

40-
The note might be committed-to, within a function of the Noir Contract as:
40+
The note might be committed-to, within a function of the Aztec.nr Contract as:
4141

4242
```rust
4343
note_hash: Field = pedersen::compress(

docs/docs/concepts/foundation/accounts/keys.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ The privacy master key is used to derive encryption keys. Encryption keys, as th
6969

7070
In a future version, encryption keys will be differentiated between incoming and outgoing. When sending a note to another user, the sender will use the recipient's incoming encryption key for encrypting the data for them, and will optionally use their own outgoing encryption key for encrypting any data about the destination of that note. This is useful for reconstructing transaction history from on-chain data. For example, during a token transfer, the token contract may dictate that the sender encrypts the note with value with the recipient's incoming key, but also records the transfer with its own outgoing key for bookkeeping purposes.
7171

72-
An application in Noir can access the encryption public key for a given address using the oracle call `get_public_key`, which you can then use for calls such as `emit_encrypted_log`:
72+
An application in Aztec.nr can access the encryption public key for a given address using the oracle call `get_public_key`, which you can then use for calls such as `emit_encrypted_log`:
7373

7474
#include_code encrypted /yarn-project/noir-libs/value-note/src/utils.nr rust
7575

@@ -81,7 +81,7 @@ In order to be able to provide the public encryption key for a given address, th
8181

8282
In addition to deriving encryption keys, the privacy master key is used for deriving nullifier secrets. Whenever a private note is consumed, a nullifier deterministically derived from it is emitted. This mechanisms prevents double-spends, since nullifiers are checked by the protocol to be unique. Now, in order to preserve privacy, a third party should not be able to link a note commitment to its nullifier - this link is enforced by the note implementation. Therefore, calculating the nullifier for a note requires a secret from its owner.
8383

84-
An application in Noir can request a nullifier from the current user for computing the nullifier of a note via the `get_secret_key` oracle call:
84+
An application in Aztec.nr can request a nullifier from the current user for computing the nullifier of a note via the `get_secret_key` oracle call:
8585

8686
#include_code nullifier /yarn-project/noir-libs/value-note/src/value_note.nr rust
8787

docs/docs/concepts/foundation/state_model.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Disclaimer from '../../misc/common/\_disclaimer.mdx';
1010

1111
## Private State
1212

13-
Private state must be treated differently from public state and this must be expressed in the semantics of the Noir language.
13+
Private state must be treated differently from public state and this must be expressed in the semantics of Aztec.nr.
1414

1515
Private state is encrypted and therefore is "owned" by a user or a set of users (via shared secrets) that are able to decrypt the state.
1616

@@ -22,12 +22,12 @@ Modification of state variables can be emulated by nullifying the a state record
2222

2323
### Abstracting UTXO's from App's / Users
2424

25-
The goal of Noir's contract syntax is abstract the UTXO model away from an app user / developer, contract developers are the only actor who should have to think about UTXO's.
25+
The goal of the Aztec.nr smart contract library is to abstract the UTXO model away from an app user / developer, contract developers are the only actor who should have to think about UTXO's.
2626

2727
This is achieved with two main features:
2828

2929
1. Users sign over transactions, not over specific UTXO's
30-
2. Noir contracts support developer defined `unconstrained` getter functions to help dApp's make sense of UTXO's. e.g `getBalance()`. These functions can be called outside of a transaction context to read private state.
30+
2. Aztec.nr contracts support developer defined `unconstrained` getter functions to help dApp's make sense of UTXO's. e.g `getBalance()`. These functions can be called outside of a transaction context to read private state.
3131

3232

3333
### The lifecycle of a note

docs/docs/dev_docs/contracts/common_errors.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
List common errors.
44

5-
There are two kinds of errors: errors in a noir contract, and errors spat out by an Aztec Sandbox node!
5+
There are two kinds of errors: errors in an Aztec.nr contract, and errors spat out by an Aztec Sandbox node!
66

77
Maybe even auto-generate error docs, based on error codes in our codebase.
88

docs/docs/dev_docs/contracts/compiling.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Compiling contracts
22

3-
Once you have written a [contract](../contracts/main.md) in Noir, you will need to compile it into an [artifact](./abi.md) in order to use it.
3+
Once you have written a [contract](../contracts/main.md) in Aztec.nr, you will need to compile it into an [artifact](./abi.md) in order to use it.
44

55
In this guide we will cover how to do so, both using the CLI and programmatically.
66

7-
We'll also cover how to generate a helper [TypeScript interface](#typescript-interfaces) and a [Noir interface](#noir-interfaces) for easily interacting with your contract from your typescript app and from other noir contracts, respectively.
7+
We'll also cover how to generate a helper [TypeScript interface](#typescript-interfaces) and an [Aztec.nr interface](#noir-interfaces) for easily interacting with your contract from your typescript app and from other Aztec.nr contracts, respectively.
88

99
## Prerequisites
1010

@@ -76,13 +76,13 @@ export class PrivateTokenContract extends ContractBase {
7676

7777
Read more about interacting with contracts using `aztec.js` [here](../dapps/main.md).
7878

79-
### Noir interfaces
79+
### Aztec.nr interfaces
8080

81-
A Noir contract can [call a function](./functions.md) in another contract via `context.call_private_function` or `context.call_public_function`. However, this requires manually assembling the function selector and manually serialising the arguments, which is not type-safe.
81+
An Aztec.nr contract can [call a function](./functions.md) in another contract via `context.call_private_function` or `context.call_public_function`. However, this requires manually assembling the function selector and manually serialising the arguments, which is not type-safe.
8282

8383
To make this easier, the compiler can generate contract interface structs that expose a convenience method for each function listed in a given contract ABI. These structs are intended to be used from another contract project that calls into the current one. For each contract, two interface structs are generated: one to be used from private functions with a `PrivateContext`, and one to be used from open functions with a `PublicContext`.
8484

85-
To generate them, include a `--interface` option in the compile command with a path to the target folder for the generated Noir interface files:
85+
To generate them, include a `--interface` option in the compile command with a path to the target folder for the generated Aztec.nr interface files:
8686

8787
```
8888
aztec-cli compile --interface ./path/to/another_aztec_contract_project/src ./path/to/my_aztec_contract_project
@@ -128,7 +128,7 @@ impl PrivateTokenPrivateContextInterface {
128128
}
129129
```
130130

131-
Read more about how to use the Noir interfaces [here](./functions.md#contract-interface).
131+
Read more about how to use the Aztec.nr interfaces [here](./functions.md#contract-interface).
132132

133133
:::info
134134
At the moment, the compiler generates these interfaces from already compiled ABIs, and not from source code. This means that you should not import a generated interface from within the same project as its source contract, or you risk circular references.
@@ -143,9 +143,9 @@ npm install @aztec/noir-compiler
143143
`
144144

145145
The compiler exposes the following functions:
146-
- `compileUsingNargo`: Compiles a Noir project in the target folder using the `nargo` binary available on the shell `PATH` and returns the generated ABIs.
146+
- `compileUsingNargo`: Compiles an Aztec.nr project in the target folder using the `nargo` binary available on the shell `PATH` and returns the generated ABIs.
147147
- `generateTypescriptContractInterface`: Generates a typescript class for the given contract ABI.
148-
- `generateNoirContractInterface`: Generates a Noir interface struct for the given contract ABI.
148+
- `generateNoirContractInterface`: Generates a Aztec.nr interface struct for the given contract ABI.
149149

150150
## Next steps
151151

docs/docs/dev_docs/contracts/contract.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ contract MyContract {
1818
```
1919

2020

21-
> A note for vanilla Noir devs: There is no [`main()`](https://noir-lang.org/getting_started/breakdown/#mainnr) function within a Noir Contract scope. This is because more than one function of a contract may be called and proven as external (as opposed to inlined by the compiler).
21+
> A note for vanilla Noir devs: There is no [`main()`](https://noir-lang.org/getting_started/breakdown/#mainnr) function within a Noir `contract` scope. This is because more than one function of a contract may be called and proven as external (as opposed to inlined by the compiler).
2222
2323
## Structure of a contract
2424

docs/docs/dev_docs/contracts/layout.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Directory structure
44

5-
Here's a common layout for a basic Noir Contract project:
5+
Here's a common layout for a basic Aztec.nr Contract project:
66

77
```title="layout of an aztec contract project"
88
─── my_aztec_contract_project

docs/docs/dev_docs/contracts/main.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## What is Aztec.nr?
44

5-
**Aztec.nr** is a library for writing Aztec smart contracts.
5+
**Aztec.nr** is a framework for writing Aztec smart contracts.
66

77
## Nomenclature
88

@@ -12,25 +12,26 @@ A **smart contract** is just a collection of persistent state variables, and a c
1212

1313
An **Aztec smart contract** is a smart contract with **private** state variables and **private** functions.
1414

15-
**Aztec.nr** is a library for writing Aztec smart contracts, written in Noir.
15+
**Aztec.nr** is a framework for writing Aztec smart contracts, written in Noir.
1616

1717
# Getting started
1818

1919
## Install Noir
2020

21-
To write a Noir Contract, you need to write Noir, and to write Noir, you need to [install Nargo](https://noir-lang.org/getting_started/nargo_installation).
21+
To write an Aztec.nr contract, you need to write Noir, and to write Noir, you need to [install Nargo](https://noir-lang.org/getting_started/nargo_installation).
2222

2323
## Install Noir tooling
2424

25-
There are a number of tools to make writing Noir Contracts more pleasant. See [here](https://github.com/noir-lang/awesome-noir#get-coding).
25+
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).
2626

2727
## Quick start
2828

2929
:::danger TODO
3030
Starter kit
3131
:::
3232

33-
## Example Noir Contract
33+
34+
## Example Aztec.nr Contract
3435

3536
In keeping with the origins of blockchain, here's an example of a simple private token contract. Everyone's balances are private.
3637

docs/docs/dev_docs/contracts/types.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
See Noir docs for Noir types.
2-
See [state_variables](./state_variables.md) for Noir Contract state variable types.
2+
See [state_variables](./state_variables.md) for Aztec.nr state variable types.

docs/docs/dev_docs/contracts/workflow.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Noir contract workflow
1+
# Aztec.nr smart contract workflow
22

33
## Write
44

docs/docs/dev_docs/dapps/main.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Explain how to write a dapp using [`aztec.js`](https://github.com/AztecProtocol/
2121
- Use the e2e tests as inspiration.
2222
- Instantiate a contract
2323
- Deploy a contract
24-
- How to generate a nice typescript interface for a Noir Contract's functions (we have a little `.ts` program in `noir-contracts` to generate a types file at the moment... how would a user do this?)
24+
- How to generate a nice typescript interface for an Aztec.nr contract's functions (we have a little `.ts` program in `noir-contracts` to generate a types file at the moment... how would a user do this?)
2525
- Call 'view' functions
2626
- Simulate functions (simulate the result, without sending to the 'network')
2727
- Execute functions (send them to the 'network')

docs/docs/dev_docs/getting_started/sandbox.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Image from "@theme/IdealImage";
66

77
## Introduction
88

9-
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.
9+
The Aztec Sandbox aims to provide a local development system against which you can build and test Aztec.nr contracts in a fast, safe, and free environment.
1010

1111
Here we will walkthrough the process of retrieving the Sandbox, installing the client libraries and using it to deploy and use a fully private token contract on the Aztec network.
1212

0 commit comments

Comments
 (0)