Skip to content

NicNomadic/Tezos-Smart-Contracts-Development-Course

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒŸ Welcome to the Tezos Blockchain Smart Contracts Development Course ๐Ÿš€

Are you ready to dive headfirst into the exciting world of blockchain technology? Buckle up because we're about to embark on an electrifying journey through the Tezos ecosystem, where you'll unlock the secrets of decentralized finance (DeFi), Proof of Stake, NFTs, and so much more!

๐Ÿ”— What's on the Agenda? ๐Ÿ”—

๐Ÿ“Œ Blockchain Basics:

We will start from the ground up and demystify the blockchain concept. Whether you're a beginner or a blockchain enthusiast, we've got something for everyone.

โ›“๏ธ Proof of Stake (PoS):

Ever wondered how Tezos maintains its secure and energy-efficient network? Uncover the inner workings of Proof of Stake consensus and learn how you can become a part of it.

๐ŸŽจ NFTs โ€“ The Art of Ownership:

Dive into the world of Non-Fungible Tokens (NFTs) and understand how Tezos is empowering artists, creators, and collectors to redefine ownership in the digital age.

๐Ÿ’ฐ Decentralized Finance (DeFi):

Discover the future of finance as we explore how Tezos is revolutionizing the way we manage and exchange digital assets. Get ready to explore yield farming, lending, and much more!

๐Ÿ“ฑ Building Your Own DApps:

Learn how to leverage Tezos' smart contract capabilities to design and deploy your very own decentralized applications. Whether it's a DeFi protocol, a gaming platform, or a revolutionary social network, you'll acquire the skills needed to bring your DApp ideas to life.

๐Ÿค Interacting with Tezos Ecosystem:

Understand how to integrate your DApps with existing Tezos projects and collaborate within the vibrant Tezos developer community. This is your chance to tap into the collective wisdom of Tezos enthusiasts and expand your horizons.

๐Ÿ’ก Innovative Use Cases:

Explore real-world examples of Tezos DApps that are making waves in various industries. From finance to entertainment, Tezos DApps are driving innovation and redefining how we interact with technology.

๐Ÿง  Hands-On Experience:

Our interactive sessions and practical exercises will ensure you gain a deep understanding of smart contract and DApp development on Tezos. You'll leave with the confidence to create, deploy, and maintain your own Web3 project on the Tezos Blockchain.

So, if you've ever dreamt of creating the next big thing in the decentralized world and an the most advanced blockchain in the industry this tutorial is your golden ticket. Get ready to turn your DApp dreams into reality and be a pioneer in the Tezos ecosystem!

Join us for this dynamic Tezos journey, where you'll not only learn but also actively participate in shaping the decentralized future. The possibilities are limitless, and your imagination is your only constraint.

๐Ÿ‘ฉโ€๐Ÿซ Our Expert Instructors: ๐Ÿ‘จโ€๐Ÿซ

You'll be guided by seasoned experts who have a passion for blockchain and a knack for simplifying complex concepts. Their energy and enthusiasm are contagious, making learning a truly exhilarating experience.

๐Ÿ’ฅ Get Ready to Ignite Your Passion for Tezos! ๐Ÿ’ฅ

Whether you're a developer or entrepreneur, or just someone curious about the blockchain revolution, this tutorial is tailor-made for you. By the end of this journey, you'll not only understand Tezos but also be equipped with the knowledge to make informed decisions in the rapidly evolving blockchain landscape.

So, grab your virtual seats, fuel up on curiosity, and let's embark on this Tezos adventure together! ๐ŸŒ๐Ÿš€

Get ready to unlock the power of Tezos and redefine what's possible in the world of blockchain. The future is decentralized, and you're about to become a part of it!

๐Ÿš€ Let's ignite the decentralized revolution on Tezos! ๐Ÿš€

๐Ÿš€ And Much, Much More: From smart contracts to governance mechanisms, we've got a treasure trove of Tezos knowledge to share!

๐Ÿค˜ Best Practices ๐Ÿค˜

  • Follow the repository: While going through the course be 100% certain to follow along with the github repository.
  • Be Active in the community: Ask questions and engage with other developers going through the course in the discussions tab, be sure to go and say hello or gm! This space is different from the other industries, you don't have to be secretive; communicate, network and learn with others :)
  • Learn at your own pace: It doesn't matter if it takes you a day, a week, a month or even a year. Progress >>> Perfection
  • Take Breaks: You will exhaust your mind and recall less if you go all out and watch the entire course in one sitting. Suggested Strategy every 30 minutes take a 5 min break, and every 2 hours take a longer 30 min break
  • Refer to Documentation: Things are constantly being updated, so whenever our instructors open up some documentation, open it your end and maybe even have the code sample next to you.

