- Introduce developers from the Stellar and Soroban ecosystems to the capabilities of indexer services.
- Assist indexers in refining their offerings by reporting bugs and providing documentation feedback we’ve uncovered through our usage.
The Importance of Indexers in Blockchain Ecosystems
Utilizing indexers is crucial for efficient data retrieval, thereby enabling developers to offer a seamless user experience. Although blockchains inherently ensure transactional integrity, extracting an entire history directly from a node is computationally intensive. Therefore, indexers serve as invaluable tools. This article serves two main goals:- Demonstrate practical uses of the indexer as an example or initial repository.
- Test various indexer solutions, offering constructive feedback on bugs and documentation.
Mercury: Subscription-Based Indexing Solutions
Mercury offers a subscription-based indexing service equipped with numerous features such as alert systems and code execution environments. As a fully managed service, Mercury obviates the need for developers to manage any GraphQL service themselves. In our repository, you’ll find a Node.js client pre-configured with queries to inspect a specific contract, specified through the repository’s environment variables.Getting Started with Mercury
Prerequisites: Docker installation on your machine-
Clone the repository:
https://github.com/paltalabs/mercury-client.git -
Duplicate
.env.exampleas.env - Request Mercury access here
-
Populate the
MERCURY_ACCESS_TOKENin.env. For usage exceeding 7 days, also completeMERCURY_TESTER_EMAILandMERCURY_TESTER_PASSWORD. -
Update
CONTRACT_ADDRESSif you are interested in a contract other than the Soroswap’s Factory contract. -
Run the container:
bash run.sh -
Install dependencies:
yarn -
Use predefined scripts to interact with the contract:
SubQuery: Versatile Indexing for Multiple Platforms
SubQuery is a comprehensive indexer that interfaces seamlessly with multiple blockchain platforms, including Stellar and Soroban. We’ve developed a customized SubQuery project capable of IPFS deployment and management through SubQuery’s Managed Service. However, storing blockchain history requires access to an archive node, which adds an operational dependency: you either run one yourself or rely on a provider that does. This is the main trade-off to weigh against a fully managed indexing service.Getting Started with SubQuery
Requirements: Docker Our setup incorporates Docker inside a Node.js image to manage the required Node.js version and to prevent the need for a globalsubql package installation. If you prefer to install node, docker and subql locally you can start from step 4.
-
Run the container:
bash run.sh -
Install Docker and SubQuery:
-
Navigate to
subql-starterdirectory and execute: -
In another terminal
and (if you prefer to install node, docker and subql locally you can start from here)
-
Begin querying by navigating to
http://localhost:3000/graphql -
To publish your project to IPFS, run: