If you have great ideas,
Let's talk!

blog

30天Web3入门(3)

web3

📅 DAY 3 (Oct 26 - Sunday): INTERACTIVE LEARNING (4 hours)

Morning Session (2.5-3 hours)

DO: CryptoZombies Lessons 1-3

  • Link: https://cryptozombies.io/
  • Time: 2.5-3 hours (hands-on coding)
  • Why: Best gamified intro to Solidity - you’ll actually WRITE code, not just read about it

Lesson 1: Making the Zombie Factory (1 hour)

  • Concepts You’ll Learn:
    • Contract structure (like a class in programming)
    • State variables (data stored on blockchain FOREVER)
    • Structs (custom data types)
    • Arrays (lists of things)
    • Function declarations
    • Working with strings and keccak256 hashing

What You’re Building: A zombie generator that creates unique zombies from DNA

Lesson 2: Zombies Attack Their Victims (1 hour)

  • Concepts You’ll Learn:
    • Mappings (like dictionaries/hashmaps - KEY → VALUE)
    • Msg.sender (who’s calling your function)
    • Require statements (input validation)
    • Inheritance (contracts can inherit from other contracts)
    • Import statements
    • Storage vs Memory (CRITICAL concept)
    • Internal and external functions

What You’re Building: Zombies that can feed and multiply

Lesson 3: Advanced Solidity Concepts (45 min - 1 hour)

  • Concepts You’ll Learn:
    • Immutability of contracts (you can’t edit deployed code!)
    • Ownable pattern (only owner can do certain things)
    • Gas costs (why some operations are expensive)
    • Time units
    • Function modifiers (reusable code guards)
    • Saving gas with view functions

What You’re Building: Cooled-down zombie feeding system

Afternoon Session (1-1.5 hours)

SUPPLEMENT: Watch “What is Ethereum?” by Finematics

THEN: Read Ethereum.org Basics

Key Concepts to Internalize:

  1. Ethereum = World Computer
    • Anyone can deploy code that runs FOREVER
    • Code is executed by thousands of computers simultaneously
    • Results are deterministic (same input = same output always)
  2. Smart Contracts = Autonomous Code
    • Once deployed, they run EXACTLY as programmed
    • No one can shut them down (not even creators)
    • They hold real money (ETH, tokens)
    • They execute automatically when conditions are met
  3. Gas = Computation Cost
    • Every operation costs gas
    • Storage is EXPENSIVE (writing to blockchain)
    • Reading is FREE (view functions)
    • Complex logic = higher gas = more expensive

Evening Wrap-Up (30 min)

CRITICAL THINKING: What CAN’T Smart Contracts Do?

Write down your answers BEFORE reading mine:

  • Can a smart contract check the weather?
  • Can it read data from outside the blockchain?
  • Can it execute at a specific future time automatically?
  • Can you update a contract’s code after deployment?

The Truth (The Oracle Problem): ❌ Smart contracts are BLIND to the real world ❌ They can’t make HTTP requests ❌ They can’t access random data ❌ They don’t “wake up” on their own ✅ They ONLY execute when someone calls them ✅ They ONLY know what’s on-chain

This is why oracles exist (Chainlink) - they’re bridges to external data.