Beginner
Intro to Hardhat / Foundry — Hands-on
Learn the dev workflow.
Developer Beginner
5/7 — Intro to Hardhat / Foundry — Hands-on
GoalGet a full loop running: compile, test, deploy, verify—all from the CLI.
The root problem with conventional currency is all the trust that’s required to make it work.
Steps
- Initialize Hardhat (
npm init:-y && npx hardhat) or Foundry (forge init) in a fresh folder. - Add a simple contract:(Counter.sol) and compile.
- Write a basic test:That deploys and increments; run tests.
- Write a deploy script:That prints the address; run against a testnet with env secrets.
- Optional:Enable a fork (e.g., mainnet via Alchemy/Infura) and run your test against the fork to see real state.
- Verify the deployed contract:Via the framework’s verify task/plugin.