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
Copy file name to clipboardExpand all lines: pages/lessons/projects/5.mdx
+67-33Lines changed: 67 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,12 +26,12 @@ Expect somewhere from one to six hours to complete the lesson, depending on your
26
26
27
27
## What are we building
28
28
29
-
In the first in this track of tutorials, you created a basic smart contract using Remix, you then shifted to a dedicated developer's environment and created and deployed an NFT contract to an actual test network. In lesson 3 you added tiers to your NFTs and finally learnt to make your contracts airtight using tests in lesson 4. Now we're going use all of this knowledge and connect it to a frontend for users to see and interact with.
29
+
In the first in this track of tutorials, you created a basic smart contract using Remix. Then your shift to a dedicated developer's environment to create and deploy an NFT contract to an actual test network. In lesson 3 you added tiers to your NFTs. And you finally learnt to make your contracts airtight by building your own automated tests in the fourth in the series. Now we're going use all of this knowledge and connect it to a frontend for users to see and interact with.
30
30
31
31
32
32
33
33
We'll create a basic **NFT minting application** that displays the three tiers of NFTs
34
-
created in our smart contract and gives users a one-click option to mint them. Once minted, users will be redirected to a page that displays information of their mint. We'll need some extra magic to make that all happen. For handling wallet connections to our application, we'll be introducing you to *RainbowKit*. And using the provided *hooks* from *WAGMI*, we can check the connection to the wallet and call functions from our smart contract through the frontend. *RainbowKit* and *WAGMI* are just another couple of shining examples of open source public goods. We love open source at *Developer_DAO*. Public goods are goood!
34
+
created in our smart contract and gives users a one-click option to mint them. Once minted, users will be redirected to a page that displays information of their mint. We'll need some extra magic to make that all happen. For handling wallet connections to our application, we'll be introducing you to *RainbowKit*. And using the provided *hooks* from *WAGMI*, we can check the connection to the wallet and call functions from our smart contract through the frontend. *RainbowKit* and *WAGMI* are just another couple of shining examples of open source public goods. We love open source at *Developer_DAO*. And public goods are gooood!
35
35
36
36
37
37
{/* - [RainbowKit](https://www.rainbowkit.com/docs/introduction) for out-of-the-box
@@ -46,11 +46,13 @@ functions from our smart contract through the frontend using the provided *hooks
46
46
### Lesson breakdown
47
47
### Quick breakdown of lesson steps */}
48
48
## Lesson steps
49
-
-
50
-
-
51
-
-
52
-
-
53
-
-
49
+
- Set up our development environment with TierNFT project
50
+
- initialise a nextJS app
51
+
- Install RainbowKit, WAGMI and Ethers to create main application
We're going to start where we left off in lesson 4. Open your code editor and
77
-
`cd` into the **`TierNFT`** project directory.
78
-
79
-
For all things related to our frontend we are going to create a new sub-directory
80
-
within our project's root directory to maintain good practice, keep our code clean,
81
-
and easy to locate and read.
81
+
We're going to start where we left off in *Write Automated Tests for your TierNFT*.
82
82
83
-
The first step is to initiate a [nextJS](https://nextjs.org/) application inside the
84
-
project's root directory by running the following command.
83
+
Openyourcodeeditorand`cd`intothe**`TierNFT`**projectdirectory. Forallthingsrelatedtoourfrontendwearegoingtocreateanewsub-directorywithinourproject's root directory to maintain good practice, keep our code clean, and be easy to locate and read. The first step is to initiate a *nextJS* application.
85
84
86
85
<Calloutemoji="💡">
87
-
Make sure you are in your root directory before running the command.
86
+
Makesureyouareinyourproject's root directory before continuing.
88
87
</Callout>
89
88
90
-
The command creates a sub-directory named `frontend` inside our root directory
@@ -185,6 +217,7 @@ of our choice along with some other customisations.
185
217
for the providers we will be using. In our app we are using an `alchemyProvider` along
186
218
with a fall back `publicProvider`. A provider allows our application to communicate with
187
219
a blockchain.
220
+
{/* It would be better to have a side drawer on 'state' and 'useEffect' here. We already have a few external links, and we have hardly built anything so far in this lesson. That's a lot of potential rabbitholes. */}
188
221
-`useEffect` and `useState` are react hooks that help us perform side effects and
189
222
capture the state, respectively. More on [state](https://www.freecodecamp.org/news/what-is-state-in-react-explained-with-examples/)
190
223
and the [useEffect](https://www.freecodecamp.org/news/react-useeffect-absolute-beginners/) hook.
@@ -226,6 +259,7 @@ be added simply using the following syntax: `chain.chain_name`.
226
259
For custom providers, like the `alchemyProvider` we can pass in our private
227
260
`apiKey` as well.
228
261
262
+
{/* Only the API key? Or the whole URL?: */}
229
263
Set your API Key in a new file named `.env` inside our `frontend` directory
0 commit comments