Go
The example chain requires Go 1.25 or higher.Configure Go Environment Variables
After installing Go, make sure$GOPATH/bin is on your PATH so installed binaries (like exampled) are accessible.
Open your shell config file (~/.zshrc on macOS or ~/.bashrc on Linux) and add:
go env GOPATH
Make
Make is used to run build and development commands throughout the tutorial.- macOS:
xcode-select --install - Linux (Debian/Ubuntu):
sudo apt install build-essential
Docker
Docker is required to runmake proto-gen, which generates Go code from the moduleβs proto files using buf.
make proto-gen.
Git
Clone the repository
Clone cosmos/example and navigate into it:mainβ the complete chain with the fullx/countermodule wired in.tutorial/startβ the same chain with the counter module stripped out. Start here if you want to build the module yourself from scratch.
Repository Layout
After cloning, the repository looks like this:Where things live
The tutorials in this section will walk you through the most common kinds of chain changes and show you where they usually live in the repo:- Add or modify a module:
x/<module>/andproto/ - Wire a module into the chain:
app.go - Change the binary or CLI:
exampled/ - Run the chain or tests:
Makefiletargets
Next: Quickstart β