-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rough pass at docs and some linting and fixes yarn
- Loading branch information
1 parent
9f901d7
commit 6845d9e
Showing
8 changed files
with
122 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# RFQ Indexer | ||
|
||
## Overview | ||
|
||
The RFQ (Request for Quote) Indexer is a system designed to index and track bridge events across multiple blockchain networks. It consists of two main parts: the indexer and the API. | ||
|
||
1. What does the rfq-indexer do? | ||
The rfq-indexer captures and stores bridge events from various blockchain networks, including Ethereum, Optimism, Arbitrum, Base, Blast, Scroll, Linea, and BNB Chain. It indexes events such as bridge requests, relays, proofs, refunds, and claims. | ||
|
||
2. Parts of the indexer and their users: | ||
- Indexer: Used by developers and system administrators to collect and store blockchain data. | ||
- API: Used by front-end applications, other services, or developers to query the indexed data. | ||
|
||
## Directory Structure | ||
rfq-indexer/ | ||
├── api/ # API service | ||
│ ├── src/ # API source code | ||
│ ├── package.json # API dependencies and scripts | ||
│ └── README.md # API documentation | ||
├── indexer/ # Indexer service | ||
│ ├── src/ # Indexer source code | ||
│ ├── abis/ # Contract ABIs | ||
│ ├── package.json # Indexer dependencies and scripts | ||
│ └── README.md # Indexer documentation | ||
└── README.md # This file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# RFQ Indexer API | ||
|
||
This API provides access to the indexed bridge event data. | ||
|
||
## API Calls | ||
|
||
1. GET /api/hello | ||
- Description: A simple hello world endpoint | ||
- Example: `curl http://localhost:3001/api/hello` | ||
|
||
2. GET /api/pending-transactions-missing-relay | ||
- Description: Retrieves pending transactions that are missing relay events | ||
- Example: | ||
``` | ||
curl http://localhost:3001/api/pending-transactions-missing-relay | ||
``` | ||
3. GET /api/pending-transactions-missing-proof | ||
- Description: Retrieves pending transactions that are missing proof events | ||
- Example: | ||
``` | ||
curl http://localhost:3001/api/pending-transactions-missing-proof | ||
``` | ||
4. GET /api/pending-transactions-missing-claim | ||
- Description: Retrieves pending transactions that are missing claim events | ||
- Example: | ||
``` | ||
curl http://localhost:3001/api/pending-transactions-missing-claim | ||
``` | ||
5. GraphQL endpoint: /graphql | ||
- Description: Provides a GraphQL interface for querying indexed data, the user is surfaced an interface to query the data via GraphiQL | ||
## Important Scripts | ||
- `yarn dev:local`: Runs the API in development mode using local environment variables | ||
- `yarn dev:prod`: Runs the API in development mode using production environment variables | ||
- `yarn start`: Starts the API in production mode | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# RFQ Indexer | ||
|
||
This indexer captures and stores FastBridgeV2 events from various blockchain networks. | ||
|
||
## Important Scripts | ||
|
||
- `yarn dev:local`: Runs the indexer in development mode, clearing previous data | ||
- `yarn dev`: Runs the indexer in development mode | ||
- `yarn start`: Starts the indexer in production mode | ||
|
||
To run these scripts, use `yarn <script-name>` in the terminal from the indexer directory. | ||
|
||
## Main Files for Contributors | ||
|
||
1. ponder.schema.ts | ||
- Description: Defines the database schema for indexed events | ||
2. ponder.config.ts | ||
- Description: Configures the indexer, including network details and contract addresses | ||
3. src/index.ts | ||
- Description: Contains the main indexing logic for different event types | ||
|
||
4. abis/FastBridgeV2.ts | ||
- Description: Contains the ABI (Application Binary Interface) for the FastBridgeV2 contract | ||
|
||
When contributing, focus on these files for making changes to the indexing logic, adding new event types, or modifying the database schema. |