Skip to content

Commit ffda9e4

Browse files
committed
Add mini-quiz file path placeholders + 40% of mini-quiz content
1 parent d938351 commit ffda9e4

File tree

41 files changed

+659
-31
lines changed

Some content is hidden

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

41 files changed

+659
-31
lines changed

pages/lessons/projects/2.mdx

Lines changed: 82 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,18 @@ Welcome to this lesson on creating a series of NFTs using Solidity smart contrac
2929

3030
We have some checkpoint questions for you throughout the lesson for testing either your previous knowledge, predicting next steps in the lesson, or letting you see for yourself how well you're absorbing the new content. Needless to say, there's a quiz at the end, so make sure you're checking out all the side-drawers for a deeper dive of the new concepts. To complete the lesson, expect somewhere between two and six hours depending on your previous experience and the need to learn new ideas. Let's make developing enjoyable, so take care of your well-being - we have a pomodoro timer ⌛ for you in the menu header to let you ensure you’re taking regular breaks, and please *do* go outside and 'touch some grass'😊. Nature is the source of our well-being.
3131

32+
PART 1 INTRO
3233
## What are we buidling?
3334

3435
In this project we will build a basic NFT smart contract, that will serve us as
3536
the backbone or foundation for almost any future NFT project.
3637

37-
<SideDrawer buttonText="What do you already know about NFTs?" title="Build on your previous knowledge">
38-
<Question question="question-1" />
38+
<SideDrawer buttonText="Previous knowledge + prediction for parts 1 and 2" title="Build on your previous knowledge">
39+
<Question question="lesson-2/1-intro/Q1" />
40+
<Question question="lesson-2/1-intro/Q2" />
41+
<Question question="lesson-2/1-intro/Q3" />
42+
<Question question="lesson-2/1-intro/Q4" />
43+
<Question question="lesson-2/1-intro/Q5" />
3944
</SideDrawer>
4045
<br/>
4146

@@ -74,6 +79,7 @@ By the end of this lesson we are going to learn a lot of things. A simple breakd
7479
- *Mint*, i.e. create our very own NFT
7580
- See our NFT in a public marketplace
7681

82+
PART 2 TOOLS/ENVIRONMENT
7783
## Set up your environment
7884

7985
Like the pros. For that we are going to set up our working environment in our
@@ -223,12 +229,16 @@ widely used and fully tested and audited.
223229
</SideDrawer>
224230
<br/>
225231

226-
Just before you go .....
227-
<SideDrawer buttonText="What's your opinion?" title="Coding is cool, but we want our contracts water tight">
228-
<Question question="question-2"/>
232+
<SideDrawer buttonText="Assessment of part 1 and 2 and prediction of 3" title="Assessment of part 1 and 2 and prediction of 3">
233+
<Question question="lesson-2/2-tools-environment/Q1" />
234+
<Question question="lesson-2/2-tools-environment/Q2" />
235+
<Question question="lesson-2/2-tools-environment/Q3" />
236+
<Question question="lesson-2/2-tools-environment/Q4" />
237+
<Question question="lesson-2/2-tools-environment/Q5" />
229238
</SideDrawer>
230239
<br/>
231240

241+
PART 3 SOLIDITY/TOKEN STANDARDS
232242
## Let’s start coding!
233243

234244
With our project folder ready, we can now fire up our Code Editor.
@@ -275,12 +285,12 @@ delegates to transfer them, etc).
275285
</SideDrawer>
276286

277287
All of it is pretty much for our project, but luckily OpenZeppelin has developed
278-
a lot of contracts that implement these standards and more, they are widely
279-
used and audited and, the thing we love about them, they are open-source and we
288+
a lot of contracts that implement these standards and more. They are widely
289+
used and audited, and the thing we love about them, they are open-source and we
280290
can use them to leverage our learning process. With that in our heads, we are
281291
going to use them inside our contract.
282292

283-
## Standing in the shoulder of giants
293+
## Standing on the shoulder of giants
284294

285295
For this we are going to ‘inherit’ (think of _using the properties of_ or
286296
_extending_ for now) the ERC721 contract from OpenZeppelin. In the same way you
@@ -347,6 +357,18 @@ We made our totalSupply variable private and it will store exactly how many NFTs
347357
have been minted so far. In the next step we will use this variable to identify
348358
each new NFT that’s created.
349359

360+
361+
<SideDrawer buttonText="Assessment of part 3 and prediction of 4" title="Assessment of part 3 and prediction of 4">
362+
<Question question="lesson-2/3-sol-erc/Q1" />
363+
<Question question="lesson-2/3-sol-erc/Q2" />
364+
<Question question="lesson-2/3-sol-erc/Q3" />
365+
<Question question="lesson-2/3-sol-erc/Q4" />
366+
<Question question="lesson-2/3-sol-erc/Q5" />
367+
</SideDrawer>
368+
<br/>
369+
370+
PART 4. NFT IDENTITY
371+
350372
## Mint… Feels Good
351373

