Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[indexer] fix broken links #861

Merged
merged 1 commit into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { IndexerBetaNotice } from '@components/index';
This guide will walk you through setting up the basic template for a new processor.

## Pre-requisites
You've already set up your environment and have the Indexer SDK `aptos-indexer-sdk` and `aptos-indexer-sdk-server-framework` installed.
You've already set up your environment and have the Indexer SDK `aptos-indexer-sdk` installed.
If you haven't, follow the [Indexer SDK installation guide](./setup.mdx).

## Overview
Expand All @@ -25,9 +25,9 @@ The next section goes through each of these pieces more explicitly and provides
The `IndexerProcessorConfig` defines the base configuration for all processors that you'll be running.
It should include configuration for things that are shared across multiple processors, like the database configuration and [Transaction Stream](../../txn-stream.mdx) configuration.

[`ServerArgs`](https://github.com/aptos-labs/aptos-indexer-processor-sdk/blob/main/aptos-indexer-processors-sdk/sdk-server-framework/src/lib.rs#L26) parses a `config.yaml` file and bootstraps a server with all the common pieces to run a processor.
`ServerArgs` parses a `config.yaml` file and bootstraps a server with all the common pieces to run a processor.

To setup the configuration for your processor and make it work with `ServerArgs`, you'll need to define a `IndexerProcessorConfig` that implements the [`RunnableConfig`](https://github.com/aptos-labs/aptos-indexer-processor-sdk/blob/main/aptos-indexer-processors-sdk/sdk-server-framework/src/lib.rs#L102) trait.
To setup the configuration for your processor and make it work with `ServerArgs`, you'll need to define a `IndexerProcessorConfig` that implements the `RunnableConfig` trait.
It also triggers a run method, which can be invoked in `main.rs`.

For basic cases, you can copy the [`IndexerProcessorConfig` from the `aptos-indexer-processor-example`](https://github.com/aptos-labs/aptos-indexer-processor-example/blob/main/aptos-indexer-processor-example/src/config/indexer_processor_config.rs) repository and modify it to fit your needs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,15 @@ The quickstart guide provides a template processor and includes all of this setu

If you're migrating an existing processor to the Indexer SDK, follow the steps below.

The Indexer SDK provides several Rust crates:
1. [`aptos-indexer-processor-sdk`](https://github.com/aptos-labs/aptos-indexer-processor-sdk/tree/main/aptos-indexer-processors-sdk/sdk) - The core SDK that provides the building blocks for writing a processor.
2. [`aptos-indexer-processor-sdk-server-framework`](https://github.com/aptos-labs/aptos-indexer-processor-sdk/tree/main/aptos-indexer-processors-sdk/sdk-server-framework) - A server framework for creating a server that runs the processor and includes health checks and metrics logging probes.
If you're setting up a server to host your processor, you will need to include this crate.
3. [`aptos-indexer-testing-framework`](https://github.com/aptos-labs/aptos-indexer-processor-sdk/tree/main/aptos-indexer-processors-sdk/testing-framework) - An e2e testing framework for testing processors.
If you want to write tests for your processor, you will need to include this crate.

Depending on your use case, you can import the crates to your `Cargo.toml`.
Add `aptos-indexer-processor-sdk` to your `Cargo.toml`.

```toml
[dependencies]
aptos-indexer-processor-sdk = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "aptos-indexer-processor-sdk-v1.0.0" }
aptos-indexer-processor-sdk-server-framework = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "aptos-indexer-processor-sdk-v1.0.0" }
aptos-indexer-testing-framework = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "aptos-indexer-processor-sdk-v1.0.0" }
```

`aptos-indexer-processor-sdk` includes the following features:
1. `postgres_full` - Interface layer to integrate Postgres with your processor.
2. `testing_framework` - An e2e testing framework for testing processors. If you want to write tests for your processor, add this feature to the crate.

{/* <!-- Add list of SDK releases once we have that --> */}