project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

Segment

The project "Segment" is an NFT indexer developed on the Consensys layer 2 platform called Linea. The indexer is written in Golang and is highly portable, requiring only an Infura API key and a PostgreSQL database to index the entire blockchain.

Segment

Created At

ETHGlobal Paris

Winner of

🖼 Linea — Best NFT Indexer

Project Description

This project is an NFT indexer developed on the brand new Consensys layer 2: Linea. This tool works by connecting to a node (using an infura key, or a private node) and an SQL database. Segment interacts both with the blockchain, retrieving and iterating on all transactions, and with a database. The database will be used to store the data processed by our indexer script, and, in a second time, will enable our API to retrieve it and transmit it to some DAPP through an API.

The advantage of this tool is that it's highly portable, requiring only an infura api key and a SQL database to index the entire blockchain. Golang is perfectly suited to this kind of architecture, making the application much more scalable and modular.

It also comes with a REST API with some cool endpoints.

Thanks to Segment, any Dapp can deploy its own indexer and customize its own enpoints and data.

How it's Made

I built this project in Golang, which is not my stack at all, and in fact I learned on the job because my team unfortunately abandoned me on Saturday morning. I learned a lot of interesting things about the information that contains the transactions and about the GETH libraries. This project illustrates how data is indexed on the blockchain, and has the merit of being fairly simple and effective. I decided to do this project on Linea because it has been a Mainet product since very recently, and I thought it would be useful and interesting to offer this type of tool to the community.

I think there's still some optimizing to be done to make this product complete, but I'm pretty happy with the result.

background image mobile

Join the mailing list

Get the latest news and updates