-
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.
merging rfq indexer into monorepo [SLT-164] [SLT-176] (#3136)
* merging rfq indexer into monorepo * nuke .env * fix commands * fix package name * test coverage script * rough pass at docs and some linting and fixes yarn * Upgrades wagmi & rainbowkit * indxer * Adds invisible but used packages * +recent-invalid-fills [SLT-188] * Moves wagmi to root * new endpoints and clean up linting --------- Co-authored-by: Trajan0x <[email protected]> Co-authored-by: abtestingalpha <[email protected]> Co-authored-by: parodime <[email protected]>
- Loading branch information
1 parent
d4d1c5a
commit bf22448
Showing
40 changed files
with
7,509 additions
and
5,276 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
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 | ||
|
||
## 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,3 @@ | ||
module.exports = { | ||
...require('../../../.prettierrc.js'), | ||
} |
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,3 @@ | ||
module.exports = { | ||
extends: '../../../.eslintrc.js', | ||
} |
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,4 @@ | ||
node_modules | ||
.env | ||
|
||
.env.* |
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
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"] |
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,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" | ||
} | ||
} |
Oops, something went wrong.