https://github.com/primitivefinance/dfmm-indexer
Indexer for the DFMM protocol
https://github.com/primitivefinance/dfmm-indexer
Last synced: 11 months ago
JSON representation
Indexer for the DFMM protocol
- Host: GitHub
- URL: https://github.com/primitivefinance/dfmm-indexer
- Owner: primitivefinance
- Created: 2024-03-19T23:13:20.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-26T19:44:08.000Z (about 2 years ago)
- Last Synced: 2025-04-05T14:01:56.749Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 127 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Setup & Installation
DFMM Indexer is current setup to run on the most recent DFMM deployment on OP Sepolia Testnet.
1. Run `bun i` to install dependancies.
2. Create a `.env` file and add an HTTP OP Sepolia Testnet RPC URL under `PONDER_RPC_URL_11155420`
3. Run `bun dev` to start development server.
# Production Deployment
Follow the Ponder deployment instructions to easily spin up an indexer enpoint using Railway.
# Usage
## Web Applications
Internally, Primitive uses Tanstack Query to write queries for dfmm-indexer. Please visit [Tanstack Query v4 documentation](https://tanstack.com/query/v4).
## Static Websites
Static webpages must consume gql using `fetch`. Write an async function that creates the necessary headers, place the gql query within the requestBody, and write a simple loading state.
Remember, dfmm-indexer is not authenticated so we can strip out a lot of common boilerplate. This example demonstates the most simple method of implementing `fetch` in Next.js:
https://github.com/aagam29/graphql-clients/blob/main/pages/fetch.jsx