Loading...
Write, test, and deploy real contracts with Hardhat
From your first Hello contract to ERC-20, ERC-721, ERC-1155, and ERC-4626 vaults using battle-tested OpenZeppelin primitives. Includes Hardhat setup, testing, upgradeable proxies, access control, and the reentrancy attack class that drained the DAO.
Every contract starts the same way: license, pragma, contract definition. Then state and functions.
You never write ERC-20 from scratch in production. You inherit OpenZeppelin's audited base and customize.
'Who can call this?' is a question every production contract must answer. Ownable is the simplest answer.
An NFT is a token where every unit is unique. ERC-721 is the standard for that uniqueness.
The DAO hack drained $60M in 2016 by exploiting a reentrancy bug. You WILL write this class of bug unless you know the pattern.
Hardhat compiles, tests, deploys, and debugs Solidity. It's the Next.js of smart contract dev.
4626 is the standard for yield-bearing vaults. Yearn, Aave v3, Morpho — they all speak it.
Contract storage is expensive and hard to query. Events are cheap, indexed, and how frontends (and The Graph) read on-chain activity.
One contract holding many token types — fungible (like currency) and non-fungible (like swords). Used for in-game assets.
Contract code is immutable once deployed. But if you MUST ship a bugfix, the proxy pattern gives you a way.