Blockchain Full Course for Beginners - course code
Everything here runs on your own computer, against a LOCAL test chain (anvil). No real money, no real wallets, no mainnet.
The addresses in .env are anvil's public, well-known test accounts. Never put a real private key in any of these files.

Tested with: Python 3.14, ecdsa 0.19.2, Foundry 1.8.4 (forge, cast, anvil, solc 0.8.37), Node.js 20 with ethers 6.17.0.

1) Python part (chapters 3-11), from this folder:
     python3 -m venv .venv
     source .venv/bin/activate          (Windows: .venv\Scripts\activate)
     pip install ecdsa==0.19.2
     python hashing.py   (and blockchain.py, tamper.py, pow.py, keys.py, coin.py, merkle.py, network.py, ledger.py, guess.py)

2) Solidity part (chapters 13-19):
     cd chain-lab
     forge build
     forge test
   lib/forge-std (Foundry's test library, v1.17.0, MIT/Apache-2.0 licensed) is included, so no install step is needed.
   (In the video, `forge init` downloads it for you when you create your own project.)
   If you ever want a fresh copy of forge-std instead, run these inside chain-lab:
     git init
     rm -rf lib/forge-std .gitmodules foundry.lock      (Windows PowerShell: Remove-Item -Recurse -Force lib\forge-std, .gitmodules, foundry.lock)
     forge install foundry-rs/forge-std@v1.17.0
   (Or, without git: delete lib/forge-std and run  forge install --no-git foundry-rs/forge-std@v1.17.0)
   (Plain `forge install foundry-rs/forge-std` without those steps fails with "cannot safely install dependency",
   because .gitmodules already lists forge-std.)

Note: token.js and dapp/app.js expect the contract at 0x5FbDB2315678afecb367f032d93F642f64180aa3, which is where
the FIRST deployment from Alice lands on a FRESH anvil. Restart anvil (Ctrl+C, then anvil) before steps 3 and 4.

3) Local chain + JavaScript (chapters 12, 15):
     terminal 1:  anvil
     terminal 2:  source .env
                  cd chain-lab
                  forge create src/SimpleToken.sol:SimpleToken --broadcast --from $ALICE --unlocked --constructor-args 1000
                  cd ../js && npm install && node token.js

4) The dApp (chapters 16-17), with a fresh anvil running, in a terminal where you ran source .env:
     cd chain-lab && forge create src/TipJar.sol:TipJar --broadcast --from $ALICE --unlocked
     cd ../dapp && python3 -m http.server 8765
     open http://127.0.0.1:8765/ in a browser

This is learning code. It has not been audited and must not be used with real funds.