๐Ÿ“š Table of Content ๐Ÿ“š

๐Ÿ“ฆ Resources

  • Tezos: the blockchain website
  • OpenTezos: explore the technical and economic concepts behind the Tezos Network
  • Tezos Foundation Grant Program: a key activity of the Tezos Foundation is to deploy resources to entities and initiatives that will help to ensure the long-term success of the Tezos blockchain.

๐Ÿ”ง Recommended Tools

  • Kukai Wallet: a specific Tezos Wallet
  • SmartPy: a comprehensive solution for developing, testing, and deploying smart contracts on the Tezos blockchain
  • Tezos Faucet: get Tez on the Ghostnet Network

๐Ÿ“‹ Prerequisites for this Course

  • Basic programming skills

    You do not need:

  • ๐Ÿ Python Knowledge - it is helpful but not required

  • Prior blockchain experience

๐ŸŽ‰ Welcome to the Course

Tezos Basics

Lesson: ๐Ÿ’ก Tezos Makes it Possible

Lesson: ๐Ÿง  Understanding Tezos

  • Introduction to the Tezos Blockchain
  • History of Tezos
  • Tezos, Tez, XTZ
  • Overview of the Key Elements of Tezos
    • Accounts
    • Transactions
    • Smart Contracts
    • Blockchain
    • Wallets
    • Nodes
    • Bakers

Lesson: ๐Ÿค First Interactions with the Tezos Blockchain

  • Wallet Set Up
  • Seed Phrase, Keys, Password
  • Funding your Account with โ€œFakeโ€ Tez
  • Transfer Tez between Accounts
  • Check Operations on Tezos Blockchain Explorers
  • Finality of Transactions

Lesson: ๐Ÿค” Why Developing on Tezos?

  • Benefits of Developing on Tezos
  • Being Part of the Tezos Ecosystem

SmartPy Essentials

Lesson: ๐Ÿ“ Hands-On Smart Contracts with SmartPy

  • Smart Contracts with SmartPy
  • Reminder: What is a Smart Contract
  • Smart Contract Structure & Deployment
  • Write and Deploy your First Smart Contract
  • Deploy your Contract on Ghostnet
  • Eternity and Immutability

Lesson: ๐Ÿš€ Entrypoints and Testing

Lesson: ๐Ÿ” Types and Type Inference

Lesson: ๐Ÿงต Strings

Lesson: ๐Ÿ” Verifications

Lesson: ๐Ÿ”„ Multiple Values in Storage & Parameter

Lesson: ๐Ÿ“œ Interlude: A Brief History of Smart Contracts

  • History of Smart Contracts

Lesson: ๐Ÿ”€ Addresses

Lesson: ๐Ÿ’ป๐Ÿ”๐Ÿš€ Basic NFT Contract

Lesson: ๐Ÿ’ฐ๐Ÿ”„๐ŸคTez and Trust

Lesson: ๐Ÿ”˜๐Ÿ“Š๐Ÿ”€ Options

  • Introduction to Options
  • Using Options
  • Syntax Options
    • Creating an Option
    • Comparing Options
    • Opening an Option
  • Options in Tests
  • Type of an Option
  • Donโ€™t Overuse Options
  • Use Options if There is no Better Choice
  • Exercise: NFT not for Sale
  • Solution: NFT not for Sale

Lesson: Blockchains and Time

Lesson: โž•โž–โœ–๏ธโž— Arithmetic Operators

Lesson: ๐Ÿ”„ Inter-Contract Calls

Lesson: ๐Ÿ“ Records

Lessson: ๐Ÿ—บ๏ธ๐Ÿ“Šโ›ฝ Maps, Big-Maps, Gas

Lesson: ๐Ÿ”„๐Ÿ’ป๐Ÿ“œ Other Smart Contracts Languages

##TODOS: MISSING: example 1 record: First Name, Last Name, Birthdate from lesson 19 inter-contract call ## ##Todos: Missing: Exercise Records : Add a login that the user can change at most once a year This also means storing the address of each user from lesson 19 inter-contract call ##

Lesson: ๐ŸŒ๐Ÿ’ป Local Setup

Lesson: ๐ŸŒ๐Ÿ“ฑ๐Ÿ”—๐Ÿ›๏ธ๐Ÿš€ Decentralized Applications (dApps)

Lesson: ๐Ÿ“‹๐Ÿ”„๐Ÿ”‚ Lists and Loops

  • Lists Syntax
  • For loop Syntax
  • When not to Use Lists
  • Alternative to lists
  • Alternative to Long Loops

Lesson: ๐Ÿ‘€ Views

  • What Are On-Chain Views?
  • Syntax: On-Chain Views
  • On-Chain Views Used Off-Chain
  • Other (older) Types of Views

