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/1.mdx
+18-13Lines changed: 18 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,8 +122,6 @@ benefits to this decentralised model as we’ll continue to see.
122
122
123
123
</SideDrawer>
124
124
125
-
<Questionquestion="question-1" />
126
-
127
125
## Let’s get this party started!
128
126
129
127
We’re going to write a smart contract, which is going to be a “Web3
@@ -299,15 +297,13 @@ contract WAGMI {
299
297
<Calloutemoji='💡'size='md'variant='info'>
300
298
While private and internal are not readable or modifiable from other contracts, its values are set on a public blockchain, making its values visible from the outside world.
301
299
</Callout>
302
-
300
+
303
301
#### Which visibility should I use ?
304
302
305
303
A simple answer to this is , start with giving every variable a `private` visibility then as you move further in contract developement modify variables to `internal` visibility as a next step of modification. Try to use `public` visibility as little as possible in order to be gas efficient and making less vulnerabilities in the smart contract.
306
304
307
305
</SideDrawer>
308
306
309
-
<Questionquestion="question-2" />
310
-
311
307
## Creating Functions
312
308
313
309
Our contract needs a way to store new information on the blockchain! But both
@@ -399,8 +395,6 @@ some more about them in **Variables** and **Functions**.
399
395
400
396
</SideDrawer>
401
397
402
-
<Questionquestion="question-3" />
403
-
404
398
Ok, now we have to figure out a way to store some info on our contract!
405
399
406
400
We want to _set_ a new message in our contract, so now we define a new function
@@ -711,14 +705,25 @@ you see the magical spell that is being cast here?
711
705

712
706
713
707
Before you go ahead and tell us: **what your future in web3 is,** have a check
714
-
on what you didn’t know a little while ago, and what you know now! Take the quiz
715
-
and prove your knowledge :)
708
+
on what you didn’t know a little while ago, and what you know now! *
709
+
710
+
Apart from a user wallet, what else uses a blockchain (Ethereum) address?
711
+
712
+
How many parameters can we have in an event?
713
+
714
+
What can we use to find a past event?
715
+
716
+
Ethereum uses something for transaction fees. What’s it called?
717
+
718
+
Where do the values for event parameters get stored?
719
+
720
+
What is the use of the **pragma solidity** statement in our smart contract?
716
721
717
-
<br />
722
+
Do state variables stay permanently on the blockchain?
718
723
719
-
<Quizquiz="lesson-1" />
724
+
Can a view function modify the state of the blockchain?
720
725
721
-
<br />
726
+
What can we use a smart contract for?
722
727
723
728
**Now, go to the community in Discord to share your new Open Sourcerer
0 commit comments