Overview
Goldsky is a high-performance data indexing provider for Movement that makes it easy to extract, transform, and load on-chain data to power both application and analytics use cases. Goldsky primarily offers indexing and accessing blockchain data on Movement via Mirror (real-time data replication pipelines).Getting started
To use Goldsky, you’ll need to create an account, install the CLI, and log in.Install Goldsky's CLI and log in
Install Goldsky's CLI and log in
-
Install the Goldsky CLI:
For macOS/Linux:
For Windows:Windows users need to have Node.js and npm installed first. Download from nodejs.org if not already installed.
- Go to your Project Settings page and create an API key.
-
Back in your Goldsky CLI, log into your Project by running the command
goldsky loginand paste your API key. -
Now that you are logged in, run
goldskyto get started:
Mirror
Mirror pipelines allow users to replicate data into their own infrastructure (any of the supported sinks) in real time. The supported data sources can be found here. For a complete overview of how to deploy Mirror pipelines, including a video walkthrough, check out Create a Pipeline. Below, we will look at a few of the different ways by which you can deploy Mirror pipelines; Here, we’ll be streaming themovement.raw_events direct indexing dataset into a ClickHouse database.
Remember to first create a Secret in order for Mirror to be able to write the data into the database of your choice.
- Using Goldsky Flow in the dashboard:
- Drop a
Data Sourcecard. SelectMovementas the chain. ThenMovement Raw Eventsas the onchain dataset to use. - Add a
Sinkcard and select your pre-configured sink. - Deploy pipeline.
- Drop a
- Using the interactive CLI:
- Enter command
goldsky pipeline create <pipeline-name>. - This will kick off a guided flow with the first step to choose the dataset type. Choose
Direct Indexing. - Next, select
Movementas the chain with the enter key, thenMovement Raw Eventsas the dataset by pressing space on the selected dataset which you can select using the up and down arrow keys. We will process historical data so selectProcess all historical databy pressing the enter key. This is the same as the yaml config setting ofstart_at: earliest. If you prefer to only ingest data starting when your pipeline is deployed, selectProcess data from the time this pipeline is createdinstead, this is equivalent to the yaml config settingstart_at: latest. - When asked to choose another source, choose
Noby pressing enter. - Add your pre-configured sink. In this example case, we chose ClickHouse and as a next step we selected the database schema.
- Pipeline will be deployed automatically.
- Enter command
- Using a pipeline configuration file:
- This makes it easier to set up complex pipelines involving multiple sources, multiple sinks, and more complex, SQL-based transformations. For the full reference documentation on, click here.
- As in the previous steps, we’ll be deploying a pipeline to stream Movement Raw Events. Unlike the other methods, we have added a transformation to only select specific data attributes from the whole dataset. This is the configuration file:
movement-raw-events.yaml
- Add your corresponding secret name and run
goldsky pipeline apply sui-transactions.yaml --status ACTIVEto deploy the pipeline.