Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion docs/smart-contracts/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Join us in creating a friendly auction contract, which allows users to place bid

![NEAR Playground](@site/static/assets/docs/smart-contracts/NEAR-Playground.png)

[![Try a Counter Example in NearPlay](https://img.shields.io/badge/Open%20in%20NearPlay-14b8a6?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0ibTE4IDcgNCA0LTQgNE00IDEybDQgNC00LTQgNC00Ii8+PC9zdmc+&logoColor=white)](https://nearplay.app/embed/3450a8a0-57dc-4d3a-b5d0-7bed58a0c2a9)

</details>

---
Expand Down Expand Up @@ -584,4 +586,4 @@ At the time of this writing, this example works with the following versions:
- uvx nearc: `0.9.2`
- emscripten: `4.0.9` (required for Python contracts)

</details>
</details>
21 changes: 20 additions & 1 deletion docs/smart-contracts/tutorials/basic-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Before tackling these examples, be sure to follow our [Quickstart Guide](../quic
target="_blank"
>
<p>A simple smart contract that stores a `string` message on its state</p>
<a href="https://nearplay.app/embed/919be62a-e1bc-49b5-b858-fb3d567d8489" target="_blank" rel="noopener noreferrer" className="button button--primary button--sm" style={{ marginTop: '0.5rem' }} onClick={(e) => e.stopPropagation()}>
Open in NearPlay
</a>
</Card>
</div>
<div className="auto-col">
Expand All @@ -47,6 +50,9 @@ Before tackling these examples, be sure to follow our [Quickstart Guide](../quic
target="_blank"
>
<p>A friendly counter that stores a number with methods to increment, decrement, and reset it</p>
<a href="https://nearplay.app/embed/3450a8a0-57dc-4d3a-b5d0-7bed58a0c2a9" target="_blank" rel="noopener noreferrer" className="button button--primary button--sm" style={{ marginTop: '0.5rem' }} onClick={(e) => e.stopPropagation()}>
Open in NearPlay
</a>
</Card>
</div>
<div className="auto-col">
Expand All @@ -57,7 +63,10 @@ Before tackling these examples, be sure to follow our [Quickstart Guide](../quic
href="https://github.com/near-examples/guest-book-examples"
target="_blank"
>
<p>Users can sign the guest book, optionally paying `0.01 Ⓝ` to mark their messages as "premium</p>
<p>Users can sign the guest book, optionally paying `0.01 Ⓝ` to mark their messages as "premium"</p>
<a href="https://nearplay.app/embed/3862fb26-aeee-471f-90ad-f900e820de3f" target="_blank" rel="noopener noreferrer" className="button button--primary button--sm" style={{ marginTop: '0.5rem' }} onClick={(e) => e.stopPropagation()}>
Open in NearPlay
</a>
</Card>
</div>
<div className="auto-col">
Expand All @@ -69,6 +78,9 @@ Before tackling these examples, be sure to follow our [Quickstart Guide](../quic
target="_blank"
>
<p>Forward NEAR tokens to a beneficiary while tracking all donations. Learn how contracts handle token transfers</p>
<a href="https://nearplay.app/embed/436d9ff9-a15c-418a-8350-ae5eead387c7" target="_blank" rel="noopener noreferrer" className="button button--primary button--sm" style={{ marginTop: '0.5rem' }} onClick={(e) => e.stopPropagation()}>
Open in NearPlay
</a>
</Card>
</div>
<div className="auto-col">
Expand All @@ -80,10 +92,17 @@ Before tackling these examples, be sure to follow our [Quickstart Guide](../quic
target="_blank"
>
<p>Guess the outcome of a coin flip and earn points. Demonstrates how to handle randomness on the blockchain</p>
<a href="https://nearplay.app/embed/10aab4a0-deee-45a3-b847-8d229358cad3" target="_blank" rel="noopener noreferrer" className="button button--primary button--sm" style={{ marginTop: '0.5rem' }} onClick={(e) => e.stopPropagation()}>
Open in NearPlay
</a>
</Card>
</div>
</div>

:::tip Try Without Setup
Want to try these examples immediately? Click the **"Open in NearPlay"** button on any card above to start coding in [NearPlay](https://nearplay.app) - no installation required!
:::

---

## Structure of the Examples
Expand Down
18 changes: 9 additions & 9 deletions docs/tutorials/fts.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ If you are new to Rust and want to dive into smart contract development, our [Qu

These are the steps that will bring you from **_Zero_** to **_Hero_** in no time! 💪

| Step | Name | Description |
| ---- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | [Pre-deployed contract](https://near-examples.github.io/ft-tutorial/predeployed-contract) | Receive FTs without the need to code, create, or deploy a smart contract. |
| 2 | [Contract architecture](https://near-examples.github.io/ft-tutorial/skeleton) | Learn the basic architecture of the FT smart contract and compile the code. |
| 3 | [Defining a Token](https://near-examples.github.io/ft-tutorial/defining-a-token) | Flesh out what it means to have a FT and how you can customize your own. |
| 4 | [Circulating Supply](https://near-examples.github.io/ft-tutorial/circulating-supply) | Learn how to create an initial supply and have the token show up in your wallet. |
| 5 | [Registering Accounts](https://near-examples.github.io/ft-tutorial/registering-accounts) | Explore how you can implement and understand the storage management standard to avoid malicious users from draining your funds. |
| 6 | [Transferring FTs](https://near-examples.github.io/ft-tutorial/transfers) | Learn how to transfer FTs and discover some of the true powers that the core standard brings |
| 7 | [Marketplace](https://near-examples.github.io/ft-tutorial/marketplace) | Learn about how common marketplaces operate on NEAR and dive into some of the code that allows buying and selling NFTs by using Fungible Tokens. |
| Step | Name | Description | Try in NearPlay |
| ---- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| 1 | [Pre-deployed contract](https://near-examples.github.io/ft-tutorial/predeployed-contract) | Receive FTs without the need to code, create, or deploy a smart contract. | - |
| 2 | [Contract architecture](https://near-examples.github.io/ft-tutorial/skeleton) | Learn the basic architecture of the FT smart contract and compile the code. | [![Open in NearPlay](https://img.shields.io/badge/Open%20in%20NearPlay-14b8a6?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0ibTE4IDcgNCA0LTQgNE00IDEybDQgNC00LTQgNC00Ii8+PC9zdmc+&logoColor=white)](https://nearplay.app/embed/9fc2893b-3189-474f-aa56-6153f30a3c8d) |
| 3 | [Defining a Token](https://near-examples.github.io/ft-tutorial/defining-a-token) | Flesh out what it means to have a FT and how you can customize your own. | [![Open in NearPlay](https://img.shields.io/badge/Open%20in%20NearPlay-14b8a6?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0ibTE4IDcgNCA0LTQgNE00IDEybDQgNC00LTQgNC00Ii8+PC9zdmc+&logoColor=white)](https://nearplay.app/embed/2da829b9-b042-4a74-b39c-6258464a620a) |
| 4 | [Circulating Supply](https://near-examples.github.io/ft-tutorial/circulating-supply) | Learn how to create an initial supply and have the token show up in your wallet. | [![Open in NearPlay](https://img.shields.io/badge/Open%20in%20NearPlay-14b8a6?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0ibTE4IDcgNCA0LTQgNE00IDEybDQgNC00LTQgNC00Ii8+PC9zdmc+&logoColor=white)](https://nearplay.app/embed/bcb2b84a-d97e-4e00-a095-0f8f11d6ec1e) |
| 5 | [Registering Accounts](https://near-examples.github.io/ft-tutorial/registering-accounts) | Explore how you can implement and understand the storage management standard to avoid malicious users from draining your funds. | [![Open in NearPlay](https://img.shields.io/badge/Open%20in%20NearPlay-14b8a6?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0ibTE4IDcgNCA0LTQgNE00IDEybDQgNC00LTQgNC00Ii8+PC9zdmc+&logoColor=white)](https://nearplay.app/embed/a561a30e-b7d4-41fa-b1cb-3663c369b9b9) |
| 6 | [Transferring FTs](https://near-examples.github.io/ft-tutorial/transfers) | Learn how to transfer FTs and discover some of the true powers that the core standard brings | [![Open in NearPlay](https://img.shields.io/badge/Open%20in%20NearPlay-14b8a6?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0ibTE4IDcgNCA0LTQgNE00IDEybDQgNC00LTQgNC00Ii8+PC9zdmc+&logoColor=white)](https://nearplay.app/embed/dcdae678-db6a-45e0-9de2-c1294aa05bfd) |
| 7 | [Marketplace](https://near-examples.github.io/ft-tutorial/marketplace) | Learn about how common marketplaces operate on NEAR and dive into some of the code that allows buying and selling NFTs by using Fungible Tokens. | [![Open in NearPlay](https://img.shields.io/badge/Open%20in%20NearPlay-14b8a6?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0ibTE4IDcgNCA0LTQgNE00IDEybDQgNC00LTQgNC00Ii8+PC9zdmc+&logoColor=white)](https://nearplay.app/embed/e313c93f-4752-4b68-808d-55ad0a98476a) |

---

Expand Down