0Pricing
Web3 & DApp Development Fundamentals · Lesson

cast and anvil

CLI and local node.

Two CLI Workhorses

Beyond forge, Foundry ships cast and anvil. cast is a Swiss-army knife for interacting with chains and contracts from the terminal. anvil is a fast local Ethereum node for development.

Together they let you deploy, call, and inspect contracts without writing any application code.

Starting Anvil

Running anvil spins up a local chain at http://127.0.0.1:8545. It prints ten pre-funded accounts with their private keys, ready for testing.

By default it mines a block for every transaction instantly, so there is no waiting.

$ anvil
Listening on 127.0.0.1:8545
Available Accounts
(0) 0xf39F...2266 (10000 ETH)
Private Keys
(0) 0xac09...ff80

All lessons in this course

  1. Foundry vs Hardhat
  2. forge Testing
  3. Fuzzing and Invariants
  4. cast and anvil
← Back to Web3 & DApp Development Fundamentals