SDK FAQ
Common questions and answers about developing with Squid SDK.Real-World Applications
What are some real-world applications for which Squid SDK was a good fit?
Squid SDK is well-suited for a wide range of blockchain indexing applications:- DeFi Dashboards - Track addresses and internal transactions across multiple protocols
- NFT Marketplaces - Index dynamic sets of NFT contracts and trading activity
- Historical Price Feeds - Track Uniswap trades and Chainlink oracle contracts
- Smart Contract Analysis - Mine contract deployments and analyze bytecode
- Real-time Bots - Build bots with <1sec delay triggered by on-chain activity
Technical Questions
How does Squid SDK handle unfinalized blocks?
The SQD Network serves finalized blocks and is typically ~1000 blocks behind the tip. Recent and unfinalized blocks are seamlessly handled by the SDK from a complementary RPC data source configured in your processor.Potential chain reorganizations are automatically handled under the hood,
ensuring data consistency.
What is the latency for the data served by the squid?
Since the ArrowSquid release, Squid SDK can ingest unfinalized blocks directly from an RPC endpoint, making indexing real-time with minimal latency.How do I enable GraphQL subscriptions for local runs?
Add the--subscription flag to the serve command in your commands.json:
commands.json
See
Subscriptions
for detailed configuration options.
How do squids keep track of their sync progress?
Sync progress tracking depends on the data sink used: TypeORM Database: Processors usingTypeormDatabase store their state in a PostgreSQL schema (not a table). By default, the schema is called squid_processor.
The schema name must be overridden in multiprocessor
squids.
status.txt by default. This can be customized using database hooks.
Is there a healthcheck endpoint for the indexer?
Yes! The processor exposes Prometheus metrics at the${process.env.PROMETHEUS_PORT}/metric endpoint.
For squids deployed to SQD Cloud, metrics are publicly exposed. See
Monitoring in the Cloud for details.
Do squids have a debug mode?
Yes. Enable debug mode by setting theSQD_DEBUG environment variable:
.env

