Subsquid Indexing Comes to BNB Chain
Recently, we announced the launch of squid SDK and the Aquarium hosted service on several major EVM chains, including Ethereum, Polygon, and Avalanche. Today, we are excited to reveal our support for BNB Chain as well. To get started you can follow this tutorial.
Why build with Subsquid?
> TypeScript-based SDK for building fully-customizable GraphQL APIs and ETLs
> Support for 70+ EVM, Substrate, and EVM chains
> Indexing at up to 50,000 blocks per second
> Free hosted service while in beta
> Dedicated support team
> Open-source project
Feel free to contact our team directly with any questions that you might have.
Quickstart Guide for EVM Chains
This demo squid outputs transactions to the “black hole” address
0x0000000000000000000000000000000000000000.
It is intended to be a starter project for building a custom squid
that indexes the EVM logs and transaction data of EVM chains.
Before getting started, come up with an original name for your squid,
then generate your demo with the following commands:
> sqd init my-awesome-squid — template evm
> cd my-awesome-squid
> npm ci
> npm run build
> make up
> make process
Don’t forget to install squid CLI!
Homebrew:
> brew tap subsquid/cli
> brew install sqd
NPM:
> npm i -g @subsquid/cli@latest
Check the version:
> sqd — version
There are many squid templates available. Explore them all by entering:
> sqd init — help
Full quickstart guide available here.
Custom GraphQL APIs and ETLs for Next-Gen dApps
Web3 has entered a period of transition, and a new generation of more sophisticated dApps is being developed. NFTs are pivoting from simple cartoon pictures to tools that power complex use cases such as identity, social media, games, and supply chains. DeFi is becoming more advanced, now increasingly enhanced by AI-powered models and ML-trained automations. Users and developers now expect better experiences when using these applications. With a unique approach to indexing and ETL, Subsquid is building for this new paradigm
Subsquid and its open-source software development kit (SDK) have a modular architecture, which separates blockchain data ingestion from transformation and presentation. This frees developers up to apply their own custom logic to their “squids” (node.js indexing projects).
In other words, the heavy lifting of data extraction is taken care of by squid Archives — data lakes that store pre-indexed data in a normalized format, and which are maintained by Subsquid (and — soon — by a decentralized network). With the addition of batch ingestion, squids are enabled to index data at rates as high as 50,000 blocks per second — performance significantly beyond that of Subgraphs. Importantly, squids typically require no additional endpoints and have no external dependencies at setup.
Other squid features include:
- Full control over the target database (Postgres), including custom migrations and ad-hoc queries in the handler.
- Custom target databases and data formats (e.g. CSV, BigQuery).
- Arbitrary code execution in the data handler.
- Extension of the GraphQL API with arbitrary SQL.
- Secret environment variables, allowing for seamless use of private third-party JSON-RPC endpoints and integration with external APIs.
- API versioning and aliasing.
- API caching
To learn more about Subsquid’s architecture, visit the documentation.
Got a Subgraph to migrate from? We’ve got a guide for that.
Entering the BNB Chain Ecosystem
Launched in 2020 by the world’s largest cryptocurrency exchange, Binance, BNB Chain was created to facilitate the development and operation of high-performance, scalable, dApps. With high transaction speeds and low costs, BNB Chain offers a great environment for building the truly sophisticated, and highly data-heavy applications that necessitate the tools provided by Subsquid. We are absolutely thrilled to be getting started in this ecosystem.
Over the last couple of months, we have coordinated with several members of the BNB Chain team, and would like to express our immense gratitude for their support. We are looking forward to collaborating on multiple fronts, including developer relations, marketing, and data analytics, in 2023 and beyond.
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.