352374
Once we have a way to identify our NFTs, we only need a way to create them.
@@ -474,15 +496,25 @@ experience.
474496
We have most of our smart contract ready, so we are going to focus on the media
475497
that we want on our NFTs.
476498

477-
We propose a "Choose your own adventure" for this part of the project:
499+
We propose a *choose your own adventure* for this part of the project:
478500

479501
- If you want to go quickly into deploying the contract, you can use the images
480502
and files that we prepared, and move on to the next section.
481503

482-
- If you want to create your own images and have an NFT of your own, you'll have
483-
to take the winding road and learn a little about the standard used to identify NFTs
504+
- If you want to create your own images and have an NFT of your own, why not take the winding road and learn a little about the standard used to identify NFTs
484505
and a solution to store files in a decentralized way.
485506

507+
<SideDrawer buttonText="Assessment of part 4 and prediction of 6" title="Assessment of part 4 and prediction of 6">
508+
<Question question="lesson-2/4-nft-id/Q1" />
509+
<Question question="lesson-2/4-nft-id/Q2" />
510+
<Question question="lesson-2/4-nft-id/Q3" />
511+
<Question question="lesson-2/4-nft-id/Q4" />
512+
<Question question="lesson-2/4-nft-id/Q5" />
513+
</SideDrawer>
514+
<br/>
515+
516+
PART 5 JSON/IPFS (SEPARATE SIDE DRAWER QUIZ)
517+
486518
<SideDrawer buttonText="Longer Path (learn about JSON and IPFS)">
487519
## JSON
488520

@@ -612,14 +644,26 @@ an IPFS service will surely help you get ahead in your learning.
612644

613645
Have your json files folder IPFS link saved (the full link, that links to all
614646
the files), for we will use it in our next step.
647+
<SideDrawer buttonText="Assessment of part 5 and prediction of 6" title="Assessment of part 5 and prediction of 6">
648+
<Question question="lesson-2/5-sidedrawer-json-ipfs/Q1" />
649+
<Question question="lesson-2/5-sidedrawer-json-ipfs/Q2" />
650+
<Question question="lesson-2/5-sidedrawer-json-ipfs/Q3" />
651+
<Question question="lesson-2/5-sidedrawer-json-ipfs/Q4" />
652+
<Question question="lesson-2/5-sidedrawer-json-ipfs/Q5" />
653+
</SideDrawer>
654+
<br/>
655+
Good for you for taking on this extra adventure 🧙🏾
656+
<br/><br/>
615657
</SideDrawer>
616658

617-
## Deploy! (back to Solidity, kind of)
659+
660+
PART 6 SCRIPTS AND COMPILE
661+
## Deploy! Back to Solidity... kind of...
618662

619663
You might remember this from the previous project, when we used Remix. Once we
620-
have our contract ready, we can compile and deploy. In remix, we had a bunch of
621-
buttons in the web interface, but now we are getting pro (a.k.a. doing it all
622-
ourselves, with the console).
664+
have our contract ready, we can compile and deploy. In Remix, we had a bunch of
665+
buttons in the web interface, but now we are getting pro, a.k.a. doing it all
666+
ourselves, with the console.
623667

624668
Why did we deviate from Solidity? Because of the way we set our contract up.
625669
When we deploy we tell our contract where our files are stored. Therefore we had
@@ -750,6 +794,17 @@ Let's run the script again and see what it tells us! Here's my output:
750794
We got the URI of the token, right? So, now we know we can deploy it (and mint)
751795
to a real blockchain!
752796

797+
<SideDrawer buttonText="Assessment of part 6 and prediction of 7" title="Assessment of part 6 and prediction of 7">
798+
<Question question="lesson-2/6-scripts-compile/Q1" />
799+
<Question question="lesson-2/6-scripts-compile/Q2" />
800+
<Question question="lesson-2/6-scripts-compile/Q3" />
801+
<Question question="lesson-2/6-scripts-compile/Q4" />
802+
<Question question="lesson-2/6-scripts-compile/Q5" />
803+
</SideDrawer>
804+
<br/>
805+
806+
PART 7 DEPLOY. TESTNETS. WALLETS. OPENSEA
807+
753808
## Things just got real!
754809

755810
For us to get our contract out of our computers and into the real world, we are
@@ -851,6 +906,17 @@ Please, if you are already a developer and you plan to use git to store your
851906
project, don't store your `hardhat.config.js` on it, because you will have your
852907
private key there.
853908

