Subquery Network: Ethereum Support

Published on: 19.04.2023
Subquery Network: Ethereum Support

Subquery Network: Ethereum Support, SubQuery is an open data indexer that is designed to be flexible, fast and provide universal coverage.

Why Use SubQuery?

SubQuery also brings some major improvements to existing decentralised indexing solutions, including users of The Graph. For one, SubQuery is far more flexible with the ability to make external API calls or import external libraries from within your mapping functions, and better controls to run your projects in your own infrastructure with automated DOS (denial of service) mitigation controls. As Subquery Network: Ethereum Support!

Both SubQuery and The Graph are designed to index data fast, but analysis shows that the existing beta support from SubQuery is already 1.85x faster for common projects over The Graph (e.g the standard Ethereum Name Service project). This adds up when you’re indexing millions of blocks, and is something to consider when choosing your indexer. SubQuery achieves this by using mulit-threading and optimisation of the store to reduce costly database writes. With faster sync times, developers can iterate faster and deliver features to market quicker.

Getting Started

The best way is to start with our starter project which contains a running project with an example of all mapping functions. You’ll need to install a recent version of @subql/cli via npm i -g @subql/cli@latest to access this.

If you don’t want to see a kitchen sink example, you can follow a step by step guide on how to create a real world example. Follow our quick start tutorial to see how to index all Ethereum Gravatars created or updated on the Ethereum network in less than 15 minutes.

If you’re already familiar with the Graph, you can jump right to a slightly more complicated quick start tutorial with the Ethereum Name Service project, which indexes all ENS Records in the ENS registry

With SubQuery’s Ethereum integration, there are three types of mapping handlers:

  • BlockHandler: All blocks and their hash and height
  • TransactionHandler: All transactions and their hash, height, and timestamp
  • LogHandler: On each and every log that matches optional filter criteria, access various data from the Ethereum logs.

­

SOURCE: SUBQUERY BLOG
REQUEST AN ARTICLE
Market Stats:
BTC Dominance: 59.79%(-0.20%/24h)
ETH Dominance: 12.44%(+0.52%/24h)
Defi Market Cap: $90.32B(+27.83%/24h)
Total Market Cap: $3247.39B(+4.39%/24h)
Total Trading Volume 24h: $242.65B(+34.06%/24h)
ETH Market Cap: $403.39B
Defi to ETH Ratio: 22.39%
Defi Dominance: 2.66%
Altcoin Market Cap: $1305.78B
Altcoin Volume 24h: $138.66B
Total Cryptocurrencies: 32355
Active Cryptocurrencies: 10161
Active Market Pairs: 90885
Active Exchanges: 762
Total Exchanges: 9610
BTC: 98124.88$(-0.4%/1H)
ETH: 3354.01$(-0.24%/1H)
AVAX: 35.74$(-0.76%/1H)
BNB: 620.38$(-0.7%/1H)
MATIC: 0.44$(-0.59%/1H)
FTM: 0.7$(-1.61%/1H)
ADA: 0.79$(-1.15%/1H)
DOT: 5.82$(-1.19%/1H)
UNI: 9.09$(-0.71%/1H)
CAKE: 1.93$(-0.96%/1H)
SUSHI: 0.77$(-1.42%/1H)
ONE: 0.02$(-0.47%/1H)