Lesson: ๐Ÿ› ๏ธ๐Ÿ–Œ๏ธ Custom Types(todo missing custom type example and exercise)

  • Introduction to Custom Types
  • Syntax Custom Types

Lesson: ๐Ÿ“œ๐Ÿค Sets, Membership Contract

  • Introduction To Sets
  • Syntax: Sets
  • Exercise: Membership Contract
    • Membership Contract Structure
  • Solution: Membership Contract
  • When not to Use Sets
  • Alternative to Sets

Lesson: ๐Ÿ”„ Variants

Action Code
Defining a variant type: sp.variant(VariantName1 = type, ...)
Creating a value sp.variant.VariantName1()
sp.variant.VariantName2(value)
Checking if itโ€™s a given variant assert my_variant.is_variant.VariantName2()
Extracting the value value = my_variant.unwrap.VariantName2()
Matching different cases with sp.match(my_variant):
with sp.case.VariantName1:
result = 0
with sp.case.VariantName2 as value:
result = value
In a test scenario (for now)
Creating a value sp.variant("VariantName1", ())
sp.variant("VariantName2", value)
Checking if itโ€™s a given variant assert my_variant.is_variant("VariantName2")
Extracting the value my_variant.open_variant("VariantName2")

Lesson: ๐Ÿ”— + ๐Ÿฆ = ๐ŸŒ FA2 Standard

Lesson: ๐Ÿ–ผ๏ธ๐Ÿ“ฆ๐Ÿ’ฑ๐Ÿ“ฑ NFT Marketplace dApp

  • NFT marketplace

Lesson: ๐Ÿ”ฎ๐Ÿ“œ๐Ÿ—ณ๏ธ๐Ÿ“Š๐Ÿ›๏ธ Oracles

  • The Need for Off-Chain Data
  • Fetching Off-Chain Data Wouldn't work
  • Injecting Off-Chain Data by Calling Smart Contracts
  • Setting up your own Off-Chain Service
  • Letting the Source Send the Data
  • Injecting Data Signed by the Source
  • Exercise Oracle: Starting Template
  • Exercise: Oracle Solution
  • Trusted Execution Environments (TEEs)
  • Strong Incentives to Inject Incorrect Data
  • Avoiding a Single Source or Transmitter
  • Combining multiple versions of the data

Flaws and Best Practices

Lesson: ๐Ÿฅ‡๐Ÿ’”๐Ÿ‘‰๐Ÿป First Flaws

Lesson: ๐Ÿ’ฐ๐Ÿ“œ๐Ÿค Micropayments Contract

  • Micropayments Contract Problem

  • Micropayments Contract Solution

  • Signing Data and verifying signed data

  • Signing Data and Verifying Signed Data Syntax

    Action Code
    pack() packed_data = sp.pack(typed_data)
    unpack() typed_data = sp.unpack(packed_data, type_of_data).unwrap_some()
    make_signature() signature = sp.make_signature(alice.secret_key, packed_data)
    check_signature() signature = sp.make_signature(alice.secret_key, packed_data)
  • Code: Micropayments Contract with Flaw

  • Solution: Micropayments Contract

Lesson: ๐ŸŒ๐Ÿ” Geocaching

Lesson: ๐ŸŽฒ๐ŸŽŸ๏ธ๐Ÿ”’โŒ› Randomness, Raffle Contract, Commit-Reveal, Timelock

##TODO: Where to put Raffle_1, Raffle_2, Raffle_3

  • Randomness Flaws
  • Raffle: Basic Structure
  • Randomness: Using sp.now?
  • Randomness: Using Hashes?
  • Randomness: Mixing Random-ish Values?
  • Randomness: Using Oracles?
  • Randomness: Decentralized Approach?
  • Randomness: Commit & Reveal
  • Commit & Reveal: Flaw
  • Commit & Reveal: Forcing the Reveal
  • Commit & Reveal: Implementation
  • Solution:

DeFi Contracts, More Flaws

Lesson : ๐Ÿ’ธโšก๐Ÿ”—๐Ÿ’ฐ Defi, Flash Loans

Lesson: ๐Ÿ’ฑ๐Ÿ’ฐ๐Ÿ” Fungible Tokens

Lesson: ๐Ÿ’น๐Ÿ’ผ๐Ÿ”€ Trading Tokens

Lesson: ๐Ÿ“‰๐Ÿ“ˆ๐Ÿค Arbitrage

Lesson: ๐Ÿ•น๏ธ๐Ÿ“ˆ๐Ÿ”ป Manipulating Price

About

Files, description, codes about the Tezos smart contracts development course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%