How to synchronize onchain data to Supabase

This guide will show you how to synchronize onchain data to your Supabase instance.

Create a table in Supabase

The first step is to create a table in Supabase. In this case, we are using the SQL Editor but you can use any tool you like.

Create table in Supabase

Grab the Supabase connection string

In your project's settings, navigate to the "Database configuration" section and copy the connection string.

Note: you need change the connection string to include the password you set when creating the database.

Get connection string

Connect the indexer

Set the POSTGRES_CONNECTION_STRING environment variable to the value copied from Supabase.


Run the indexer and after a few seconds you will see onchain data appear in your database.

Last modified
Edit on GitHub

Apibara is the fastest platform to build production-grade indexers that connect onchain data to web2 services.

© 2024 GNC Labs Limited. All rights reserved.