909+
<SideDrawer buttonText="Assessment of part 7 and prediction of 8" title="Assessment of part 7 and prediction of 8">
910+
<Question question="lesson-2/7-connect-real-world/Q1" />
911+
<Question question="lesson-2/7-connect-real-world/Q2" />
912+
<Question question="lesson-2/7-connect-real-world/Q3" />
913+
<Question question="lesson-2/7-connect-real-world/Q4" />
914+
<Question question="lesson-2/7-connect-real-world/Q5" />
915+
</SideDrawer>
916+
<br/>
917+
918+
PART 8 DEPLOY TO TESTNET
919+
854920
Ok. We are ready, let's deploy to the Goerli testnet!
855921

856922
Now we need to run our deploy.js script and the deployment is going to cost us
@@ -892,7 +958,7 @@ Wow, you have created your own NFT collection from scratch. What a superstar! Yo
892958
But first, we want you to go and 'touch some grass'. So why don't you scroll to the top and set the pomodoro timer, and when you come back after your well earned rest, take the quiz. Breathe and enjoy.
893959

894960
<br/>
895-
<Quiz quiz="quiz-lesson-2" />
961+
<Quiz quiz="lesson-2-quiz" />
896962
<br/>
897963

898964
Congratulations on your results. You're now a supreme open-sourcerer! See you in the next lesson, where you will be adding to your knowledge of creating ERC721s, by creating *tiered NFTs*. See you there....
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"question": "What is Hardhat? ",
3+
"options": [
4+
{
5+
"answer": "A set of tools that includes a local mini blockchain that can run on your machine",
6+
"correct": true
7+
},
8+
{
9+
"answer": "A code editor in the browser "
10+
},
11+
{
12+
"answer": "A security patch for most Linux operating systems"
13+
},
14+
{
15+
"answer": "Safety apparel for space travel "
16+
}
17+
]
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"question": "In Solidity, what does the ^ symbol represent when specifying the compiler version?",
3+
"options": [
4+
{
5+
"answer": "It denotes an exclusive range of compiler versions"
6+
},
7+
{
8+
"answer": "It indicates a fallback function"
9+
},
10+
{
11+
"answer": "It signifies a dangerous computation"
12+
},
13+
{
14+
"answer": " It specifies a compatible range of compiler versions",
15+
"correct": true
16+
}
17+
]
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"question": "Which address does the msg.sender variable represent in Solidity?",
3+
"options": [
4+
{
5+
"answer": "The contract owner"
6+
},
7+
{
8+
"answer": "The Ethereum smart contract"
9+
},
10+
{
11+
"answer": "The Ethereum network"
12+
},
13+
{
14+
"answer": "The caller of the current function",
15+
"correct": true
16+
}
17+
]
18+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"question": "What is npm? ",
3+
"options": [
4+
{
5+
"answer": "A Node.js module that provides a blockchain for running smart contracts"
6+
},
7+
{
8+
"answer": "A package manager from Node.js ",
9+
"correct": true
10+
},
11+
{
12+
"answer": "A framework for building web applications "
13+
}
14+
]
15+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"question": "Which of the following steps are included in building a basic NFT smart contract?",
3+
"options": [
4+
{
5+
"answer": "Install dependencies."
6+
},
7+
{
8+
"answer": "Create a project."
9+
},
10+
{
11+
"answer": "Create a smart contract using a code editor."
12+
},
13+
{
14+
"answer": "All of the above",
15+
"correct": true
16+
}
17+
]
18+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"question": "What is the purpose of the --save-dev flag when installing dependencies with npm? ",
3+
"options": [
4+
{
5+
"answer": "It specifies the version of the dependency to install."
6+
},
7+
{
8+
"answer": "It tells npm to save the dependencies in a development environment.",
9+
"correct": true
10+
},
11+
{
12+
"answer": "It tells npm to save the dependencies in a production environment"
13+
}
14+
]
15+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"question": "What is the benefit of using Open Zeppelin contracts in smart contract development?",
3+
"options": [
4+
{
5+
"answer": "They reduce the amount of code we write"
6+
},
7+
{
8+
"answer": "They provide rigorously audited and safe contracts"
9+
},
10+
{
11+
"answer": "They allow for easier collaboration and interoperability"
12+
},
13+
{
14+
"answer": "All of the above",
15+
"correct": true
16+
}
17+
]
18+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"question": "We will learn later, but what do you think the purpose of the .gitignore file created by Hardhat is?",
3+
"options": [
4+
{
5+
"answer": "To hide your project's dependencies."
6+
},
7+
{
8+
"answer": "To store your project's source code in a private Github repository."
9+
},
10+
{
11+
"answer": "To ignore certain files from being committed to version control",
12+
"correct": true
13+
}
14+
]
15+
}

0 commit comments

Comments
 (0)