Uniswap V4 LP Manager - Complete 1-Shot Template

A production-ready guide for building a Uniswap V4 liquidity management frontend. Add this to your LLM context and ask it to "build me a Uniswap V4 LP manager" - it should work.

Table of Contents

  1. Official Contract Addresses
  2. Subgraph Queries
  3. Setup & Dependencies
  4. Core Types
  5. Chain & Client Configuration
  6. Position Discovery
  7. Reading Position Data
  8. Token Approvals (Permit2)
  9. Minting New Positions
  10. Increasing Liquidity
  11. Decreasing Liquidity
  12. Collecting Fees
  13. Complete React Frontend
  14. API Routes (Next.js)
  15. Common Gotchas

Official Contract Addresses