Subquery partnership with Parascan
Parascan Creates Open Source Block Explorer with the Power of Subquery
Subquery partnership with Parascan, an open source and off-the-shelf block explorer for your next substrate chain. Parascan another excellent team building key infrastructure pieces for the community to get a head start on their development journey.
With the increasing number of emerging parachains (or even just Substrate chains) we are seeing, each new team looks for a few core pieces of infrastructure to have the recipe for success. This includes RPC endpoints (e.g OnFinality), indexers (e.g. SubQuery), and the one we are highlighting today, block explorers.
Parascan has built the components for any substrate network to easily build their own explorer, which then allows them to view block details such as events, extrinsics and transfers. This solution provides a much better user experience to a barebones polkadot.js solution, and a faster and more open implementation than other closed source alternatives.
With SubQuery as the data backbone, Parascan has made it incredibly easy for new teams to build their own explorer and view essential data in a user-friendly way. There are two components required to do so. The data component which power by SubQuery and the UI component which is powered by React. The two components require only very minimal changes, as outlined in a video tutorial, and you can bring your explorer to life. And as an additional bonus, it’s fully compatible with Parity’s Frontier EVM (used by Moonbeam and Astar), meaning you can display Substrate and Ethereum data in the same UI.
Tutorial Step-by-Step
- Fork the Parascan Subql starter Github repository: https://github.com/parascan-xyz/parascan-subql-starter
- Add the new network details in the project.yaml file. Add the new network’s endpoint, the genesis hash (the hash of block zero), and import the custom types of your network.
- Publish your project via SubQuery’s Managed Service by connecting your newly created Github repository using IPFS — documentation here
- Deploy the project to a staging slot to begin with — this is recommended for testing/indexing. Once indexed, you can seamlessly move the project to production so there is zero downtime for your app.
- For the UI component you can again fork Parascan’s UI Github Repository: https://github.com/parascan-xyz/parascan-subql-starter-ui
- Here you only need to change one item. Navigate to src > utils > index.tsx.
Update the endpoint to your query endpoint from your recently deployed SubQuery project. - Once fully indexed, the React UI will view all blocks, extrinsics, and events. You can further improve the UI by adding filters which SubQuery easily enables via aggregate functions.
To watch the full tutorial on how to build a blockchain explorer you can go here: https://www.youtube.com/watch?v=t8qsF3jQW5M
For get started by forking Parascan’s Github repositories you can go here: https://github.com/parascan-xyz
About Parascan
Parascan builds useful tools to elevate the data and analytics in the DotSama ecosystem.
Website |
About SubQuery
SubQuery the Universal data indexing toolkit facilitating the construction of Web3 applications of the future. A SubQuery project a complete API to organise and query data from Layer-1 chains. Currently servicing Polkadot, Substrate, Avalanche, Terra, and Cosmos (starting with Juno) projects, this data-as-a-service allows developers to focus on their core use case and front-end without wasting time building a custom backend for data processing activities. In the future, the SubQuery Network intends to replicate this scalable and reliable solution in a completely decentralised manner.