Skip to content

Commit 701e39d

Browse files
committed
quiz cleanup and checkpoint typo correction
1 parent 2cc809d commit 701e39d

File tree

6 files changed

+41
-39
lines changed

6 files changed

+41
-39
lines changed

pages/lessons/projects/1.mdx

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ how well you're absorbing the new content. There's also a quiz at the end, of
2323
course, so make sure you're checking out all the side-drawers for a deeper dive
2424
of any new concepts. To complete the lesson, expect somewhere between one and
2525
four hours depending on your previous experience and the need to learn new
26-
ideas. Remember your well-being and set the pomodoro timer in the menu header to ensure
27-
you’re taking regular breaks, and please do go outside and 'touch some grass’.
26+
ideas. Remember your well-being and set the pomodoro timer in the menu header to
27+
ensure you’re taking regular breaks, and please do go outside and 'touch some
28+
grass’.
2829

2930
## What are we building?
3031

@@ -139,8 +140,7 @@ means of communication on and with any blockchain. Not only does a user have an
139140
address like this, but all the smart contracts on the blockchain have one as
140141
well, and use them as a means of communication too. Like phone numbers, or
141142
emails blockchain style! It’s becoming more common that a user will have an
142-
easier to remember alias for their address e.g.
143-
[imsoeasy.](http://imsoeasy.xyz)eth!
143+
easier to remember alias for their address, e.g., imsoeasy.eth!
144144

145145
</SideDrawer>
146146

@@ -244,7 +244,7 @@ folders in our workspace. We want to start fresh. Create a new folder named
244244
The extension `.sol` is used for files in the Solidity language.
245245

246246
<SideDrawer
247-
buttonText="Check-point Questions"
247+
buttonText="Checkpoint Questions"
248248
title="Blockchain and Solidity Smart Contracts"
249249
>
250250
<Question question="lesson-1/tooling-Q1" />
@@ -254,7 +254,7 @@ The extension `.sol` is used for files in the Solidity language.
254254
</SideDrawer>
255255
<br />
256256

257-
Go touch some grass ⌛😊
257+
Well done! Now, go touch some grass! ⌛😊
258258

259259
## **Now we begin writing our code**
260260

@@ -420,8 +420,8 @@ contract WAGMI {
420420
}
421421
```
422422

423-
Yes, there are some new keywords up there e.g. **return**, **returns**, **view**, etc, but
424-
don’t panic:
423+
Yes, there are some new keywords up there e.g. **return**, **returns**,
424+
**view**, etc, but don’t panic:
425425

426426
`public` defines the **visibility** of our function and means it can be called
427427
from anywhere e.g. directly calling it with our externally owned address (e.g.
@@ -487,16 +487,16 @@ function setMessage(string calldata newMessage) public {
487487
}
488488
```
489489

490-
If you noticed, this function, unlike the previous ones, does not have the **view**
491-
visibility keyword and it does indeed modify the state of our contract and the
492-
blockchain. Therefore, whenever someone calls this function in the future, their
493-
wallet is going to ask them to confirm a transaction on the blockchain. That
494-
means it will use some *gas*, which is a transaction fee of a small amount of eth,
495-
since we are using the Ethereum blockchain. As we progress on our learning
496-
journey we will hear a lot more about gas and fees, but that’s also for future
497-
lessons.
490+
If you noticed, this function, unlike the previous ones, does not have the
491+
**view** visibility keyword and it does indeed modify the state of our contract
492+
and the blockchain. Therefore, whenever someone calls this function in the
493+
future, their wallet is going to ask them to confirm a transaction on the
494+
blockchain. That means it will use some _gas_, which is a transaction fee of a
495+
small amount of eth, since we are using the Ethereum blockchain. As we progress
496+
on our learning journey we will hear a lot more about gas and fees, but that’s
497+
also for future lessons.
498498

499-
<SideDrawer buttonText="Check-point Questions" title="Variables and Functions">
499+
<SideDrawer buttonText="Checkpoint Questions" title="Variables and Functions">
500500
<Question question="lesson-1/varsFunctions-Q1" />
501501
<Question question="lesson-1/varsFunctions-Q2" />
502502
<Question question="lesson-1/varsFunctions-Q3" />
@@ -570,10 +570,11 @@ above we can write:
570570
emit EventName(2, false, 'Hello World!');
571571
```
572572

573-
There’s a lot to unpack, so we’ll leave it there for now!
573+
There’s a lot to unpack, so we’ll leave it there for now!
574574

575-
Let’s create an event to log all the future messages sent to our smart contract and check the fortunes
576-
to see if the sent messages are worthy of “making it” in the web3 world. 😉 After our state variables, we can define our new event as:
575+
Let’s create an event to log all the future messages sent to our smart contract
576+
and check the fortunes to see if the sent messages are worthy of “making it” in
577+
the web3 world. 😉 After our state variables, we can define our new event as:
577578

578579
```solidity
579580
// We add this line after our 'message' and 'messageCount' definitions
@@ -617,9 +618,9 @@ address that called the function. You also probably noticed how we compare
617618
newMessage with ‘gm’. That’s because Solidity doesn’t have a way to easily
618619
compare two strings of text. But with a little bit of encoding and decoding, we
619620
can use abi.encodePacked() to convert the string into bytes and then use the
620-
hashing function keccak256() to compare the two **hashes**. And if *they* are equal,
621-
the strings are equal too 🙌. You can be sure that we’ll be deep diving on these
622-
in future lessons, so no worries!
621+
hashing function keccak256() to compare the two **hashes**. And if _they_ are
622+
equal, the strings are equal too 🙌. You can be sure that we’ll be deep diving
623+
on these in future lessons, so no worries!
623624

624625
<SideDrawer buttonText="More on Events">
625626

@@ -635,7 +636,7 @@ in future lessons, so no worries!
635636

636637
</SideDrawer>
637638

638-
<SideDrawer buttonText="Check-point Questions" title="All about Events">
639+
<SideDrawer buttonText="Checkpoint Questions" title="All about Events">
639640
<Question question="lesson-1/events-Q1" />
640641
<Question question="lesson-1/events-Q2" />
641642
<Question question="lesson-1/events-Q3" />
@@ -718,9 +719,9 @@ Compiler sidebar icon.
718719
</SideDrawer>
719720

720721
Now we are ready to deploy our contract. We can now head to the **Deploy & Run**
721-
transactions icon in the sidebar. Below we can see a
722-
message that says ‘Currently you have no contract instances to interact with’,
723-
so we haven’t deployed anything yet.
722+
transactions icon in the sidebar. Below we can see a message that says
723+
‘Currently you have no contract instances to interact with’, so we haven’t
724+
deployed anything yet.
724725

725726
![Contract Instance Warning](/assets/lessons/1/img_6.png)
726727

@@ -736,8 +737,8 @@ Open the dropdown under **Deployed Contracts**, to see our function tabs:
736737
- the orange one lets us trigger the setMessage function which will change the
737738
state. Be sure to click on the little drop down menu on the right. From here
738739
on, we can interact with our contract. Feel free to test the functions. Click
739-
on the getMessage and messageCount tabs before and after setting a new
740-
message to modify data on our contract.
740+
on the getMessage and messageCount tabs before and after setting a new message
741+
to modify data on our contract.
741742

742743
![Available Interactive Options once Contract is Deployed](/assets/lessons/1/img_7.png)
743744

@@ -784,4 +785,5 @@ what you didn’t know a little while ago, and what you know now!
784785

785786
Now, go to the community in
786787
[developerdao.peeranha.io](https://developerdao.peeranha.io) to share your new
787-
Open Sourcerer powers! And afterwards get started on our _Build a basic NFT_ lesson. See you soon!
788+
Open Sourcerer powers! And afterwards get started on our _Build a basic NFT_
789+
lesson. See you soon!

utils/questions/lesson-1/events-Q2.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"question": "What is the purpose of defining an event in a Solidity contract? Multiple answers possible",
2+
"question": "What is the purpose of defining an event in a Solidity contract?",
33
"options": [
44
{
5-
"answer": "It creates a transaction log where information can be stored more cheaply than on the blockchain."
5+
"answer": "It increases the security of your smart contract."
66
},
77
{
8-
"answer": "It triggers a specific action when called.",
8+
"answer": "It helps you monitor specific activities that occur on-chain.",
99
"correct": true
1010
},
1111
{
1212
"answer": "It facilitates communication between smart contracts."
1313
},
1414
{
15-
"answer": "It allows the contract to store data on the blockchain.",
15+
"answer": "It provides an efficient way to log data without using block space.",
1616
"correct": true
1717
}
1818
]

utils/questions/lesson-1/intro-Q2.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"question": "Which statement is true?",
33
"options": [
44
{
5-
"answer": "It’s important to test your code rigorously, because once deployed it resides on the Blockchain forever.",
5+
"answer": "It’s important to test your code rigorously, because once deployed it resides on the blockchain forever.",
66
"correct": true
77
},
88
{
9-
"answer": "The great thing about the blockchain is if you need to make corrections to buggy code, you can just upload fixes, which will automatically overwrite previous versions seamlessly."
9+
"answer": "If you need to make corrections to buggy smart contract code, you can just upload fixes, which will overwrite previous versions seamlessly."
1010
}
1111
]
1212
}

utils/questions/lesson-1/tooling-Q4.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"question": "Guess which of the following version of pragma indicates compatibility with Solidity 0.8.4 and higher",
2+
"question": "Which of the following indicates compatibility with Solidity 0.8.4 and higher?",
33
"options": [
44
{
55
"answer": "pragma solidity <=0.8.4;"

utils/questions/lesson-1/varsFunctions-Q1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"question": "What is the purpose of the public keyword in a Solidity function? ",
2+
"question": "What is the purpose of the public keyword in a Solidity function?",
33
"options": [
44
{
55
"answer": "It restricts the function's access only to the defined smart contract."

utils/questions/lesson-1/varsFunctions-Q2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"correct": true
77
},
88
{
9-
"answer": "By directly accessing the variable using its name."
9+
"answer": "By sending a transaction to the constructor function."
1010
},
1111
{
1212
"answer": "By emitting an event with the variable's value."

0 commit comments

Comments
 (0)