Skip to content

Legumtechnica/blockchain-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Blockchain & Cryptocurrency Workshop 2025

By QuillDB Solutions Private Limited

πŸš€ Complete hands-on blockchain development workshop with working code examples in Python and Solidity.


πŸ“¦ Quick Start

# Clone the repository
git clone https://github.com/Legumtechnica/blockchain-workshop.git

# Navigate to directory
cd blockchain-workshop-2025

# Install dependencies
pip install -r requirements.txt

# You're ready to go!

πŸ“ Repository Structure

blockchain-workshop/
β”œβ”€β”€ day1/                          # Day 1: Foundations
β”‚   β”œβ”€β”€ simple_blockchain.py       # Build a blockchain from scratch
β”‚   β”œβ”€β”€ create_wallet.py           # Generate Ethereum wallets
β”‚   β”œβ”€β”€ sign_message.py            # Digital signatures demo
β”‚   β”œβ”€β”€ transaction_demo.py        # Send transactions
β”‚   └── hash_demo.py               # Hashing examples
β”‚
β”œβ”€β”€ day2/                          # Day 2: Smart Contracts
β”‚   β”œβ”€β”€ HelloWorld.sol             # Your first smart contract
β”‚   β”œβ”€β”€ MyToken.sol                # ERC-20 token
β”‚   β”œβ”€β”€ SimpleStorage.sol          # Storage contract
β”‚   β”œβ”€β”€ deploy_contract.py         # Deploy with Web3.py
β”‚   └── interact_contract.py       # Interact with contracts
β”‚
β”œβ”€β”€ requirements.txt               # Python dependencies
β”œβ”€β”€ .gitignore                     # Git ignore file
└── README.md                      # This file

🎯 What You'll Learn

Day 1: Blockchain Fundamentals

  • βœ… How blockchain works under the hood
  • βœ… Build a blockchain in Python
  • βœ… Cryptographic hashing
  • βœ… Public/private key cryptography
  • βœ… Create Ethereum wallets
  • βœ… Digital signatures
  • βœ… Send your first transaction
  • βœ… Use MetaMask wallet
  • βœ… Explore Etherscan

Day 2: Smart Contracts & DeFi

  • βœ… Write smart contracts in Solidity
  • βœ… Deploy contracts to Ethereum
  • βœ… Create your own ERC-20 token
  • βœ… Understand DeFi protocols
  • βœ… NFTs and how they work
  • βœ… Build a complete dApp
  • βœ… Final project

πŸš€ Getting Started

Prerequisites

Required:

  • Python 3.8 or higher
  • pip (Python package manager)
  • Code editor (VS Code, PyCharm, etc.)
  • Web browser (Chrome/Firefox/Edge)

Optional:

  • Git (for cloning repository)
  • MetaMask browser extension

Installation

1. Install Python Dependencies:

pip install -r requirements.txt

2. Verify Installation:

python -c "import web3; print('βœ… Web3.py installed successfully!')"

3. Install MetaMask:


πŸ’» Day 1 Exercises

Exercise 1: Simple Blockchain

Build a blockchain from scratch in Python:

python day1/simple_blockchain.py

What it does:

  • Creates genesis block
  • Adds blocks to chain
  • Validates blockchain integrity
  • Demonstrates tamper-proof nature

Try modifying:

  • Add your own transactions
  • Change difficulty
  • Try to tamper with blocks

Exercise 2: Create Wallet

Generate Ethereum wallets programmatically:

python day1/create_wallet.py

What you'll get:

  • Ethereum address (public)
  • Private key (keep secret!)
  • Understanding of key pairs

⚠️ Security Note: These are real Ethereum keys. Use for testing only!


Exercise 3: Digital Signatures

Learn how transactions are signed:

python day1/sign_message.py

What it demonstrates:

  • Message signing
  • Signature verification
  • How blockchain proves ownership

Exercise 4: Hash Demo

Understand cryptographic hashing:

python day1/hash_demo.py

Try:

  • Hash different inputs
  • See avalanche effect
  • Understand collision resistance

🦊 MetaMask Setup

Step-by-Step Guide

1. Install Extension:

2. Create Wallet:

  • Click "Create a Wallet"
  • Set a strong password
  • CRITICAL: Write down 12-word seed phrase on PAPER
  • Store seed phrase securely

3. Switch to Sepolia Testnet:

  • Settings β†’ Advanced
  • Enable "Show test networks"
  • Network dropdown β†’ Select "Sepolia"

4. Get Test ETH:

Option 1: Alchemy Faucet

  • Go to sepoliafaucet.com
  • Create free account
  • Paste your address
  • Request 0.5 SepoliaETH

Option 2: QuickNode Faucet


πŸ” Security Best Practices

