Let’s explore Cosmos and Get started!

Glaicon Peixer
Coinmonks
2 min readMay 3, 2023

--

Introduction

Cosmos is the top network for those looking to create a new blockchain. With over 63 billion in digital assets under management, it provides a perfect ecosystem for basing a blockchain project.

Cosmos allows you to easily build blockchains from scratch using Proof-of-Stake or Proof-of-Authority. It provides API access, API documentation, and a CLI for executing blockchain commands. Additionally, the blockchain hub makes it easy to connect with other blockchains, and Cosmos SDK provides multiple modules with various capabilities. Get more details about Comos here.

Strictly speaking, Cosmos is a decentralized network of independent parallel blockchains, each powered by BFT consensus algorithms like Tendermint consensus.

Core infrastructure

Cosmos SDK is created on top of CometBFT which is Byzantine-Fault Tolerant State Machine Replication forked from Tendermint code, in that way the application doesn’t need to care about a networking layer or consensus layer, it’s done automatically.

CometBFT is a blockchain application platform; it provides the equivalent of a web-server, database, and supporting libraries for blockchain applications written in any programming language.

Within Cosmos SDK you will find several modules that will turn your journey easier, nowadays there are +15 modules like Auth, Governance, Banking, NFT, and Staking, needing a few lines to set up and put to work. Plus, there is CosmosWasm a module that enables smart contracts, and IBC an Interblockchain Communication Protocol.

Ignite CLI

Everything is done through Ignite CLI, a powerful command-line interface that provides all the necessary commands for creating a blockchain. It helps you to scaffold the project, add custom messages, query blockchain data, launch nodes, and launch the localhost version.

Basic commands

Here are the commands you will most commonly use, and here is where you can learn how and why to use them.

  • ignite scaffold chain — create a new chain
  • ignite chain serve — command to download dependencies and compiles the source code
  • ignite scaffold message — create a new message(endpoint) in the chain
  • ignite scaffold map — create a CRUD for data stored as key-value pairs
  • ignite scaffold list — create a CRUD for data stored as an array

Examples

This https://github.com/Peixer/superchain is a simple personal example of a blockchain using Cosmos SDK. It contains a list for saving IPFS CIDs and a message for downloading and executing a Python file saved on IPFS, returning the output from the Python code. Check out the custom message to run the Python code here.

Competitors

These are all the competitors I found during my time working with Cosmos:

--

--

Glaicon Peixer
Coinmonks

A guy powered by chatGPT writing about Blockchain technologies.