What really happens between a button on a web page and a smart contract?
Dapps 301 · about 13 minutes a level
How a decentralized app fits together: smart contracts on a blockchain, a web front end, and the user's wallet in between. You read and write contracts from JavaScript with the ethers.js library, listen to events and index them, store files on IPFS, test locally, deploy to the Sepolia test network, review security, and design an interface that keeps users and their keys safe.
Go deeper, level by level
- How a dapp fits together: Contract, front end and wallet, Nodes, RPC providers and JSON-RPC, Wallets in the browser: EIP-1193 and EIP-6963, A local chain and a test network
- Reading the chain with ethers.js: Providers: a read-only window on the chain, Wei, decimals and BigInt, ABIs and reading a contract
- Writing to contracts: Signers and sending transactions, Gas, fees and nonces from the front end, When transactions fail, Signing messages and typed data
- Events and indexing: Events and logs, Listening for events and querying the past, Indexers: from logs to a database
- Decentralized storage: IPFS and content addressing, Pinning, persistence and privacy, What goes on chain and what goes off
- Testing and deploying: Testing contracts: unit, fuzz and fork tests, Testing the front end and the whole flow, Deploying to a test network, Addresses, networks and upgrades
- Security review: Reviewing contract risks, Front-end and supply-chain security, Approvals, signatures and phishing, Audits, bug bounties and incident response
- Usability, key safety and a capstone: Wallet flows people can trust, Keys, seed phrases and safer accounts, Capstone: a guestbook dapp on a test network
Every lesson shows its sources and how sure we are, and is checked by Everwhy.