-
Notifications
You must be signed in to change notification settings - Fork 32
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
merging rfq indexer into monorepo [SLT-164] [SLT-176] #3136
Changes from all commits
456f9ba
700ba91
a60ff85
5951570
9f901d7
6845d9e
2535629
0e59ced
9a94e6d
4e437af
186534b
5878fa5
982c619
e8e6745
635d8e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
...require('../../../.prettierrc.js'), | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: '../../../.eslintrc.js', | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
.env | ||
|
||
.env.* |
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 | ||||||||||
``` | ||||||||||
Comment on lines
+14
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specify the language for fenced code blocks. Markdownlint recommends specifying a language identifier for fenced code blocks to improve syntax highlighting and readability. Apply the following changes to specify the language for the code blocks: 14,21,28
- ```
+ ```bash
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 | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a blank line after the header to fix formatting. There's a formatting issue due to a missing blank line after the header "## Important Scripts". Markdown requires a blank line after headers to render them properly. Apply the following change: 35
## Important Scripts
+
37
- `yarn dev:local`: Runs the API in development mode using local environment variables Committable suggestion
Suggested change
ToolsLanguageTool
|
||||||||||
- `yarn dev:prod`: Runs the API in development mode using production environment variables | ||||||||||
- `yarn start`: Starts the API in production mode | ||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
providers = ["node"] | ||
|
||
[phases.install] | ||
cmds = ["npm install -g corepack", "corepack enable", "corepack prepare [email protected] --activate", "pnpm install"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"name": "@synapsecns/rfq-indexer-api", | ||
"private": true, | ||
"version": "1.0.1", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"check-env": "dotenv -e .env.local -- printenv | grep DATABASE_URL", | ||
"dev:local": "dotenv -e .env.local -- tsx watch src/index.ts", | ||
"dev:prod": "dotenv -e .env.production -- tsx watch src/index.ts", | ||
"start": "tsx src/index.ts", | ||
"start:local": "dotenv -e .env -- tsx src/index.ts", | ||
"dev": "dotenv -e .env -- tsx watch src/index.ts", | ||
"lint:check": " ", | ||
"ci:lint": " ", | ||
"build:go": " ", | ||
"build": " ", | ||
"build:slither": " ", | ||
"test:coverage": "echo 'No tests defined.'" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"@graphql-tools/load-files": "^7.0.0", | ||
"@graphql-tools/merge": "^9.0.7", | ||
"@graphql-tools/schema": "^10.0.6", | ||
"@types/express": "^4.17.21", | ||
"@types/node": "^22.5.4", | ||
"dotenv-cli": "^7.4.2", | ||
"express": "^4.21.0", | ||
"graphql": "^16.9.0", | ||
"graphql-yoga": "^5.7.0", | ||
"kysely": "^0.27.4", | ||
"pg": "^8.12.0", | ||
"ts-node": "^10.9.2", | ||
"tsx": "^4.19.1", | ||
"typescript": "^5.6.2", | ||
"viem": "^2.21.6" | ||
}, | ||
"engines": { | ||
"node": ">=18.17" | ||
}, | ||
"devDependencies": { | ||
"@types/pg": "^8.11.9", | ||
"dotenv": "^16.4.5" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/synapsecns/sanguine", | ||
"directory": "packages/rfq-indexer/api" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move 'wagmi' to 'dependencies'
The package
wagmi
has been added todevDependencies
. Ifwagmi
is required at runtime in production code, it should be listed underdependencies
to ensure it's included when the application is built.Apply this diff to move
wagmi
todependencies
: