Subsquid Indexing Comes to SKALE

SQD (previously Subsquid)
SQD Blog
Published in
5 min readApr 11, 2023

Just recently, it was announced that Subsquid’s full-stack indexing toolkit had come to SKALE. Now, it has become possible for developers working in this ecosystem of interconnected blockchains to build and deploy custom indexers using Squid SDK and the Aquarium hosted service. Today, we’d like to provide a bit more context, and share some resources for builders who are just getting started with Subsquid on SKALE.

Why build with Subsquid on SKALE?
> Web3’s fastest indexer: Up to and beyond 50,000 blocks per second
> Familiar TypeScript-based configuration
> GraphQL API ‘out-of-the-box’
> Custom data targets (ie. Google BigQuery, external databases, CSV files)
> Free hosted service (while in beta)
> 100% open-source

Joining the SKALE Ecosystem

Envisaged as the ultimate scalability solution for Ethereum, SKALE is an expandable multichain blockchain that brings together an ever-growing ecosystem of dApp specific chains. SKALE app chains are built on top of the Ethereum mainnet, inheriting that blockchain’s security value while eliminating gas fees for end users. Indeed, by creating their own app chains, developers on SKALE can rapidly deploy highly user-friendly dApps or games that require zero gas payments, all while being fully interoperable with the wider Ethereum ecosystem.

From the very start, SKALE’s approach to Ethereum scalability has simply ‘made sense’ to us here at Subsquid. Having originally come out of the Polkadot ecosystem, and given that we ourselves are building our own network, we are strong believers in the ‘app chain’ thesis. Moreover, the modular way we do indexing, we have found, is highly advantageous for this kind of multichain ecosystem: Instead of having to index the whole chain themselves, dApp builders on SKALE chains can simply use squid SDK to access ‘pre-indexed’ data held in one of our Archives according to their specific needs. Just like how SKALE reduces gas fees and increases security through the shared infrastructure of the ETH mainnet and various ‘hubs,’ Subsquid enables developers to reduce indexing time, cost, and maintenance hassle through these shared Archives.

Starting with NFTs and Gaming

The SKALE ecosystem is a great place to build applications for virtually all popular Web3 verticals, including DeFi, DeSoc, DAOs, NFTs, and games. Based on the advice of SKALE’s core team, we have decided to kick off our support for the ecosystem by focusing on serving NFT and game builders. To this end, we have indexed and launched Archives for Calypso and Nebula, the SKALE NFT and Gaming hubs, as well as their respective testnets. Now, developers can use Squid SDK to build custom indexers that rapidly retrieve data from either of these chains.

We are particularly inspired by the excitement that game developers have for the ecosystem. Not only do SKALE’s gasless transactions provide a major UX upgrade for players, but features like heightened throughput, instant finality, and on-chain file storage increase the number of possibilities for what can be built. Truly immersive experiences are coming to Nebula, and they will be powered by Subsquid!

How to get started with Subsquid on SKALE

The best place to get familiar with Subsquid is the official documentation. After familiarizing oneself with the toolkit’s basic architecture, it is recommended to try the quickstart guide, where the developer is shown how to auto-generate a basic GraphQL API from a SKALE EVM smart contract ABI. Instructions for further configurations of the squid processor can be found in the EVM indexing section of the docs.

You will be able to find the correct configuration for your preferred SKALE chain in the archive-registry. It will appear automatically in the dropdown menu of your IDE when you type ‘skale.’

const processor = new EvmBatchProcessor()
.setDataSource({
archive: lookupArchive(‘skale-nebula’),
})

Free hosted service

A major frustration for Web3 developers has historically been the maintenance of the infrastructure that hosts their indexers. The Aquarium, Subsquid’s managed service, exists to alleviate this concern, and deployment is as easy as a single command in the CLI.

We are proud to announce that the Aquarium now offers full support for SKALE ecosystem chains. Currently, this service is free of charge. Worth noting is that the launch of Subsquid’s decentralized network will not affect the continued operation of this service. Leave your squid in the Aquarium for as long as you need it to be there!

Migrate to Subsquid

For developers who currently use or are more familiar with the Graph, we have prepared a step-by-step tutorial for migrating from Subgraphs to Squid SDK. While Subsquid’s programming model differs from that of the Graph (it maximizes for performance through batch indexing of EVM logs and transaction data) migration does not usually take long, and for ‘heavy’ projects is frequently a necessity. Additionally, many concepts such as code generation from the schema file are the same for both Subsquid and the Graph, and in most cases the schema file can be imported to a squid as is.

Why migrate to Subsquid from the Graph?

> 50–100x faster indexing.
> Support for ‘heavy’ factory contracts.
> Full control over the target database, including custom migrations and ad-hoc queries in the handler.
> Extension of the GraphQL API with arbitrary SQL
> Custom data targets and formats (ie. BigQuery, CSV)
> Ability to integrate with external APIs and 3rd part RPC endpoints
> API versioning and aliasing.
> API caching
> GraphQL subscriptions

In the near future, we will be working together with the SKALE core team to release documentation that outlines key Subsquid features for the ecosystem. In the meantime, the following links remain the best resources for learning Squid SDK.

About Subsquid

Subsquid is the team behind squids, a new standard for Web3 data extraction and transformation. Squids already power hundreds of applications across dozens of EVM, Substrate, and WASM-based chains. With modular architecture and a host of advanced features, Subsquid offers the most resource-efficient and developer-friendly way to build, test, and deploy customized GraphQL APIs and ETLs for blockchain-facing applications.

Twitter | Discord | LinkedIn | Telegram | GitHub

--

--

SQD (previously Subsquid)
SQD Blog

The Web3 Data Layer Powering devs with access to data on over 150+ chains, including EVM, SVM, Substrate and more. https://sqd.dev/