How to display a real-time blockchain dashboard in your terminal.
For developers using the Cosmos SDK, getting real-time information from your current environment can be helpful feedback, especially when working with transactions, blocks, validators, or versioning in your blockchain.
As Cosmos SDK base blockchains are built using different computers and environments, for example, some developers use a headless VPS that does not contain a user interface, it can be a real challenge for them to view the current state of their blockchain.
This is why we have created GEX, a lightweight explorer that launches in the terminal and does not require a browser or any other tools.
GEX creates a — quick access — dashboard for your blockchain by providing the following:
- current blockchain state
- version information
- the newest blocks
- assigned validators
- a livestream of incoming transactions in JSON format
GEX uses a combination of WebSockets and RPC endpoints to show the current blockchain state and incoming transactions in real-time. With the WebSocket integrated, you can be sure no block or transaction will be missed as all updates are in real-time.
The application is written in Golang, easy to install and simple to start. It is using a combination of WebSocket (for transactions, blocks, and validator changes) and RPC (for initial state or network status information).
First, run your Cosmos SDK blockchain application.
go get -u github.com/cosmos/gex
And run it with:
This should show an explorer in your terminal.
GEX is published as Open Source Software and intended to be expanded upon. Feel free to adapt the source code to your needs and make it your own.
Visit the code on: https://github.com/cosmos/gex
To the cosmos 🚀