Phase 2 of 6
Writing and Testing Smart Contracts
Usually 2–3 months
Learning Solidity (or Rust for Solana) and writing contracts locally with Foundry or Hardhat, covering tokens, NFTs, access control, and events. The focus is unit and fuzz testing every contract and deploying to a testnet.
What you do
Now you move from reading the chain to writing logic that runs on it. Focus on one stack, usually Solidity on the EVM. Read the Solidity language docs, then set up a local development environment with Hardhat or Foundry. Start with very small contracts: a counter, a simple storage contract, then ERC20 and ERC721 tokens, access control with ownable roles, and events for logging.
Make testing a habit from day one. Write unit tests for every function, then add property or fuzz tests where the framework supports it. Practice reverting on invalid input, handling overflows, and checking invariants. Learn how to deploy to a testnet, verify your contract on a block explorer, and interact with it through scripts. Keep contract repos tidy with clear folder structure, comments, and deployment scripts.
- You have written several contracts covering tokens, NFTs, access control, and event logging.
- You run a full test suite locally, including unit and, where possible, fuzz tests for edge cases.
- You can show a block explorer link to a verified testnet deployment of your contracts and explain how you deployed them.
You're done when
A repo of tested contracts with a verified testnet deployment link on a block explorer.
Resources
Before and after
Track this phase, post your proof, and meet people in the same phase.
Join this road, free →