- A working Cosmos SDK chain running on your machine
- A custom module you built yourself, wired into the chain
- A clear mental model of how modules, keepers, messages, and queries fit together
The example repo
All tutorials in this series are based on cosmos/example, a reference Cosmos SDK chain built around a customx/counter module.
The repo has two main branches:
main: the complete chain with the fullx/countermodule wired in. This is used in the Quickstart guide.tutorial/start: the same chain without the counter module. Thex/counterdirectory and its app wiring are stripped out so you can build the module from scratch by following the tutorial.
tutorial/start. If you want to browse the finished implementation first, use main.
What’s in this series
- Prerequisites: Install Go, Make, Docker, and Git. Clone the repo and get familiar with the layout.
- Quickstart: Build and run the chain in minutes. Submit a transaction, query the result, and see the counter module in action before you build it yourself.
- Build a Module from Scratch: Build a minimal counter module step by step: proto definitions, keeper, message server, query server, and app wiring. Start here if you want to understand how a module comes together.
-
Full Module Walkthrough: Walk through the complete
x/counterimplementation onmain. Covers everything added on top of the minimal module: params, governance-gated authority, validation, fees, sentinel errors, telemetry, AutoCLI, simulation, block hooks, and a full unit test suite. - Run and Test: Learn the full development workflow: running a local chain, using the CLI, and working with the three layers of testing: unit tests, end-to-end tests, and simulation.