# Starknet cairo tutorial

By [Stone Of Jordan](https://paragraph.com/@stone-of-jordan) · 2022-08-16

---

Stuck on the starknet cairo tutorial, fret not, let me give you a quick walk through and guide you through the 1st 3 tutorials

![](https://storage.googleapis.com/papyrus_images/ab0032f04bcb3f4cc2202d13573e1b2dfdad48123ad9301ede1c6de16f833289.png)

[https://starknet.crew3.xyz/questboard](https://starknet.crew3.xyz/questboard)

Step 1 : Install Argent wallet, and create a new wallet, remember to save you seed word

[https://www.argent.xyz/](https://www.argent.xyz/)

Step 2 :Switch the wallet to Goerli network and get some Goerli ETH from the faucet

[https://faucet.goerli.starknet.io/](https://faucet.goerli.starknet.io/)

Step 3: Open the github of the quest and read through it

[https://github.com/l-henri/starknet-cairo-101](https://github.com/l-henri/starknet-cairo-101)

Step 4: I will now bring you through these 3 exercises

![](https://storage.googleapis.com/papyrus_images/1010bf0209348f831d2e5f36e4a30f03fc7b0a1ed9b6fb4458b00cca6d933ad4.png)

**Exercise 1 : General Syntax**

Step 5 : Open both EX01 and Link on 2 diff tabs on your browser

Step 6 : Look at the code, in hashes gives you the hint on what you must do, which is to trigger a claim\_points function to get the points for each exercise

![](https://storage.googleapis.com/papyrus_images/23058ca92a5ef20565cce7eaf609f0c05990a4a105c82f608910cc9b8e41aecf.png)

Step 7: Now go to the write contract tab, you will notice that the first exercise does not require any input an you just need to click on the transact

![](https://storage.googleapis.com/papyrus_images/6601b7ce8ba440c057257fa39d241653dce2fb98d861e1c700cba02fc116e858.png)

Step 8: Now click on transact and wait for 5-10 mins for the transaction to be mine

![](https://storage.googleapis.com/papyrus_images/80315c380df8493f2ad7195b21214d5ca132159e5711ae151073162c25939430.png)

**Exercise 2** **: Storage variable, getter, assert**

Step 9 : For exercise 2, open up the 2 tabs of github and voyager again on 2 new tabs

Step 10 : The voyager link showed that you will need to input a variable called my\_value

![](https://storage.googleapis.com/papyrus_images/44862dc23acfdb7d6f3337d42d8ac925fd491d02c0c6f327601589aaf411752c.png)

Step 11 : The code snippet shows that my\_value is = my\_secret\_value

![](https://storage.googleapis.com/papyrus_images/08f071ffc181188ecbe62712d5e8939927f3bfa16ec1b7b0962f5e8324a15b3c.png)

Step 12 : Now switch over to read contract on voyager tab

![](https://storage.googleapis.com/papyrus_images/935952697dd3e534f3461ef854ec83cc8d4aa16348500c0ef596126550dfed39.png)

Step 13 : You will notice that there is a read function where you can query the secret value

![](https://storage.googleapis.com/papyrus_images/e9293f2b1c98560b728d9902dd85d024c7b1790265460c94ba7aa47146856673.png)

Step 14 : Query out the value in step 13 and then input it into claim points and click on transact

![](https://storage.googleapis.com/papyrus_images/f04dc77665f49e7c4aff523a9d55d43c995c3044fcd15245c7a6dafd99d62870.png)

Step 15: Wait 5 - 10 mins for the transaction to be mined.

**Exercise 3 : Reading and writing storage variables**

Step 16 : Open up the 2 links for github and voyager for exercise 3 in 2 diff tabs

Step 17 : A look at the code shows that a variable which is counter must be = 7 before the claim can be done

![](https://storage.googleapis.com/papyrus_images/b971c5ac5937cf51b1e742f11464a9102049a9c230bb786c73b1fd50b7c0d002.png)

Step 18 : On the voyager front there are 3 functions which might manipulate the counter variable

![](https://storage.googleapis.com/papyrus_images/3fb4171c5d0e14cffa0089ae11dc73636ac296a29b6aa1bd0420eb2661305c06.png)

Step 19 : On the code, it shows that increment will increase counter by 2 and decrement will decrease counter by 1, so in order to hit 7, we will need to reset counter to 0 first , then increment counter 4 times and then decrement counter 1 time. Cheers

![](https://storage.googleapis.com/papyrus_images/5db8459ee6befce9ddd808f2bab992c1b8b53d2818c88e61a814fdd07aec3123.png)

---

*Originally published on [Stone Of Jordan](https://paragraph.com/@stone-of-jordan/starknet-cairo-tutorial)*
