Skip to content

2. Solidity & Token Standards

Gain minimal Solidity development ability and understand common token standards.

Module 1 gave you the machine; Module 2 hands you the language. This is where you stop reading onchain activity and start writing the contracts that produce it. The target is deliberately modest — “minimal Solidity ability” — because you do not need to master the language to be productive. You need to write, test, and deploy small contracts with confidence, and you need to know the two standards (ERC-20 and ERC-721) that almost every real project builds on.

The module opens with a long, hands-on Solidity and Hardhat session (09) that covers the syntax you will actually use — state variables, functions, mapping, event, modifier — alongside the habit that separates hobby code from shippable code: testing. Because contracts are immutable and hold real value, a test suite is not optional polish; it is how you gain the confidence to deploy at all. Lesson 10 then introduces the token standards: ERC-20 for fungible tokens and ERC-721 for NFTs, plus IPFS for the metadata an NFT points to. Rather than write these from scratch you will lean on OpenZeppelin, the audited reference implementations that the whole ecosystem reuses.

Two external Cyfrin Updraft chapters (11–12) reinforce the fundamentals from a second angle — a first storage contract, then a factory that deploys other contracts — so the core syntax lands through repetition in a different toolchain. The module closes with Solidity Tinkering (13), an experiment-driven session where you change small things and watch what happens, which is the fastest way to build real intuition.

By the end you should be able to write a simple Solidity contract, issue an ERC-20 with OpenZeppelin, explain how an ERC-721 links to its IPFS metadata, and write basic tests and read their results — exactly the skills Lab 2 asks for. This is the foundation Module 3 builds a full-stack dApp on top of.

  • Solidity syntax fundamentals
  • storage, mapping, event, and modifier
  • Contract compilation, deployment, and verification
  • OpenZeppelin
  • ERC-20, ERC-721, and IPFS metadata
  • Foundry / Hardhat basics

Two open references pair especially well with this module — bookmark them now:

  • Solidity by Example (maintained by Cyfrin) — a minimal, runnable contract for every language feature and token standard, plus a “Hacks” section of classic vulnerabilities. Use it as a quick lookup while you write Solidity.
  • OpenZeppelin Contracts — the audited, industry-standard implementations of ERC-20, ERC-721, ERC-1155, access control, and safety utilities. Real projects inherit these rather than re-implementing standards, and the Contracts Wizard generates a correct starting point from checkboxes.

Individual lessons link to the specific pages that match their topic.

Open the Module 2 lesson sequence

Open Lab 2: Build and Test Token Contracts

  • Write a Storage contract
  • Use OpenZeppelin Wizard to generate and deploy an ERC-20
  • Create an NFT demo with metadata
  • Write basic tests for the contracts

You will be able to

  • Write simple Solidity contracts
  • Issue an ERC-20 with OpenZeppelin
  • Explain the relationship between ERC-721 and IPFS metadata
  • Run basic tests and explain the results