You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are new to Rust and want to dive into smart contract development, our [Quick-start guide](../../smart-contracts/quickstart.md) is a great place to start
24
+
If you are new to Rust and want to dive into smart contract development, our [Quick-start guide](https://docs.near.org/smart-contracts/quickstart) is a great place to start
24
25
:::
25
26
26
27
---
@@ -31,21 +32,21 @@ These are the steps that will bring you from **_Zero_** to **_Hero_** in no time
| 1 |[Pre-deployed contract](/tutorials/nfts/predeployed-contract)| Mint an NFT without the need to code, create, or deploy a smart contract. |
35
-
| 2 |[Contract architecture](/tutorials/nfts/skeleton)| Learn the basic architecture of the NFT smart contract and compile code. |
36
-
| 3 |[Minting](/tutorials/nfts/minting)| Flesh out the skeleton so the smart contract can mint a non-fungible token. |
37
-
| 4 |[Upgrade a contract](/tutorials/nfts/upgrade-contract)| Discover the process to upgrade an existing smart contract. |
38
-
| 5 |[Enumeration](/tutorials/nfts/enumeration)| Explore enumeration methods that can be used to return the smart contract's states. |
39
-
| 6 |[Core](/tutorials/nfts/core)| Extend the NFT contract using the core standard which allows token transfer. |
40
-
| 7 |[Events](/tutorials/nfts/events)| The events extension, allowing the contract to react on certain events. |
41
-
| 8 |[Approvals](/tutorials/nfts/approvals)| Expand the contract allowing other accounts to transfer NFTs on your behalf. |
42
-
| 9 |[Royalty](/tutorials/nfts/royalty)| Add NFT royalties allowing for a set percentage to be paid out to the token creator. |
43
-
| 10 |[Marketplace](/tutorials/nfts/marketplace)| Learn about how common marketplaces operate on NEAR and dive into some of the code that allows buying and selling NFTs. |
35
+
| 1 |[Pre-deployed contract](0-predeployed.md)| Mint an NFT without the need to code, create, or deploy a smart contract. |
36
+
| 2 |[Contract architecture](1-skeleton.md)| Learn the basic architecture of the NFT smart contract and compile code. |
37
+
| 3 |[Minting](2-minting.md)| Flesh out the skeleton so the smart contract can mint a non-fungible token. |
38
+
| 4 |[Upgrade a contract](2-upgrade.md)| Discover the process to upgrade an existing smart contract. |
39
+
| 5 |[Enumeration](3-enumeration.md)| Explore enumeration methods that can be used to return the smart contract's states. |
40
+
| 6 |[Core](4-core.md)| Extend the NFT contract using the core standard which allows token transfer. |
41
+
| 7 |[Events](7-events.md)| The events extension, allowing the contract to react on certain events. |
42
+
| 8 |[Approvals](5-approvals.md)| Expand the contract allowing other accounts to transfer NFTs on your behalf. |
43
+
| 9 |[Royalty](6-royalty.md)| Add NFT royalties allowing for a set percentage to be paid out to the token creator. |
44
+
| 10 |[Marketplace](8-marketplace.md)| Learn about how common marketplaces operate on NEAR and dive into some of the code that allows buying and selling NFTs. |
44
45
45
46
---
46
47
47
48
## Next steps
48
49
49
-
Ready to start? Jump to the [Pre-deployed Contract](/tutorials/nfts/predeployed-contract) tutorial and begin your learning journey!
50
+
Ready to start? Jump to the [Pre-deployed Contract](0-predeployed.md) tutorial and begin your learning journey!
50
51
51
52
If you already know about non-fungible tokens and smart contracts, feel free to skip and jump directly to the tutorial of your interest. The tutorials have been designed so you can start at any given point!
Copy file name to clipboardExpand all lines: website/docs/0-predeployed.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Create your first non-fungible token by using a pre-deployed NFT smart contract
14
14
15
15
## Prerequisites
16
16
17
-
To complete this tutorial successfully, you'll need [a NEAR Wallet](https://testnet.mynearwallet.com/create) and [NEAR CLI](/tools/near-cli#installation)
17
+
To complete this tutorial successfully, you'll need [a NEAR Wallet](https://testnet.mynearwallet.com/create) and [NEAR CLI](https://docs.near.org/tools/near-cli#installation)
18
18
19
19
---
20
20
@@ -146,7 +146,7 @@ Now try going to your [NEAR Wallet](https://testnet.mynearwallet.com) and view y
146
146
147
147
This basic example illustrates all the required steps to call an NFT smart contract on NEAR and start minting your own non-fungible tokens.
148
148
149
-
Now that you're familiar with the process, you can jump to [Contract Architecture](/tutorials/nfts/skeleton) and learn more about the smart contract structure and how you can build your own NFT contract from the ground up.
149
+
Now that you're familiar with the process, you can jump to [Contract Architecture](1-skeleton.md) and learn more about the smart contract structure and how you can build your own NFT contract from the ground up.
Copy file name to clipboardExpand all lines: website/docs/1-skeleton.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ You can find the skeleton contract in our [GitHub repository](https://github.com
15
15
:::
16
16
17
17
:::info New to Rust?
18
-
If you are new to Rust and want to dive into smart contract development, our [Quick-start guide](../../smart-contracts/quickstart.md) is a great place to start.
18
+
If you are new to Rust and want to dive into smart contract development, our [Quick-start guide](https://docs.near.org/smart-contracts/quickstart) is a great place to start.
19
19
:::
20
20
21
21
---
@@ -90,7 +90,7 @@ This file contains the logic that complies with the standard's [approvals manage
Copy file name to clipboardExpand all lines: website/docs/2-minting.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -230,7 +230,7 @@ For deployment, you will need a NEAR account with the keys stored on your local
230
230
Please ensure that you deploy the contract to an account with no pre-existing contracts. It's easiest to simply create a new account or create a sub-account for this tutorial.
231
231
:::
232
232
233
-
Log in to your newly created account with [`near-cli-rs`](../../tools/cli.md) by running the following command in your terminal.
233
+
Log in to your newly created account with [`near-cli-rs`](https://docs.near.org/tools/cli) by running the following command in your terminal.
234
234
235
235
```bash
236
236
near account import-account using-web-wallet network-config testnet
Copy file name to clipboardExpand all lines: website/docs/2-upgrade.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Upgrading contracts, when done right, can be an immensely powerful tool. If done
24
24
25
25
The NEAR Runtime will read the serialized state from disk and it will attempt to load it using the current contract code. When your code changes, it might not be able to figure out how to do this.
26
26
27
-
You need to strategically upgrade your contracts and make sure that the runtime will be able to read your current state with the new contract code. For more information about upgrading contracts and some best practices, see the NEAR SDK's [upgrading contracts](../../smart-contracts/release/upgrade.md) write-up.
27
+
You need to strategically upgrade your contracts and make sure that the runtime will be able to read your current state with the new contract code. For more information about upgrading contracts and some best practices, see the NEAR SDK's [upgrading contracts](https://docs.near.org/smart-contracts/release/upgrade) write-up.
Copy file name to clipboardExpand all lines: website/docs/3-enumeration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,7 +140,7 @@ This should return an output similar to the following:
140
140
141
141
## Conclusion
142
142
143
-
In this tutorial, you have added two [new enumeration functions](/tutorials/nfts/enumeration#modifications-to-the-contract), and now you have a basic NFT smart contract with minting and enumeration methods in place. After implementing these modifications, you redeployed the smart contract and tested the functions using the CLI.
143
+
In this tutorial, you have added two [new enumeration functions](#modifications-to-the-contract), and now you have a basic NFT smart contract with minting and enumeration methods in place. After implementing these modifications, you redeployed the smart contract and tested the functions using the CLI.
144
144
145
145
In the [next tutorial](4-core.md), you'll implement the core functions needed to allow users to transfer the minted tokens.
There are a couple things to notice here. Firstly, we've introduced a new function called `assert_one_yocto()`, which ensures the user has attached exactly one yoctoNEAR to the call. This is a [security measure](../../smart-contracts/security/one_yocto.md) to ensure that the user is signing the transaction with a [full access key](../../protocol/access-keys.md).
64
+
There are a couple things to notice here. Firstly, we've introduced a new function called `assert_one_yocto()`, which ensures the user has attached exactly one yoctoNEAR to the call. This is a [security measure](https://docs.near.org/smart-contracts/security/one_yocto) to ensure that the user is signing the transaction with a [full access key](https://docs.near.org/protocol/access-keys).
65
65
66
66
Since the transfer function is potentially transferring very valuable assets, you'll want to make sure that whoever is calling the function has a full access key.
67
67
@@ -125,7 +125,7 @@ This way, we can effectively **attach an NFT to a function call**.
The function will first assert that the caller attached exactly 1 yocto for security purposes. It will then transfer the NFT using `internal_transfer` and start the cross contract call. It will call the method `nft_on_transfer` on the `receiver_id`'s contract, and create a promise to call back `nft_resolve_transfer` with the result. This is a very common workflow when dealing with [cross contract calls](../../smart-contracts/anatomy/crosscontract.md).
128
+
The function will first assert that the caller attached exactly 1 yocto for security purposes. It will then transfer the NFT using `internal_transfer` and start the cross contract call. It will call the method `nft_on_transfer` on the `receiver_id`'s contract, and create a promise to call back `nft_resolve_transfer` with the result. This is a very common workflow when dealing with [cross contract calls](https://docs.near.org/smart-contracts/anatomy/crosscontract).
129
129
130
130
As dictated by the core standard, the function we are calling (`nft_on_transfer`) needs to return a boolean stating whether or not you should return the NFT to its original owner.
The function will first assert that the user has attached **at least** one yoctoNEAR (which we'll implement soon). This is both for security and to cover storage. When someone approves an account ID, they're storing that information on the contract. As you saw in the [minting tutorial](/tutorials/nfts/minting), you can either have the smart contract account cover the storage, or you can have the users cover that cost. The latter is more scalable and it's the approach you'll be working with throughout this tutorial.
152
+
The function will first assert that the user has attached **at least** one yoctoNEAR (which we'll implement soon). This is both for security and to cover storage. When someone approves an account ID, they're storing that information on the contract. As you saw in the [minting tutorial](2-minting.md), you can either have the smart contract account cover the storage, or you can have the users cover that cost. The latter is more scalable and it's the approach you'll be working with throughout this tutorial.
153
153
154
154
After the assertion comes back with no problems, you get the token object and make sure that only the owner is calling this method. Only the owner should be able to allow other accounts to transfer their NFTs. You then get the next approval ID and insert the passed in account into the map with the next approval ID. If it's a new approval ID, storage must be paid. If it's not a new approval ID, no storage needs to be paid and only attaching 1 yoctoNEAR would be enough.
Copy file name to clipboardExpand all lines: website/docs/9-series.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -337,7 +337,7 @@ If you now query for the metadata of the contract, it should return our default
337
337
338
338
## Creating The Series
339
339
340
-
The next step is to create two different series. One will have a price for lazy minting and the other will simply be a basic series with no price. The first step is to create an owner [sub-account](/tools/near-cli#create) that you can use to create both series
340
+
The next step is to create two different series. One will have a price for lazy minting and the other will simply be a basic series with no price. The first step is to create an owner [sub-account](https://docs.near.org/tools/near-cli#create) that you can use to create both series
341
341
342
342
<TabsgroupId="cli-tabs">
343
343
<TabItemvalue="short"label="Short">
@@ -547,7 +547,7 @@ Which has
547
547
548
548
## Minting NFTs
549
549
550
-
Now that you have both series created, it's time to now mint some NFTs. You can either login with an existing NEAR wallet using [`near login`](/tools/near-cli#import) or you can create a sub-account of the NFT contract. In our case, we'll use a sub-account.
550
+
Now that you have both series created, it's time to now mint some NFTs. You can either login with an existing NEAR wallet using [`near login`](https://docs.near.org/tools/near-cli#import) or you can create a sub-account of the NFT contract. In our case, we'll use a sub-account.
0 commit comments