Sirato (Epirus) Substrate Explorer - Phase III
- Project Name: Sirato (Epirus) Substrate Explorer - Phase III
- Team Name: Web3 Labs Ltd
- Payment Address: 0xc905c448db9942c662fcb1680f3ecfcd0592409c
- Level: 2
We recently rebranded from Epirus to Sirato
This is an application for a follow-up grant for the Epirus Substrate Explorer that has completed two grants previously:
[Milestone 1 Delivery](https://github.com/w3f/Grant-Milestone-Delivery/pull/652)
[Milestone 2 Delivery](https://github.com/w3f/Grant-Milestone-Delivery/pull/742)
From our previous grants we have built:
- A Wasm contracts explorer that supports smart contracts deployed on
- A verifier service that verifies, through reproducible builds, the source code files for a specific on-chain code hash.
In this grant, we intend to expand Sirato to support essential base data such as blocks, extrinsics and system events.
In our current architecture, there are several components:
- Squid Archive (built on the Subsquid framework): the squid archive connects to the Substrate network node and indexes base data such as blocks and extrinsics, exposing a GraphQL API
- Squid Processor (built on Subsquid framework): the squid processor ingests data from the squid archive, filtering and transforming the relevant data to the data models for the Explorer. Currently, our squid processor is focused on Wasm contract data from
pallet-contracts. The squid processor exposes a GraphQL API.
- Explorer UI: The explorer UI is made up of a set of composable components that consumes the API of the Squid processor and renders the web application.
The below diagram illustrates the high-level architecture and how the components interact with each other:
In this grant, we will add data handlers and data models for the base data. Since the Squid Archive directly exposes the network base data of blocks and extrinsics, we will use the GraphQL API of the squid archive in the UI to retrieve this data.
Network Data Support
The Squid Archive already exposes blocks, extrinsics and events data through its GraphQL API. We will consume this API from the explorer UI and build the components to show:
- Blocks list
- Extrinsics list
- Block page: contains block details and all extrinsics and events included in this block
- Extrinsics page: contains extrinsic details and all events emitted from the extrinsic
Mock up of how an extrinsic page will look:
We plan to build on top of our current explorer, so we will continue using the same technology stack:
- Subsquid Framework, with Typescript, for data processing.
- React.js and Tailwindcss for the UI
Out of Scope
Due to time and resource constraints, we will leave the following items for future development:
- Additional query endpoints for interrogating the contract registry
- The ability to interact directly with verified smart contracts
There is currently a lack of high-quality open-source explorers for smart contract networks in the Substrate ecosystem. Polkadot.js is the de facto explorer and it is very modular and flexible. However, it was designed more for development and lacks the ability to filter, sort and search through data on the network. In the space of user-facing explorers, Subscan is currently the most popular solution and has the most comprehensive support for Substrate pallets. On the other hand, Subscan is mostly close-sourced and introduces an economic entry barrier for new networks.
This dominance by Subscan is something that has been highlighted recently during an in-depth discussion on the Polkadot Forum.
While a number of open-source alternatives have emerged, none of them have support for smart contracts. In our previous grants, we have expanded the open-source explorer offerings to include WASM contracts on Substrate. At the same time, we also want to provide the essential base data like blocks and extrinsics so that smart contract networks can have a feature-complete explorer at their fingertips.
Development Roadmap 🔩
- Total Estimated Duration: 1 month
- Full-Time Equivalent (FTE): 2 FTE
- Total Costs: 25,000 EUR
|0b.||Documentation||We will provide inline documentation of the code and documentation on how to set up an explorer instance.|
|0c.||Testing Guide||Core functions will be fully covered by unit tests to ensure functionality and robustness. We will describe how to run these tests in the guide.|
|0d.||Docker||We will provide a Dockerfile and Docker Compose file(s) to ease the deployment and execution of the system.|
|1.||Updated Explorer UI - Base data support||The Explorer UI will connect to the Squid archive GraphQL endpoint and display block, extrinsic and system event data.|
|2.||Public explorer instance||A publicly accessible instance of the Explorer connected to a development network with WASM smart contracts support, with additional display of blocks, extrinsics and events.|
- Contact Name: Conor Svensson
- Contact Email: firstname.lastname@example.org
- Registered Address: 7 Bell Yard, London, England, WC2A 2JR
- Registered Legal Entity: Web3 Labs Ltd, CRN 10783824
Team Code Repos
We plan to add open-source support to other popular Substrate pallets in the future. Some interesting pallets we are considering are assets and XCM related pallets, to be able to track asset movements across the DotSama networks.
The Frontier EVM and EVM+ pallet by Acala are also valuable addition to the ecosystem that we wish to support at some point. On top of that, we also plan to add some proprietary modules for the explorer to be able to sustain our growth long-term. Our goal is to provide a full-fledged open-core explorer with comprehensive data and intuitive UI that networks can customise to their needs.
Besides the core explorer, we also want to expand the functionality of our ink! verifier service. Right now, it only supports the verification and metadata hosting of ink! smart contracts.
Our goal is to support any WASM smart contracts and evolve the service to a multi-VM metadata registry that can scale up to cater for the entire Substrate and DotSama ecosystems.