NEVER:

  • ❌ Share your private key or seed phrase
  • ❌ Type seed phrase into any website
  • ❌ Store keys/phrases digitally (no photos, cloud)
  • ❌ Send to "support" (MetaMask never asks)

ALWAYS:

  • βœ… Write seed phrase on paper
  • βœ… Store in secure location
  • βœ… Use hardware wallet for real funds
  • βœ… Double-check addresses before sending
  • βœ… Start with small test amounts

πŸ“Š Code Examples Explained

Simple Blockchain

# Create blockchain
blockchain = Blockchain()

# Add blocks
blockchain.add_block("Alice β†’ Bob: 1 BTC")
blockchain.add_block("Bob β†’ Charlie: 0.5 BTC")

# Validate
print(f"Valid? {blockchain.is_valid()}")

Create Wallet

from eth_account import Account
import secrets

# Generate private key
private_key = "0x" + secrets.token_hex(32)

# Create account
account = Account.from_key(private_key)

print(f"Address: {account.address}")
print(f"Private Key: {private_key}")

Sign Message

from eth_account.messages import encode_defunct

# Encode message
message = encode_defunct(text="Hello Blockchain")

# Sign
signed = account.sign_message(message)

# Verify
recovered = Account.recover_message(message, signature=signed.signature)
print(f"Match? {recovered == account.address}")

πŸŽ“ Learning Resources

Official Documentation

Tools

Learning Platforms


πŸ› Troubleshooting

Common Issues

Problem: ModuleNotFoundError: No module named 'web3' Solution:

pip install web3 eth-account

Problem: MetaMask not connecting Solution:

  • Check browser permissions
  • Try different browser
  • Reinstall extension

Problem: Faucet not working Solution:

  • Try alternative faucet
  • Wait 24 hours (daily limit)
  • Ask instructor for test ETH

Problem: Transaction pending forever Solution:

  • Check network (must be Sepolia)
  • Increase gas fee
  • Cancel and resend

Problem: Can't find seed phrase Solution:

  • ⚠️ Without seed phrase, wallet is LOST
  • Create new wallet
  • Never lose seed phrase again!

πŸ’‘ Tips for Success

For Workshop Participants

  1. Don't rush - Take time to understand each concept
  2. Ask questions - No question is stupid
  3. Experiment - Modify code, break things, learn
  4. Take notes - You'll want to reference later
  5. Network - Connect with other participants
  6. Practice after - Repetition builds mastery

For Instructors

  1. Test everything - Run all code before workshop
  2. Have backups - Pre-deployed contracts, funded wallets
  3. Go slow - Especially on security topics
  4. Check understanding - Ask questions frequently
  5. Be patient - People learn at different speeds
  6. Share stories - Real-world examples resonate

🀝 Contributing

Found a bug? Have an improvement? Contributions welcome!

# Fork the repo
# Create feature branch
git checkout -b feature/improvement

# Make changes
git commit -am 'Add improvement'

# Push to branch
git push origin feature/improvement

# Create Pull Request

πŸ“œ License

MIT License - See LICENSE file for details


πŸ“ž Support

Workshop Instructor: Parijat Sharma
Company: QuillDB Solutions Private Limited
Email: contact@quilldb.io
Website: quilldb.io


πŸŽ‰ Acknowledgments

  • Ethereum Foundation for documentation
  • OpenZeppelin for secure contracts
  • Web3.py maintainers
  • Remix IDE team
  • All workshop participants!

πŸ“… Workshop Schedule

Day 1 (9 AM - 5 PM)

  • 9:00 - 10:30 | Introduction to Blockchain
  • 10:30 - 10:45 | Break
  • 10:45 - 12:30 | Blockchain Architecture & Crypto
  • 12:30 - 1:30 | Lunch
  • 1:30 - 3:00 | Hands-On: Build Blockchain
  • 3:00 - 3:15 | Break
  • 3:15 - 5:00 | MetaMask & First Transaction

Day 2 (9 AM - 5 PM)

  • 9:00 - 10:30 | Smart Contracts & Solidity
  • 10:30 - 10:45 | Break
  • 10:45 - 12:30 | Deploy Your Contract
  • 12:30 - 1:30 | Lunch
  • 1:30 - 3:00 | DeFi & NFTs
  • 3:00 - 3:15 | Break
  • 3:15 - 5:00 | Final Project & Presentations

⭐ Star This Repo!

If you found this workshop helpful, please star the repository!

# Clone this amazing repo
git clone https://github.com/Legumtechnica/blockchain-workshop.git

# Star on GitHub
# Click the ⭐ Star button on GitHub

Happy Learning! πŸš€

Remember: With great blockchain power comes great responsibility. Use wisely!


Last Updated: December 2025
Version: 1.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors