Skip to main content

· 3 min read

People use blockchains to make online transactions or payments. However, blockchain APIs and data storage are not built for data analysis purposes. This makes it hard for data scientists or analysts to step into those TB-level volumes of data and find out insights using SQL queries.

Blockroma is a blockchain indexer and explorer that extracts, transforms, and saves EVM-based blockchain data into PostgreSQL database, GraphQL APIs, and web-browsable UIs.

How does it work?

Ethererum blockchain serves all the block and transaction data via its JSON RPC API. The blockchain realtime indexer will listen to the latest block height and fetch the block accordingly. And meanwhile, the catchup indexer will scan a range of blocks. Then we apply parsers to those raw data and then insert results into the database.

Blockroma and Ethereum

Here is how to run Blockroma against Ethereum:

git clone git@github.com:stargately/blockroma.git
cd blockroma

nvm use lts/gallium
npm install

# prepare environment variable
cp ./.env.tmpl ./.env

In the .env file, fill in your database URL and mainnet endpoint, for example,

DATABASE_URL=postgres://localhost:5432/blockroma_eth
ETHEREUM_MAINNET_RPC_URL=https://mainnet.infura.io/v3/TODO_TOKEN

And then, you could customize the indexer in config/ethereum-mainnet.js

module.exports = {
chain: {
chainId: 1,
chainName: "Ethereum",
symbol: "ETH",
rpcUrl: process.env.ETHEREUM_MAINNET_RPC_URL,
decimals: 18,
networkPath: "",
},
indexer: {
catchup: {
enabled: false, // enable if you want
blocksBatchSize: 200,
blockNumberRanges: [
[0, "latest"], // range to scan
],
},
realtime: {
enabled: true,
},
},
};

Once you setup the indexer and explorer, you could run it with

NODE_ENV=production npm run build
NODE_CONFIG_ENV=ethereum-mainnet npm run start

How to browse Blockchain data?

Then, open your browser with http://localhost:4134/, and you can visit

  • http://localhost:4134/blocks for blocks
  • http://localhost:4134/txs for transactions
  • http://localhost:4134/api-gateway/ for APIs

Or simply tap your / key and input your hash, address or block height, and finally hit Enter to search.

Search with blockroma

How to run SQL queries on Ethereum?

Connect to the database that is serving Blockroma service and then you will see address, block, transaction for ETH and then ERC20, ERC721, ERC1155 token and tokenTransfer tables.

UpNext

Blockroma is still in development, and we recently added parsers for ERC20, ERC721, and ERC1155. The next step will be visualizing those parsed tokens and token transfers into web pages and exposing those data models as GraphQL APIs.

To keep posted with our latest progress, please star and fork our project on Github.

Star Blockroma on Github ⭐️

· 3 min read

Blockroma v0.1.0

Stargately is on a mission to provide the best DAO community development tools that anyone can use to start building on Web3. Blockroma is our latest product that allows anyone to view wallet addresses, transaction hashes, and block information on EVM compatible blockchains with a single click.

Find the Blockroma blockchain explorer at https://blockroma.com/

Blockroma plays an important role in the armada of multiple tools that we are putting in the hands of blockchain developers. It is built with the modern web stack - TypeScript, KOA, React, Apollo GraphQL, TypeORM, and PostgreSQL.

Blockroma’s ultimate goal is to be a multi-chain browser, and the first step is being Ethereum web3 compatible.

How Does Blockroma Work?

Part of the beauty of blockchain is that all transactions are stored on their respective chains in an open and transparent manner. Blockchain nodes store copies of all the information that is a part of these digital ledgers, but it is difficult to access this info unless you are running a node. Blockroma pulls information from blockchain nodes and combines it into an easily accessible search engine that anyone can view, explore, and query at any time.

blockchain explorers like Blockroma and Etherscan act as search engines to provide a view of the transactions and activities that are occurring on blockchains. But unlike Etherscan, Blockroma aims to be open-sourced, multi-chain and community-driven.

Key Features

  • View transaction data on EVM compatible blockchains.
  • Easy to find data for particular TX hashes, addresses, or blocks.
  • Developer-friendly with an open GraphQL API.

How Can You Use Blockroma?

Blockchain and crypto users, traders, and developers frequently reference blockchain explorers to see the status of their recent transactions and measure the pulse of on-chain activity to gauge the overall trends. blockchain explorers offer a straightforward way to explore on-chain data and browse many insights and opportunities. Use Blockroma to:

  • Observe activity on EVM compatible blockchains
  • View the latest transactions hashes
  • Keep track of the latest gas fees and transaction fees
  • Develop your own dApps by determining features you like
  • View information related to mining transactions
  • Analyze market activity that influences blockchain growth

This information can be critical to both crypto users and blockchain developers, so we must create platforms and tools to access it in the simplest ways possible.

Fork Blockroma on Github 👉

What’s Next?

Blockroma will continue to be a completely free and open-source blockchain explorer, and we will continue to increase its capabilities over time. In the future, we will add developer guide, NFT/ERC721 and ERC20 support. Additionally, we will provide more advanced data pulled from multiple chains that will inform developers and investors alike.