Open this lesson in your favourite AI. It'll walk you through the why, explain the demo, and quiz you on the try-it list.
To deploy, you need a wallet (an address + private key) and an RPC endpoint (a node to talk to). Locally, Anvil gives you ten pre-funded accounts and an RPC at http://127.0.0.1:8545 in one command. For a testnet like Sepolia, you'll sign up for an RPC provider (Alchemy, Infura, or a public one) and fund a wallet from a faucet. This is plumbing, but it's plumbing every single deploy needs.
Anvil is a local EVM node that starts instantly, pre-funds ten accounts with 10 000 ETH each, and mines a block per transaction — making iteration loops near-instant. Sepolia is Ethereum's canonical testnet where transactions flow through real validators, so deploy timings and gas costs match mainnet behavior.
# ---- LOCAL (Anvil) ----
# Start anvil in a separate terminal:
anvil
# Outputs 10 test accounts with private keys and 10,000 ETH each.
# RPC URL: http://127.0.0.1:8545
# ---- TESTNET (Sepolia) ----
# 1. Create a wallet (you can use foundry's cast to make one):
cast wallet new
# Save the private key to .env (never commit it):
echo 'PRIVATE_KEY=0x...' >> .env
# 2. Get a Sepolia RPC URL from Alchemy/Infura/public:
echo 'SEPOLIA_RPC_URL=https://ethereum-sepolia.publicnode.com' >> .env
# 3. Fund your wallet from a Sepolia faucet
# (google "sepolia faucet" — they come and go).
# Sanity check balance:
cast balance $(cast wallet address --private-key $PRIVATE_KEY) \
--rpc-url $SEPOLIA_RPC_URLanvil in a terminal. Note the 10 test accounts and their private keys. These reset every time anvil restarts.cast balance 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --rpc-url http://127.0.0.1:8545. You should see 10000000000000000000000 wei.cast wallet new. Save the private key somewhere safe (a .env file with .gitignore, not your repo).cast balance and a Sepolia RPC URL. Confirm the faucet worked.Use these three in order. Each builds on the one before.
Explain what an Ethereum RPC endpoint is and why you need one. What's the difference between running your own node, using Alchemy, or using a free public RPC?
A 'wallet' is really just a private key plus conventions. Walk me through what the key is used for (signing), how the address is derived from it, and why losing the key means losing the address forever.
For production, what are the tradeoffs between self-hosted nodes, paid RPC providers (Alchemy/Infura), and decentralized RPC networks (like Pocket/Gateway)? When should a serious team pick each?