Create a Simple Cosmos SDK Blockchain

Create a Simple Cosmos SDK Blockchain

When creating a blockchain, we have a few options. 1) Clone the repo for an existing chain like Juno link 2) Code evertything ourselves or 3) Use a CLI program that allows us to generate all the boilerplate code for a Cosmos SDK based chain, for this I will use Ignite CLI, which allows a user to do exactly that.

To start we can create a project directory or for simplicity, let's create one in our home folder.

cd $HOME

Now we will generate our blockchain project, in this case I will call the chain alpha. I will also give it an address prefix called alpha.

ignite scaffold chain beta --address-prefix beta

Once completed you can change your directory to the project directory with this command:

cd beta

I would suggest taking the time to familiarize yourself with the files created, note nearly all Cosmos chains will have similar folders like x proto etc

Once we have changed our directory, we can start our chain with one command:

ignite chain serve

If this works, your chain is now running(creating blocks) on your local host.

You can view your chains command with its binary as follows:

betad --help

To see more articles on creating application specific blockchains, please see our webiste:

Cosmos Journey Website:
Cosmos Journey

Other useful resources:

Interchain Discord