Dappetizer: Release 1.1.0
Last month, we presented a preview of Dappetizer, our very own framework for indexing smart contracts on Tezos powered by TypeScript/JavaScript and Taquito. We have been hard at work, adding features (including Ithaca support!) and squashing bugs. This week, we are back with our first stable version: Dappetizer 1.1.0.
The new release does come with several breaking changes compared to 0.9.x, but moving forward, breaking changes will happen much less often and only when a new major version is released.
If you’ve read our previous article, feel free to skip the following two sections as they are identical.
About Dappetizer
Dappetizer is a framework focused on simplicity and streamlining of common use cases encountered when building a contract indexer.
- The whole indexing lifecycle is taken care of automatically. The framework keeps track of which blocks were already indexed and when new blocks become available. It also detects and handles block reorganizations.
- Dappetizer comes with its own scaffolding tool, which makes prototyping or starting a new project easy.
- Persistence support is built-in. We currently support PostgreSQL and SQLite, with more databases likely coming.
- We had containerization in mind when designing Dappetizer — indexers are easy to run in Docker.
- The runtime only depends on Tezos Node RPC and optionally an IPFS gateway (for contract metadata).
Getting started with Dappetizer
The first step is installing the latest version (1.1.0 at the time of writing) with NPM:
npm install @tezos-dappetizer/cli
You can scaffold a new project by giving Dappetizer a contract address to index. As an example, we will use a Quipuswap exchange contract (XTZ — kUSD):
npx dappetizer init KT1K4EwTpbvYN9agJdjpyJm4ZZdhpUNKB3F6
This will generate the whole project structure (including package.json
) with required dependencies as needed. You can see that Dappetizer already scaffolded an indexer in src/quipu-token-indexer.ts
:
export class QuipuTokenIndexer {
@indexEntrypoint('approve')
async indexApprove(
parameter: QuipuTokenApproveParameter,
dbContext: DbContext,
indexingContext: TransactionIndexingContext,
): Promise<void> {
// Implement your indexing logic here or delete the method if not needed.
}
...
The indexing methods let you react to everything related to the contract: entrypoint calls, storage changes, bigmap updates, and so on. You can store whatever information you need in a database — Dappetizer already comes with the support of PostgreSQL and TypeORM, but you can use your own persistence layer if needed. Finally, indexing is started simply by running npx dappetizer start
.
For full details on how to set up a new indexer, please follow our quickstart guide.
What’s coming next
- Dappetizer 1.1.0 already includes preliminary support for the upcoming Ithaca protocol. Full support will be added soon, alongside our planned upgrade to Taquito 12.
- We are currently working on integrating Hasura, which allows creating APIs for your indexed data without writing code. Although we already recommend using Hasura with Dappetizer now, full integration will mean Dappetizer automatically configures Hasura on startup according to the data model.
- The focus of the following weeks will be on improving our documentation and fixing bugs. Please let us know if you find any!
As always, all feedback is welcome! If you want to let us know your suggestions, ask a question, or want to say “hi,” come join us on our Discord server!