This repository contains:
- Subgraph: An The Graph subgraph for Uniswap V3 on Arbitrum.
- Frontend: A React app to visualize Uniswap V3 LP positions using data from the subgraph.
Uniswap-v3-graphQL/
├── subgraph/ # The Graph subgraph code
├── frontend/ # React frontend app
The subgraph indexes Uniswap V3 pool events (Mint, Burn, Collect) and exposes LP positions, pools, and tokens.
-
Install dependencies:
cd subgraph npm install
-
Codegen & Build:
npm run codegen npm run build
-
Deploy:
npm run deploy
Update the deploy command in
package.json
if you fork or change the subgraph name. -
Querying:
- Use the hosted service endpoint (see
subgraph.yaml
or your deploy output).
- Use the hosted service endpoint (see
A simple React app that fetches and displays LP positions from the subgraph.
-
Install dependencies:
cd frontend npm install
-
Start the app:
npm start
- Open http://localhost:3000 in your browser.
-
Configuration:
- The GraphQL endpoint is set in
src/App.tsx
(endpoint
variable). Change it if you deploy your own subgraph.
- The GraphQL endpoint is set in
- Subgraph: Written in AssemblyScript for The Graph.
- Frontend: Uses React, TypeScript, Tailwind CSS, and
graphql-request
.
MIT