Skip to content
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): add NFT tutorial #10161

Merged
merged 26 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
86c1df8
wip
critesjosh Nov 22, 2024
4173649
fix typos
critesjosh Nov 22, 2024
e93b518
edit docs tags
critesjosh Nov 26, 2024
390b1ae
Merge branch 'master' into jc/nft-tutorial
critesjosh Dec 9, 2024
5619478
add internal links and public/private getters
critesjosh Dec 9, 2024
1e7a61b
edits
critesjosh Dec 10, 2024
3c7fe5c
fix links
critesjosh Dec 10, 2024
961667b
fix link
critesjosh Dec 10, 2024
325ff41
final details
critesjosh Dec 10, 2024
c2ffdbb
Merge branch 'master' into jc/nft-tutorial
critesjosh Dec 10, 2024
a8591d5
Merge branch 'master' into jc/nft-tutorial
critesjosh Dec 11, 2024
a663646
Merge branch 'master' into jc/nft-tutorial
critesjosh Dec 12, 2024
61318f5
Merge branch 'master' into jc/nft-tutorial
critesjosh Dec 12, 2024
d1bc8cf
Merge branch 'master' into jc/nft-tutorial
critesjosh Dec 16, 2024
53863de
Update docs/docs/tutorials/codealong/contract_tutorials/nft_contract.md
critesjosh Dec 16, 2024
22025d9
Update docs/docs/tutorials/codealong/contract_tutorials/nft_contract.md
critesjosh Dec 16, 2024
ee6ff54
Update docs/docs/tutorials/codealong/contract_tutorials/nft_contract.md
critesjosh Dec 16, 2024
20ddb92
Merge branch 'master' into jc/nft-tutorial
critesjosh Dec 16, 2024
cee246a
Merge branch 'master' into jc/nft-tutorial
critesjosh Dec 17, 2024
01dd7e4
Merge branch 'master' into jc/nft-tutorial
critesjosh Dec 18, 2024
4bfd523
Merge branch 'master' into jc/nft-tutorial
critesjosh Dec 18, 2024
7b90657
Merge branch 'master' into jc/nft-tutorial
critesjosh Dec 19, 2024
01299ec
Merge branch 'master' into jc/nft-tutorial
critesjosh Dec 21, 2024
f556872
fix links, add partial note explaination
rahul-kothari Dec 23, 2024
23c3a43
Update noir-projects/noir-contracts/contracts/nft_contract/src/main.nr
rahul-kothari Dec 23, 2024
2d35478
fix fmt
critesjosh Dec 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/aztec/smart_contracts/contract_structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Here's a common layout for a basic Aztec.nr Contract project:
```

- See the vanilla Noir docs for [more info on packages](https://noir-lang.org/docs/noir/modules_packages_crates/crates_and_packages).
- You can review the structure of a complete contract in the token contract tutorial [here](../../tutorials/codealong/contract_tutorials/token_contract.md).
- You can review the structure of a complete contract in the NFT contract tutorial [here](../../tutorials/codealong/contract_tutorials/nft_contract.md).
2 changes: 1 addition & 1 deletion docs/docs/aztec/smart_contracts/functions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ tags: [functions]

Functions serve as the building blocks of smart contracts. Functions can be either **public**, ie they are publicly available for anyone to see and can directly interact with public state, or **private**, meaning they are executed completely client-side in the [PXE](../../concepts/pxe/index.md). Read more about how private functions work [here](./attributes.md#private-functions).

For a more practical guide of using multiple types of functions, follow the [token tutorial](../../../tutorials/codealong/contract_tutorials/token_contract.md).
For a more practical guide of using multiple types of functions, follow the [NFT tutorial](../../../tutorials/codealong/contract_tutorials/nft_contract.md).

Currently, any function is "mutable" in the sense that it might alter state. However, we also support static calls, similarly to EVM. A static call is essentially a call that does not alter state (it keeps state static).

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/aztec/smart_contracts/functions/visibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ tags: [functions]

In Aztec there are multiple different types of visibility that can be applied to functions. Namely we have `data visibility` and `function visibility`. This page explains these types of visibility.

For a practical guide of using multiple types of data and function visibility, follow the [token tutorial](../../../tutorials/codealong/contract_tutorials/token_contract.md).
For a practical guide of using multiple types of data and function visibility, follow the [NFT tutorial](../../../tutorials/codealong/contract_tutorials/nft_contract.md).

### Data Visibility

Data visibility is used to describe whether the data (or state) used in a function is generally accessible (public) or on a need to know basis (private).
Data visibility is used to describe whether the data (or state) used in a function is generally accessible (public) or on a need to know basis (private).

### Function visibility

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You can read about contract artifacts [here](../../../aztec/smart_contracts/cont

## Import the contract artifact

In this guide we are using a Token contract artifact. This comes from the [token contract tutorial](../../../tutorials/codealong/contract_tutorials/token_contract.md).
In this guide we are using a Token contract artifact.

#include_code import_token_contract yarn-project/end-to-end/src/composed/docs_examples.test.ts typescript

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ In this situation, try to mark the public function as `internal`. This ensures y

### Moving public data into the private domain

See [partial notes](../../../../../aztec/concepts/storage/partial_notes.md). Partial notes are how public balances are transferred to private [in the token contract](../../../../../tutorials/codealong/contract_tutorials/token_contract.md).
See [partial notes](../../../../../aztec/concepts/storage/partial_notes.md). Partial notes are how public balances are transferred to private [in the NFT contract](../../../../../tutorials/codealong/contract_tutorials/nft_contract.md).

### Discovering my notes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Notice how the `add` function shows the simplicity of appending a new note to al

### Apply

Try the [Token tutorial](../../../../../tutorials/codealong/contract_tutorials/token_contract.md) to see what notes can achieve. In this section you will also find other tutorials using notes in different ways.
Try the [NFT tutorial](../../../../../tutorials/codealong/contract_tutorials/nft_contract.md) to see what notes can achieve. In this section you will also find other tutorials using notes in different ways.

### Further reading

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ This library contains types that are used in the Aztec protocol. Find it on [Git
value_note = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="noir-projects/aztec-nr/value-note" }
```

This is a library for a note that stores one arbitrary value. You can see an example of how it might be used in the [token contract codealong tutorial](../../../tutorials/codealong/contract_tutorials/token_contract.md).
This is a library for a note that stores one arbitrary value. You can see an example of how it might be used in the [crowdfunding contract codealong tutorial](../../../tutorials/codealong/contract_tutorials/crowdfunding_contract.md).
Loading
Loading