Skip to main content
Building on Cosmos is simple: you can start a chain with a single command. This quickstart gets you from zero to a running chain, a submitted transaction, and a queried result in minutes. exampled is a simple Cosmos SDK chain that shows the core pieces of a working app chain. It includes the basic building-block modules for accounts, bank, staking, distribution, slashing, governance, and more, plus a custom x/counter module. In the next tutorials, you’ll build a simple version of that module yourself and then walk through the full implementation.
Before continuing, make sure you have completed the Prerequisites to get your environment set up.

Install the binary

Run the following to compile the exampled binary and place it on your $PATH.
make install
Verify the install by running:
exampled version
You can also run the following to see all available node CLI commands:
exampled

Start the chain

Run the following to start a single-node local chain. It handles all setup automatically: initializes the chain data, creates test accounts, and starts the node. Leave it running in this terminal.
make start

Query the counter

Open a second terminal and query the current count:
exampled query counter count
You should see the following output, which means the counter is starting at 0:
{}
You can also query the module parameters:
exampled query counter params
This shows that the fee to increment the counter is stored as a module parameter. The base coin denomination for the exampled chain is stake.
params:
  add_cost:
    - amount: "100"
      denom: stake
  max_add_value: "100"

Submit an add transaction

Send an Add transaction to increment the counter. This charges a fee from the funded alice account you are sending the transaction from:
exampled tx counter add 5 --from alice --chain-id demo --yes

Query the counter again

After submitting the transaction, query the counter again to see the updated module state:
exampled query counter count
You should see the following:
count: "5"
Congratulations! You just ran a blockchain, submitted a transaction, and queried module state.

Next steps

In the following tutorials, you will:
  1. Build a minimal version of this module from scratch to understand the core pattern
  2. Walk through the full x/counter module example to see what it adds
  3. See how modules are wired into a chain and how to run the full test suite
Next: Build a Module from Scratch →