Starknet cairo tutorial

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

post image

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/

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

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

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

post image

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

post image

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

post image

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

post image

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

post image

Step 11 : The code snippet shows that my_value is = my_secret_value

post image

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

post image

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

post image

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

post image

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

post image

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

post image

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

post image