2026-07-29
session 2
1. PiggyBank
Going public: faucet, bridge, live deploy on Base Sepolia
What we did
- Fixed the failed GitHub CI run: forge fmt --check wanted (bool ok,) not (bool ok, ); ran forge fmt, pushed, CI green in 19s
- Claimed 0.05 test ETH from Google's faucet on Ethereum Sepolia (their list had dropped Base Sepolia)
- Bridged 0.04 test ETH from Ethereum Sepolia to Base Sepolia by sending it to Base's official L1StandardBridge contract; it minted on L2 about a minute later
- Deployed PiggyBank to Base Sepolia with forge create, a real public testnet anyone can inspect
- Verified the source code on Blockscout, so the explorer shows readable Solidity instead of bytecode
- Ran a public deposit (0.005 ETH) and withdrawAll against the live contract with cast
What I learned
- Faucets are developer marketing: Google gives away worthless test ETH to sell RPC node access; Coinbase does it to attract builders to Base
- Faucets only ever need your public address; anything asking for a private key is a scam
- Bridging L1 to L2 can be as simple as sending ETH to the bridge contract, which mints it to your same address on the other chain
- Contract addresses are deterministic (hash of deployer address + nonce), so the Base Sepolia deploy got the same address as the anvil one
- Source verification uploads your code to the explorer, which recompiles it and checks the bytecode matches what is on chain
- Public RPC endpoints are load balanced and can serve slightly stale state; a read right after a write may lag a block or two
- CI emails titled Run failed mean a repo check failed; gh run view --log-failed shows exactly why
Next up
- Project 2: write an ERC-20 token from scratch, then compare with OpenZeppelin
- Learn the approve / transferFrom allowance pattern that underpins DeFi