DFMM Indexer is current setup to run on the most recent DFMM deployment on OP Sepolia Testnet.
- Run
bun i
to install dependancies. - Create a
.env
file and add an HTTP OP Sepolia Testnet RPC URL underPONDER_RPC_URL_11155420
- Run
bun dev
to start development server.
Follow the Ponder deployment instructions to easily spin up an indexer enpoint using Railway.
Internally, Primitive uses Tanstack Query to write queries for dfmm-indexer. Please visit Tanstack Query v4 documentation.
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