Skip to content

Commit

Permalink
Academy fixes (#171)
Browse files Browse the repository at this point in the history
* fixes: have a doubt, code reset, michelson overflow

* feat: added quizzes to module-0

* fix: module-04 content

* Fixed chapter-07 content to include MichelsonMap and char2Bytes:

Co-authored-by: Bhaskar Singh <[email protected]>
  • Loading branch information
manangouhari and bhaskarSingh authored Feb 23, 2021
1 parent 2d043fa commit b599265
Show file tree
Hide file tree
Showing 24 changed files with 20,975 additions and 2,454 deletions.
52 changes: 23 additions & 29 deletions lessons/intro-to-blockchain/01/01.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ editor:
## As this an interactive coding school,
## you will be reading instructions present on the left
## and then typing your code on this editor!
## Editor Instructions:
## 1️⃣ After you have read the instructions,
Expand All @@ -26,50 +26,44 @@ editor:
##### Click on X to hide the bottom menu.
## 3️⃣ When you are happy with your code =>
##### click on "Check Answer" button!
##### click on "Check" button!
##### If you get your code correct,
##### you will be able to proceed to the next chapter 🙏!
##### If you don't get your code correct,
##### the editor will respond with error messages!
##### Think of them as clues to help you get to correct answer!
answer: |
## Welcome learners, hackers and #build-ers!
## As this an interactive coding school,
## you will be reading instructions present on the left
## and then typing your code on this editor!
## Editor Instructions:
## 1️⃣ After you have read the instructions,
##### begin typing your code here. ⌨️
## Welcome learners, hackers and #build-ers!
## 2️⃣ If you get stuck =>
##### click on "Show Answer" button to activate 🧞‍♂️ mode!
##### When clicked, a bottom menu opens up
##### and you will be guided to the correct answer!
##### Click on X to hide the bottom menu.
## As this an interactive coding school,
## you will be reading instructions present on the left
## and then typing your code on this editor!
## 3️⃣ When you are happy with your code =>
##### click on "Check Answer" button!
## Editor Instructions:
## 1️⃣ After you have read the instructions,
##### begin typing your code here. ⌨️
##### If you get your code correct,
##### you will be able to proceed to the next chapter 🙏!
## 2️⃣ If you get stuck =>
##### click on "Show Answer" button to activate 🧞‍♂️ mode!
##### When clicked, a bottom menu opens up
##### and you will be guided to the correct answer!
##### Click on X to hide the bottom menu.
##### If you don't get your code correct,
##### the editor will respond with error messages!
##### Think of them as clues to help you get to correct answer!
## 3️⃣ When you are happy with your code =>
##### click on "Check" button!
##### If you get your code correct,
##### you will be able to proceed to the next chapter 🙏!
---



Welcome aboard **learners** and **#build-ers**!

This is is the beginning of **Lesson 1** of **Cryptobots vs Aliens** - an interactive code school that teaches you all you need to know about building applications on the blockchain.
This is is the beginning of **Chapter 1** of **Cryptobots vs Aliens** - an interactive code school that teaches you all you need to know about building applications on the blockchain.

This module is a non-technical primer to blockchain, the real coding starts from next module 😎


## Prerequisites for the course
There are absolutely **zero** pre-requisites for this module.
Expand Down
18 changes: 16 additions & 2 deletions lessons/intro-to-blockchain/02/02.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,24 @@ editor:
showEditor: false
language: python
startingCode: |
# Need to figure this out
# For the statement below, answer by filling
# the missing word in the `missing_word` variable below
# Once you're done, click on "Check" button
# to complete this chapter ✅
# Fill the blank -
# Blockchain is a _____ ledger.
missing_word = ""
answer: |
# Need to figure this out
# For the statement below, answer by filling
# the missing word in the `missing_word` variable below
# Once you're done, click on "Check" button
# to complete this chapter ✅
# Fill the blank -
# Blockchain is a _____ ledger.
missing_word = "trustless"
---
### Intro
Blockchain has the potential to change the world as we know it - in the next few chapters we'll find out why and how.
Expand Down
16 changes: 14 additions & 2 deletions lessons/intro-to-blockchain/03/03.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,22 @@ editor:
showEditor: false
language: python
startingCode: |
# Need to figure this out
# Answer the question by putting the answer
# as the value of `currency_of_tezos` variable.
# Reminder: You can make use of "Show Answer"
# in case you need help.
# What is the currency on the Tezos blockchain?
currency_of_tezos = ""
answer: |
# Need to figure this out
# Answer the question by putting the answer
# as the value of `currency_of_tezos` variable.
# Reminder: You can make use of "Show Answer"
# in case you need help.
# What is the currency on the Tezos blockchain?
currency_of_tezos = "XTZ"
---
### Intro
In the previous chapter, we understood how Blockchain can solve the problems in the current financial system. And also, how that's only the first problem that blockchain solves, there's much more to explore and innovate in the future - even Cryptobots running on top of a blockchain network 😝!
Expand Down
10 changes: 8 additions & 2 deletions lessons/intro-to-blockchain/04/04.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ editor:
showEditor: false
language: python
startingCode: |
# Need to figure this out
# Where do smart contracts run?
# Pick one of the following -
# "your computer" | "blockchain" | "server" | "web browser"
answer = ""
answer: |
# Need to figure this out
# Where do smart contracts run?
# Pick one of the following -
# "your computer" | "blockchain" | "server" | "web browser"
answer = "blockchain"
---
### Intro
Smart contracts are right at the core of building apps on blockchain. In this chapter, let's properly understand what they are.
Expand Down
8 changes: 6 additions & 2 deletions lessons/intro-to-blockchain/05/05.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ editor:
showEditor: false
language: python
startingCode: |
# Need to figure this out
# Which library is used to talk to the Tezos blockchain through Javascript code?
# Pick from -> "Web3.js" | "Taquito" | "Tacos"
name_of_library = ""
answer: |
# Need to figure this out
# Which library is used to talk to the Tezos blockchain through Javascript code?
# Pick from -> "Web3.js" | "Taquito" | "Tacos"
name_of_library = "Taquito"
---
### Intro

Expand Down
62 changes: 33 additions & 29 deletions lessons/taquito/01/01.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,48 @@ editor:
//NOTE: You've to use print() as a replacement of console.log to output content on this platform, eg - print("Hello World")
// print FAUCET_KEY.pkh
// print(FAUCET_KEY.pkh)
answer: |
// Initialize the `FAUCET_KEY`
const FAUCET_KEY = {
"mnemonic": [
"chimney",
"item",
"course",
"pair",
"opinion",
"mass",
"receive",
"wrong",
"hurry",
"nest",
"oil",
"acoustic",
"section",
"salad",
"electric"
"average",
"oblige",
"arrow",
"reunion",
"connect",
"setup",
"consider",
"devote",
"peanut",
"canal",
"dinner",
"noise",
"ask",
"arena",
"image"
],
"secret": "47184b1d8bf4dd550256817c3507cc4ccf112888",
"amount": "903205016",
"pkh": "tz1Q654L2qnt5mDM1Lbi4rMSTtnE5JHvD8M7",
"password": "9U5VOADM6l",
"email": "ryqwtuyj.ciwjnvdt@tezos.example.org"
"secret": "945e08fcbf7bb2cdd6023679d9c63e8b61bd9342",
"amount": "54613484787",
"pkh": "tz1WvExrfb4hPQZhoXeY8DqmmtvceYnDv8Pt",
"password": "q0bpPnA9yc",
"email": "vpzrkuhu.brekchkh@tezos.example.org"
}
print(FAUCET_KEY.pkh)
---
### Intro
In this module, we'll take you through the whole process of originating(or deploying) a smart contract on the Tezos blockchain using Javascript.
On this adventure, we'll use the Taquito library - library for development on the Tezos blockchain.
In this module, there are no right answers :P
We'll take you through the whole process of originating(or deploying) a smart contract on the Tezos blockchain using Javascript, but, we'll complete a chapter complete when you click on 'Next'.

Doesn't mean we've left you high and dry, we got your back.
You can always check reference code from the "Show Answer" tab!

In this module, we'll deploy and interact with `Cyber_Token` - our very own fungible token that we learned how to develop in the previous module.
On this adventure, we'll use the Taquito library - library for development on the Tezos blockchain.
And, we'll deploy and interact with `Cyber_Token` - our very own fungible token that we learned how to develop in the previous module.

### Study time
Taquito is a library that makes it really easy to make DApps over the Tezos blockchain.
Expand All @@ -72,21 +76,21 @@ npm install @taquito/taquito // or yarn add @taquito/taquito
```
Importing the `Tezos` object -
```javascript=
import { Tezos } from `@taquito/taquito`
import { TezosToolkit } from `@taquito/taquito`
```
Almost all the magic happens through the `Tezos` object we imported right here.
Almost all the magic happens through the `TezosToolkit` object we imported right here.

### #buidl-ing time

#### New feature request!
You've made quite a few smart contracts so far but now it's time to originate them - for that you need to create an account and set it up.
You've made quite a few smart contracts so far but now it's time to originate them - for that you need to create an account on the testnet and set it up.

#### Step by step walkthrough

> Note: We're already imported Tezos and initialized a bunch of other stuff to make this whole journey a little bit smoother for you.
> Note: We're already imported `TezosToolkit` and initialized a bunch of other stuff to make this whole journey a little bit smoother for you.
1. Generate your faucet account -
1. Visit the Tezos Faucet - faucet.tzalpha.net
1. Visit the Tezos Faucet - https://faucet.tzalpha.net
2. Click on "Get testnet ꜩ" (will explain "testnet" in a future chapter)
3. Copy and save the whole JSON output it gives you, this data basically signifies your account on the testnet.
2. Set the JSON obtained in the previous step as the `FAUCET_KEY` in the code which is a constant(use the `const` keyword).
Expand Down
85 changes: 44 additions & 41 deletions lessons/taquito/02/02.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,57 +9,58 @@ editor:
print("Starting...")
const FAUCET_KEY = {
"mnemonic": [
"chimney",
"item",
"course",
"pair",
"opinion",
"mass",
"receive",
"wrong",
"hurry",
"nest",
"oil",
"acoustic",
"section",
"salad",
"electric"
"average",
"oblige",
"arrow",
"reunion",
"connect",
"setup",
"consider",
"devote",
"peanut",
"canal",
"dinner",
"noise",
"ask",
"arena",
"image"
],
"secret": "47184b1d8bf4dd550256817c3507cc4ccf112888",
"amount": "903205016",
"pkh": "tz1Q654L2qnt5mDM1Lbi4rMSTtnE5JHvD8M7",
"password": "9U5VOADM6l",
"email": "ryqwtuyj.ciwjnvdt@tezos.example.org"
"secret": "945e08fcbf7bb2cdd6023679d9c63e8b61bd9342",
"amount": "54613484787",
"pkh": "tz1WvExrfb4hPQZhoXeY8DqmmtvceYnDv8Pt",
"password": "q0bpPnA9yc",
"email": "vpzrkuhu.brekchkh@tezos.example.org"
}
// use importKey
// Print `Tezos.signer._key.key`
answer: |
print("Starting...")
const FAUCET_KEY = {
"mnemonic": [
"chimney",
"item",
"course",
"pair",
"opinion",
"mass",
"receive",
"wrong",
"hurry",
"nest",
"oil",
"acoustic",
"section",
"salad",
"electric"
"average",
"oblige",
"arrow",
"reunion",
"connect",
"setup",
"consider",
"devote",
"peanut",
"canal",
"dinner",
"noise",
"ask",
"arena",
"image"
],
"secret": "47184b1d8bf4dd550256817c3507cc4ccf112888",
"amount": "903205016",
"pkh": "tz1Q654L2qnt5mDM1Lbi4rMSTtnE5JHvD8M7",
"password": "9U5VOADM6l",
"email": "ryqwtuyj.ciwjnvdt@tezos.example.org"
"secret": "945e08fcbf7bb2cdd6023679d9c63e8b61bd9342",
"amount": "54613484787",
"pkh": "tz1WvExrfb4hPQZhoXeY8DqmmtvceYnDv8Pt",
"password": "q0bpPnA9yc",
"email": "vpzrkuhu.brekchkh@tezos.example.org"
}
// use importKey
Expand All @@ -71,6 +72,8 @@ editor:
FAUCET_KEY.secret
);
print(Tezos.signer._key.key)
---
### Intro
Well we've generated our Faucet account and activated it.
Expand All @@ -82,7 +85,7 @@ It's required if you want to inject operations into the Tezos blockchain.
Taquito supports multiple different signers but none are configured by default.

We're going to use `InMemorySigner` - it's best suited for development and testing, not so much for production.
When you're writing code for production that deals with tokens of real value, you should use [TezBridge Signer](https://tezostaquito.io/docs/tezbridge_signer).
When you're writing code for production that deals with tokens of real value, we suggest using [@taquito/beacon-wallet](https://tezostaquito.io/docs/tezbridge_signer).

### Show me an example

Expand Down
Loading

0 comments on commit b599265

Please sign in to comment.