Skip to content

Commit 3f60aa4

Browse files
committed
Add mini-quiz on Scripts & Compliling + ContributorFooter info
1 parent 83d84d6 commit 3f60aa4

File tree

6 files changed

+78
-30
lines changed

6 files changed

+78
-30
lines changed

pages/lessons/projects/2.mdx

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ This has created huge opportunities for individuals, marketplaces and platforms
6767

6868
Now that we know they can be much more than just an image, what are we waiting for!
6969

70-
By the end of this lesson we are going to learn a lot of things. A simple breakdown of the steps to get there is:
70+
By the end of this lesson we'll have learnd a lot. A simple breakdown of the steps to get there is:
7171

7272
- Set up our environment to work
7373
- Install dependencies
@@ -88,12 +88,12 @@ deploy smart contracts.
8888

8989
![expectations.reality.jpeg](/assets/lessons/2/img_2.jpeg)
9090

91-
To begin our project, we should open a console (command line interface). Check your Operating System
91+
To begin our project, we should open a command line interface, a.k.a. console. Check your Operating System
9292
options on how to use one below. We will be using `npm`, the package manager from Node, and its command `npx`that allows us to run or execute a package or one of its scripts. If you are
9393
comfortable with another package manager, feel free to use it.
9494

9595
PLEASE HELP ME FIND CLI-LESSON PATH FOR SIDE-DRAWER COMPONENT:
96-
<SideDrawer title=" " buttonText="Getting Started with the command line interface">
96+
<SideDrawer title=" " buttonText="Getting Started with the Command Line Interface">
9797
<InstallNpm/>
9898
</SideDrawer>
9999
<SideDrawer title=" " buttonText="How to install NPM on your system">
@@ -483,7 +483,7 @@ What have we done?
483483

484484
Internally, when someone needs to consult an NFT's info, they call the
485485
OpenZeppelin's `tokenURI` function. That function only joins the return
486-
***value*** of our newly `_baseURI`function with the ID of the token requested.
486+
***value*** of our new `_baseURI` function with the ID of the token requested.
487487

488488
With that we can see the power of inheritance and overriding. We can inherit a
489489
whole set of functionalities and change only what we need to create a different
@@ -504,16 +504,15 @@ and files that we prepared, and move on to the next section.
504504
- 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
505505
and a solution to store files in a decentralized way.
506506

507+
PART 5 JSON/IPFS (SEPARATE SIDE DRAWER QUIZ)
507508
<SideDrawer buttonText="Assessment of part 4 and prediction of 6" title="Assessment of part 4 and prediction of 6">
508509
<Question question="lesson-2/4-nft-id/Q1" />
509510
<Question question="lesson-2/4-nft-id/Q2" />
510511
<Question question="lesson-2/4-nft-id/Q3" />
511512
<Question question="lesson-2/4-nft-id/Q4" />
512513
<Question question="lesson-2/4-nft-id/Q5" />
513514
</SideDrawer>
514-
<br/>
515515

516-
PART 5 JSON/IPFS (SEPARATE SIDE DRAWER QUIZ)
517516

518517
<SideDrawer buttonText="Longer Path (learn about JSON and IPFS)">
519518
## JSON
@@ -662,24 +661,24 @@ PART 6 SCRIPTS AND COMPILE
662661

663662
You might remember this from the previous project, when we used Remix. Once we
664663
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.
664+
buttons in the web interface, but now we are going pro, a.k.a. doing it all
665+
ourselves in the console.
667666

668-
Why did we deviate from Solidity? Because of the way we set our contract up.
669-
When we deploy we tell our contract where our files are stored. Therefore we had
667+
Why are we deviating from Solidity? Because of the way we set our contract up.
668+
When we deploy, we tell our contract where our files are stored. Therefore we have
670669
to store the files somewhere to get the address we need to run the deployment.
671670

672671
So, now that we have our media and JSONs uploaded, we can deploy our NFT
673672
contract!
674673

675674
![deploy.jpeg](/assets/lessons/2/img_15.jpeg)
676675

677-
Remember that scripts folder at the beginning of our project? That's where we
676+
Remember the scripts folder at the beginning of our project? That's where we
678677
are going to create our script to tell Hardhat the set of instructions to
679678
follow. We can create one for deploy, another one to mint or call functions of
680-
our contract. Hardhat uses javascript for this.
679+
our contract. Hardhat uses Javascript for this.
681680

