loading...

ETH2.0 Analytical Explorer, Widgets, and GraphQL APIs

coinmonks profile image CoinMonks Originally published at bitquery.io on ・4 min read

Today, we will show what we have built in the past few weeks and our plan to support the ETH2.0 infrastructure.

ETH2.0 Medalla Testnet Explorer

We have added ETH2.0 Medalla Testnet support on Bitquery Explorer to show ETH2.0 data and analytics. You can access our Medalla Testnet Analytical explorer here.

Bitquery Explorer is open-source and built in a modular way to create any data visualizations on-demand.

ETH2.0 explorer

Embeddable Widgets

Our explorer is made out of embeddable widgets. We show all data metrics using these widgets. In essence, these widgets are simple HTML, Javascript code, which can embed into any other website to show ETH2.0 data.

For example, check out the following live widget for showing Daily ETH2.0 blocks.

``

ETH2.0 GraphQL APIs

Our GraphQL APIs enable Bitquery explorer widgets, and anyone can use these APIs to create ETH2.0 specific tools.

Our GraphQL API is specially designed to simplify data analysis and help to build complex data visualizations. It follows OLAP (Online analytic processing), where everything is considered ‘dimensions’ and ‘metrics.’

In ETH2, possible ‘dimensions’ are validators, blocks, proposers, attestations, and everything else that can serve as an entity in the GraphQL query.

Metrics are used to measure anything, so it is numeric, like counting unique amounts of deposits.

For example, to generate a distribution report for deposits against validators, you have to select the dimension ( validator.index ) and metric ( amount of deposit ) and build the query like:

`
{
ethereum2(network: medalla) {
deposits(options: {desc: "amount", limit: 10}) {
validator {
index
}
amount
}
}
}
`

The power of GraphQL API comes from the flexibility of combining multiple dimensions and metrics in one query. For example, replacing

`
validator{
index
}
`

With

`
date {
date
}
`

You get the query to respond with the days of the maximum deposit!

You can combine BOTH dimensions in one query, and here you get a 2-dimensional response:

`
{
ethereum2(network: medalla) {
deposits(options: {desc: "amount", limit: 10}) {
date {
date
}
validator {
index
}
amount
}
}
}
`

Our GraphQL APIs are highly flexible, and we are expanding them to cover every aspect of the ETH2.0 network.

Use our GraphQL playground to query ETH2.0 on-chain data.

Examples of ETH2.0 GraphQL queries

Let’s also see a few more examples of ETH2.0 GraphQL queries. You can run the following queries here — graphql.bitquery.io

Note: GraphQL queries are APIs that can be called programmatically.

Daily ETH2.0 blocks count

The following query gets Daily ETH2.0 blocks count.

`
{
ethereum2 {
blocks(options: {asc: "date.date"}) {
date: date {
date(format: "%Y-%m-%d")
}
count: count
proposers: count(uniq: block_proposers)
}
}
}
`

Result

`
{
"data": {
"ethereum2": {
"blocks": [
{
"date": {
"date": "2020-08-04"
},
"count": 2501,
"proposers": 2320
},
{
"date": {
"date": "2020-08-05"
},
"count": 5716,
"proposers": 4886
},
{
"date": {
"date": "2020-08-06"
},
"count": 5569,
"proposers": 4796
},
...
...
...
`

Daily ETH Deposits

To check the Daily ETH deposits, run the following query.

`
{
ethereum2 {
deposits(options: {asc: "date.date"}) {
date: date {
date(format: "%Y-%m-%d")
}
count: count
amount
}
}
}
`

Result

`
{
"data": {
"ethereum2": {
"deposits": [
{
"date": {
"date": "2020-08-04"
},
"count": 2216,
"amount": 70912
},
{
"date": {
"date": "2020-08-05"
},
"count": 3389,
"amount": 108448
},
{
"date": {
"date": "2020-08-06"
},
"count": 810,
"amount": 25920
},
...
...
...
`

GraphQL APIs are hight flexible; therefore, you can change them based on your needs.

How Bitquery tools will help ETH2.0 ecosystem?

  • Explorer  — Other than showing regular explorer activity, we will enable more in-depth analytics on our explorer to help individuals to understand the ETH2.0 network better.
  • Widgets  — Our widget can be used by others on their platform to add context to data and create more awareness around the ETH2.0 ecosystem.
  • GraphQL APIs  — Our APIs will enable developer, makers, and enthusiast to analyze the ETH2.0 network and build tools enable broader participation in the ETH2.0 ecosystem.

Going forward, we will expand our ETH2.0 network coverage and enable more in-depth data APIs.

We already support GraphQL APIs for Ethereum 1.0 mainnet and Goerli testnet. Check out our blog to see more examples of how to get Etheruem blockchain data.

About Bitquery

Bitquery is a set of software tools that parse, index, access, search, and use information across blockchain networks in a unified way. Our products are:

  • Coinpath® APIs provide blockchain money flow analysis for more than 24 blockchains. With Coinpath’s APIs, you can monitor blockchain transactions, investigate crypto crimes such as bitcoin money laundering, and create crypto forensics tools. Read this to get started with Coinpath®.

  • Digital Assets API provides index information related to all major cryptocurrencies, coins, and tokens.

  • DEX API provides real-time deposits and transactions, trades, and other related data on different DEX protocols like Uniswap, Kyber Network, Airswap, Matching Network, etc.

If you have any questions about our products, ask them on our Telegram channel or email us at hello@bitquery.io. Also, subscribe to our newsletter below, we will keep you updated with the latest in the cryptocurrency world.

The post ETH2.0 Analytical Explorer, Widgets, and GraphQL APIs appeared first on Bitquery.

Discussion

pic
Editor guide