Skip to content

Building Web3 Applications

The reader of this book is a software engineer, and this section is where that matters most directly: it shows how ordinary TypeScript and React code talks to the blockchain infrastructure covered in every preceding section. Most of this section's non-browser-dependent examples have been run against live, real mainnet data, not illustrative pseudocode, actual verified queries against actual deployed contracts.

What you need to know first

JSON-RPC, Ethereum Accounts, and Contract ABI. This section builds application-layer patterns directly on top of those underlying mechanics, and assumes you understand what a readContract call or a signed transaction is actually doing underneath.

Chapters

  1. RPC Providers: what you're actually trusting when you query a third-party endpoint
  2. Connecting Wallets: EIP-1193, and exactly what a connection does and doesn't grant
  3. WalletConnect: bridging a dapp to a wallet on a different device entirely
  4. Reading Blockchain State: why reads are free, verified against WETH's live total supply
  5. Calling Contracts: call vs. transaction, and why you simulate before you send
  6. Sending Transactions: the full lifecycle, and the two distinct ways a transaction can fail
  7. Signing Messages: gasless authentication, verified end to end, and the EIP-191 prefix that makes it safe
  8. Typed Data and EIP-712: structured, human-readable signatures, verified with a real signature round-trip
  9. Transaction Receipts: a real, historical mainnet receipt, decoded field by field
  10. Event Indexing: a live eth_getLogs query returning 187 real WETH transfers
  11. viem: the library behind every code example in this book's Ethereum-side chapters
  12. wagmi: React hooks for the state-management problems viem deliberately leaves alone

Build one

examples/wallet-stats/ is a small, runnable application built directly on this section's patterns, reading real balances and transaction history for any address you give it.

Next

Continue to DeFi, where this section's contract-calling and event-reading patterns get applied to real, live decentralized exchange and lending protocols.