682-
So, let's create a `deploy.js` under the `scripts/` folder and copy this code:
681+
So, let's create a `deploy.js` under the `scripts/` folder and copy this in:
683682

684683
```jsx
685684
// import Hardhat to use it inside our script
@@ -791,7 +790,7 @@ Let's run the script again and see what it tells us! Here's my output:
791790

792791
![deploy.output.2.png](/assets/lessons/2/img_17.png)
793792

794-
We got the URI of the token, right? So, now we know we can deploy it (and mint)
793+
We got the URI of the token, right? So, now we know we can deploy it, and mint
795794
to a real blockchain!
796795

797796
<SideDrawer buttonText="Assessment of part 6 and prediction of 7" title="Assessment of part 6 and prediction of 7">
@@ -962,4 +961,12 @@ But first, we want you to go and 'touch some grass'. So why don't you scroll to
962961
<br/>
963962

964963
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....
965-
<br/><br/><br/>
964+
965+
966+
import { ContributorFooter } from '../../../components/mdx/ContributorFooter'
967+
968+
<ContributorFooter
969+
authors={['_7i7o', 'piablo']}
970+
reviewers={['georgemac510']}
971+
contributors={['mveve']}
972+
/>

utils/questions/lesson-2/6-scripts-compile/Q1.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
{
2-
"question": "",
2+
"question": "What info should we provide in deploy.js to get our NFT contract on the blockchain?",
33
"options": [
44
{
5-
"answer": ""
5+
"answer": "Solidity version used in the contract"
66
},
77
{
8-
"answer": "",
8+
"answer": "IPFS base URI for the NFT files",
9+
"correct": true
10+
},
11+
{
12+
"answer": "Symbol of the NFT collection",
13+
"correct": true
14+
},
15+
{
16+
"answer": "Name of the NFT collection",
917
"correct": true
1018
}
1119
]
Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
{
2-
"question": "",
2+
"question": "Why do we add a mint call in our deploy script?",
33
"options": [
44
{
5-
"answer": ""
5+
"answer": "To test that the contract is working properly after deployment",
6+
"correct": true
7+
},
8+
{
9+
"answer": "To wait for the transaction to finish"
610
},
711
{
8-
"answer": "",
12+
"answer": "For printing the contract's address to the console"
13+
},
14+
{
15+
"answer": "For creating a single NFT after deployment",
916
"correct": true
17+
},
18+
{
19+
"answer": "None of the above"
1020
}
1121
]
1222
}

utils/questions/lesson-2/6-scripts-compile/Q3.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
{
2-
"question": "",
2+
"question": "Which info does our script print to the screen? Think about where you might utilise that info",
33
"options": [
44
{
5-
"answer": ""
5+
"answer": "The main function"
66
},
77
{
8-
"answer": "",
8+
"answer": "Our contract's address",
9+
"correct": true
10+
},
11+
{
12+
"answer": "The contract factory"
13+
},
14+
{
15+
"answer": "The URI of our token",
916
"correct": true
1017
}
1118
]

utils/questions/lesson-2/6-scripts-compile/Q4.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
{
2-
"question": "",
2+
"question": "To make sure out contract compiles and deploys properly to the blockchain, we update our Solidity version in:",
33
"options": [
44
{
5-
"answer": ""
5+
"answer": "deploy.js"
66
},
77
{
8-
"answer": "",
8+
"answer": "solidity.js"
9+
},
10+
{
11+
"answer": "scripts.js"
12+
},
13+
{
14+
"answer": "hardhat.config.js",
915
"correct": true
1016
}
1117
]
Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
{
2-
"question": "",
2+
"question": "What should you never, ever share with anyone?",
33
"options": [
44
{
5-
"answer": ""
5+
"answer": "Your wallet's public address"
66
},
77
{
8-
"answer": "",
8+
"answer": "Your API Key from an Ethereum RPC Node Provider"
9+
},
10+
{
11+
"answer": "Your seed phrase",
912
"correct": true
13+
},
14+
{
15+
"answer": "Your wallet's private key",
16+
"correct": true
17+
},
18+
{
19+
"answer": "Don't forget it :)"
1020
}
1121
]
1222
}

0 commit comments

Comments
 (0)