[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-uniswap-v4-sdk-integration":3,"mdc-fnqaz7-key":36,"related-repo-uniswap-v4-sdk-integration":3384,"related-org-uniswap-v4-sdk-integration":3479},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":31,"sourceUrl":34,"mdContent":35},"v4-sdk-integration","build swap and liquidity experiences with Uniswap","App-layer SDK guide for building swap and liquidity experiences directly with the Uniswap v4 SDK. Use when user asks about \"v4 sdk\", \"uniswap v4\", \"v4 swap\", \"v4 liquidity\", \"PoolManager\", \"V4Planner\", \"StateView\", \"PositionManager\", \"pool state\", \"v4 position\", \"uniswap sdk\", or when building swap\u002Fliquidity UX directly with SDKs rather than via the Trading API.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"uniswap","Uniswap","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Funiswap.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Web3","web3","tag",{"name":17,"slug":18,"type":15},"DeFi","defi",{"name":20,"slug":21,"type":15},"SDK","sdk",{"name":23,"slug":24,"type":15},"Ethereum","ethereum",215,"https:\u002F\u002Fgithub.com\u002FUniswap\u002Funiswap-ai","2026-07-17T06:03:59.846598","MIT",35,[],{"repoUrl":26,"stars":25,"forks":29,"topics":32,"description":33},[],"AI tools for building on Uniswap — skills, plugins, and agents for any coding agent.","https:\u002F\u002Fgithub.com\u002FUniswap\u002Funiswap-ai\u002Ftree\u002FHEAD\u002Fpackages\u002Fplugins\u002Funiswap-trading\u002Fskills\u002Fv4-sdk-integration","---\nname: v4-sdk-integration\ndescription: >\n  App-layer SDK guide for building swap and liquidity experiences directly with the Uniswap v4 SDK.\n  Use when user asks about \"v4 sdk\", \"uniswap v4\", \"v4 swap\", \"v4 liquidity\", \"PoolManager\",\n  \"V4Planner\", \"StateView\", \"PositionManager\", \"pool state\", \"v4 position\", \"uniswap sdk\",\n  or when building swap\u002Fliquidity UX directly with SDKs rather than via the Trading API.\nallowed-tools: Read, Write, Edit, Glob, Grep, Bash(npm:*), Bash(npx:*), Bash(yarn:*), Bash(curl:*), WebFetch\nmodel: opus\nlicense: MIT\nmetadata:\n  author: uniswap\n  version: '1.0.0'\n---\n\n# Uniswap v4 SDK Integration\n\n> App-layer SDK for swaps, quotes, and liquidity. For Solidity hook contracts, use the\n> `uniswap-hooks` skill. For Trading API or v3-centric swaps, use the `swap-integration` skill.\n\n## When to Use\n\n- Token swap UI (single-hop or multi-hop)\n- Quote\u002Fprice display before executing a trade\n- Liquidity position management (add\u002Fremove\u002Fcollect)\n- Pool state reads (price, tick, liquidity)\n\n## Packages\n\n```bash\nnpm i @uniswap\u002Fv4-sdk @uniswap\u002Fsdk-core @uniswap\u002Funiversal-router-sdk\n```\n\n---\n\n## v4 vs v3 Decision Table\n\n| Aspect             | v3                         | v4                                            |\n| ------------------ | -------------------------- | --------------------------------------------- |\n| Swap execution     | SwapRouter directly        | Universal Router required (V4Planner)         |\n| Pool architecture  | One contract per pool      | Singleton PoolManager                         |\n| Pool state reads   | Direct pool contract       | StateView contract                            |\n| Native ETH         | Wrap to WETH               | Native support (`Ether.onChain(chainId)`)     |\n| Position NFTs      | NonfungiblePositionManager | PositionManager + multicall                   |\n| Fee collection     | Explicit `collect()`       | Automatic on position modification            |\n| Position discovery | Onchain enumeration        | Offchain event indexing                       |\n| Token approvals    | Direct approve             | Permit2 required                              |\n| Contract addresses | Same across chains         | Different per chain — verify from deployments |\n\n---\n\n## Core Contracts (Per Chain)\n\nLook up addresses at \u003Chttps:\u002F\u002Fdocs.uniswap.org\u002Fcontracts\u002Fv4\u002Fdeployments> — they differ per chain.\n\n| Contract         | Purpose                                                                                 |\n| ---------------- | --------------------------------------------------------------------------------------- |\n| PoolManager      | Singleton pool state                                                                    |\n| Universal Router | Swap execution entry point                                                              |\n| Quoter           | Offchain quote simulation (callStatic)                                                  |\n| StateView        | Pool state reads (getSlot0, getLiquidity)                                               |\n| PositionManager  | LP position lifecycle                                                                   |\n| Permit2          | Token approval layer (same across chains: `0x000000000022D473030F116dDEE9F6B43aC78BA3`) |\n\n---\n\n## Swap Pattern (Universal Router)\n\nAll swaps use: V4Planner -> RoutePlanner -> Universal Router `execute()`.\n\n**Single-hop (exact input):**\n\n```typescript\nimport { Actions, V4Planner } from '@uniswap\u002Fv4-sdk';\nimport { CommandType, RoutePlanner } from '@uniswap\u002Funiversal-router-sdk';\n\nconst v4Planner = new V4Planner();\nv4Planner.addAction(Actions.SWAP_EXACT_IN_SINGLE, [swapConfig]);\nv4Planner.addAction(Actions.SETTLE_ALL, [inputCurrency, amountIn]);\nv4Planner.addAction(Actions.TAKE_ALL, [outputCurrency, amountOutMinimum]);\n\nconst routePlanner = new RoutePlanner();\nroutePlanner.addCommand(CommandType.V4_SWAP, [v4Planner.actions, v4Planner.params]);\n\nconst deadline = Math.floor(Date.now() \u002F 1000) + 3600;\n\u002F\u002F Note: universalRouter.execute() is pseudocode for the viem call pattern.\n\u002F\u002F With viem, use: walletClient.writeContract({ address: UNIVERSAL_ROUTER_ADDRESS, abi: universalRouterAbi, functionName: 'execute', args: [routePlanner.commands, [v4Planner.finalize()], deadline], ...txOptions })\nawait universalRouter.execute(routePlanner.commands, [v4Planner.finalize()], deadline, txOptions);\n```\n\n**Multi-hop (exact input):**\n\n```typescript\nimport { Actions, V4Planner, encodeMultihopExactInPath } from '@uniswap\u002Fv4-sdk';\nimport { CommandType, RoutePlanner } from '@uniswap\u002Funiversal-router-sdk';\n\nconst v4Planner = new V4Planner();\n\u002F\u002F Build multi-hop path: tokenA -> tokenB -> tokenC\nconst path = encodeMultihopExactInPath([poolKeyAB, poolKeyBC], tokenA);\nv4Planner.addAction(Actions.SWAP_EXACT_IN, [{ path, amountIn, amountOutMinimum }]);\n\u002F\u002F SETTLE_ALL uses first pool's input currency; TAKE_ALL uses last pool's output currency\nv4Planner.addAction(Actions.SETTLE_ALL, [tokenA, amountIn]);\nv4Planner.addAction(Actions.TAKE_ALL, [tokenC, amountOutMinimum]);\n\nconst routePlanner = new RoutePlanner();\nroutePlanner.addCommand(CommandType.V4_SWAP, [v4Planner.actions, v4Planner.params]);\n\nconst deadline = Math.floor(Date.now() \u002F 1000) + 3600;\n\u002F\u002F Note: universalRouter.execute() is pseudocode for the viem call pattern.\n\u002F\u002F With viem, use: walletClient.writeContract({ address: UNIVERSAL_ROUTER_ADDRESS, abi: universalRouterAbi, functionName: 'execute', args: [routePlanner.commands, [v4Planner.finalize()], deadline], ...txOptions })\nawait universalRouter.execute(routePlanner.commands, [v4Planner.finalize()], deadline, txOptions);\n```\n\n**SwapConfig** (`SwapExactInSingle`):\n\n```typescript\nconst swapConfig = {\n  poolKey: { currency0, currency1, fee, tickSpacing, hooks },\n  zeroForOne,\n  amountIn,\n  amountOutMinimum,\n  hookData: '0x00',\n};\n```\n\n---\n\n## Quoting Pattern\n\nUse the Quoter contract with `callStatic` — this simulates the swap offchain without executing it\nor spending gas.\n\n```typescript\nconst quote = await quoterContract.callStatic.quoteExactInputSingle({\n  poolKey,\n  zeroForOne,\n  exactAmount: amountIn,\n  hookData: '0x00',\n});\n```\n\nFour available methods:\n\n- `quoteExactInputSingle` — single-hop, exact input amount\n- `quoteExactInput` — multi-hop, exact input amount\n- `quoteExactOutputSingle` — single-hop, exact output amount\n- `quoteExactOutput` — multi-hop, exact output amount\n\n---\n\n## Pool State Reads (StateView)\n\n```typescript\nimport { Pool } from '@uniswap\u002Fv4-sdk';\n\nconst poolId = Pool.getPoolId(currency0, currency1, fee, tickSpacing, hooks);\n\nconst [slot0, liquidity] = await Promise.all([\n  stateViewContract.getSlot0(poolId),\n  stateViewContract.getLiquidity(poolId),\n]);\n\u002F\u002F slot0 → { sqrtPriceX96, tick, protocolFee, lpFee }\n```\n\n---\n\n## ERC20 Approval Flow (Permit2)\n\nERC20 swaps require two approvals — token -> Permit2, then Permit2 -> Universal Router:\n\n```typescript\n\u002F\u002F Step 1: Approve Permit2 on the token contract\nawait erc20Contract.approve(PERMIT2_ADDRESS, MaxUint256);\n\n\u002F\u002F Step 2: Approve Universal Router on Permit2\nawait permit2Contract.approve(tokenAddress, UNIVERSAL_ROUTER_ADDRESS, MAX_UINT160, deadline);\n```\n\nNative ETH swaps bypass both approvals — pass `value` in the transaction options instead.\n\n---\n\n## Position Management (PositionManager)\n\nAll operations use `PositionManager.multicall()`:\n\n| Operation        | SDK Method                                                  |\n| ---------------- | ----------------------------------------------------------- |\n| Add liquidity    | `V4PositionManager.addCallParameters(position, options)`    |\n| Remove liquidity | `V4PositionManager.removeCallParameters(position, options)` |\n| Collect fees     | `V4PositionManager.collectCallParameters(options)`          |\n| Create position  | `V4PositionManager.createCallParameters(position, options)` |\n\n```typescript\nconst { calldata, value } = V4PositionManager.addCallParameters(position, {\n  slippageTolerance: new Percent(50, 10_000),\n  deadline: deadline.toString(),\n  tokenId: tokenId.toString(),\n  useNative: token0.isNative ? Ether.onChain(chainId) : undefined,\n  batchPermit,\n  hookData: '0x',\n});\n\nawait walletClient.writeContract({\n  address: POSITION_MANAGER_ADDRESS,\n  functionName: 'multicall',\n  args: [[calldata]],\n  value: BigInt(value),\n});\n```\n\n---\n\n## Strict Rules\n\n- NEVER call PoolManager directly for swaps — ALWAYS route through Universal Router.\n- NEVER assume contract addresses are the same across chains — look up from the deployments page.\n- NEVER call Quoter onchain (gas expensive) — ALWAYS use `callStatic` for offchain simulation.\n- NEVER skip Permit2 for ERC20 swaps — direct `approve` to Universal Router will not work.\n- ALWAYS set a deadline on swaps and LP operations.\n- ALWAYS handle native ETH with `Ether.onChain(chainId)`, not WETH, in v4 pool contexts.\n- ALWAYS use `Pool.getPoolId()` to compute pool identifiers — do not construct manually.\n\n---\n\n## Links\n\n- SDK overview: \u003Chttps:\u002F\u002Fdocs.uniswap.org\u002Fsdk\u002Fv4\u002Foverview>\n- Swap guides: \u003Chttps:\u002F\u002Fdocs.uniswap.org\u002Fsdk\u002Fv4\u002Fguides\u002Fswaps\u002Fquoting>\n- Liquidity guide: \u003Chttps:\u002F\u002Fdocs.uniswap.org\u002Fsdk\u002Fv4\u002Fguides\u002Fliquidity\u002Fadd-remove-liquidity>\n- Pool data: \u003Chttps:\u002F\u002Fdocs.uniswap.org\u002Fsdk\u002Fv4\u002Fguides\u002Fadvanced\u002Fpool-data>\n- Deployments: \u003Chttps:\u002F\u002Fdocs.uniswap.org\u002Fcontracts\u002Fv4\u002Fdeployments>\n- npm: \u003Chttps:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@uniswap\u002Fv4-sdk>\n\n---\n\n## Related Skills\n\n- `swap-integration` — Trading API and v3-centric swap integration (not direct v4 SDK)\n- `uniswap-hooks` — Solidity hook contract generation (not app-layer SDK)\n",{"data":37,"body":42},{"name":4,"description":6,"allowed-tools":38,"model":39,"license":28,"metadata":40},"Read, Write, Edit, Glob, Grep, Bash(npm:*), Bash(npx:*), Bash(yarn:*), Bash(curl:*), WebFetch","opus",{"author":8,"version":41},"1.0.0",{"type":43,"children":44},"root",[45,54,81,88,113,119,163,167,173,382,385,391,406,513,516,522,535,544,1162,1170,1819,1837,2003,2006,2012,2025,2169,2174,2220,2223,2229,2488,2491,2497,2502,2627,2640,2643,2649,2661,2751,3193,3196,3202,3269,3272,3278,3346,3349,3355,3378],{"type":46,"tag":47,"props":48,"children":50},"element","h1",{"id":49},"uniswap-v4-sdk-integration",[51],{"type":52,"value":53},"text","Uniswap v4 SDK Integration",{"type":46,"tag":55,"props":56,"children":57},"blockquote",{},[58],{"type":46,"tag":59,"props":60,"children":61},"p",{},[62,64,71,73,79],{"type":52,"value":63},"App-layer SDK for swaps, quotes, and liquidity. For Solidity hook contracts, use the\n",{"type":46,"tag":65,"props":66,"children":68},"code",{"className":67},[],[69],{"type":52,"value":70},"uniswap-hooks",{"type":52,"value":72}," skill. For Trading API or v3-centric swaps, use the ",{"type":46,"tag":65,"props":74,"children":76},{"className":75},[],[77],{"type":52,"value":78},"swap-integration",{"type":52,"value":80}," skill.",{"type":46,"tag":82,"props":83,"children":85},"h2",{"id":84},"when-to-use",[86],{"type":52,"value":87},"When to Use",{"type":46,"tag":89,"props":90,"children":91},"ul",{},[92,98,103,108],{"type":46,"tag":93,"props":94,"children":95},"li",{},[96],{"type":52,"value":97},"Token swap UI (single-hop or multi-hop)",{"type":46,"tag":93,"props":99,"children":100},{},[101],{"type":52,"value":102},"Quote\u002Fprice display before executing a trade",{"type":46,"tag":93,"props":104,"children":105},{},[106],{"type":52,"value":107},"Liquidity position management (add\u002Fremove\u002Fcollect)",{"type":46,"tag":93,"props":109,"children":110},{},[111],{"type":52,"value":112},"Pool state reads (price, tick, liquidity)",{"type":46,"tag":82,"props":114,"children":116},{"id":115},"packages",[117],{"type":52,"value":118},"Packages",{"type":46,"tag":120,"props":121,"children":126},"pre",{"className":122,"code":123,"language":124,"meta":125,"style":125},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm i @uniswap\u002Fv4-sdk @uniswap\u002Fsdk-core @uniswap\u002Funiversal-router-sdk\n","bash","",[127],{"type":46,"tag":65,"props":128,"children":129},{"__ignoreMap":125},[130],{"type":46,"tag":131,"props":132,"children":135},"span",{"class":133,"line":134},"line",1,[136,142,148,153,158],{"type":46,"tag":131,"props":137,"children":139},{"style":138},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[140],{"type":52,"value":141},"npm",{"type":46,"tag":131,"props":143,"children":145},{"style":144},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[146],{"type":52,"value":147}," i",{"type":46,"tag":131,"props":149,"children":150},{"style":144},[151],{"type":52,"value":152}," @uniswap\u002Fv4-sdk",{"type":46,"tag":131,"props":154,"children":155},{"style":144},[156],{"type":52,"value":157}," @uniswap\u002Fsdk-core",{"type":46,"tag":131,"props":159,"children":160},{"style":144},[161],{"type":52,"value":162}," @uniswap\u002Funiversal-router-sdk\n",{"type":46,"tag":164,"props":165,"children":166},"hr",{},[],{"type":46,"tag":82,"props":168,"children":170},{"id":169},"v4-vs-v3-decision-table",[171],{"type":52,"value":172},"v4 vs v3 Decision Table",{"type":46,"tag":174,"props":175,"children":176},"table",{},[177,201],{"type":46,"tag":178,"props":179,"children":180},"thead",{},[181],{"type":46,"tag":182,"props":183,"children":184},"tr",{},[185,191,196],{"type":46,"tag":186,"props":187,"children":188},"th",{},[189],{"type":52,"value":190},"Aspect",{"type":46,"tag":186,"props":192,"children":193},{},[194],{"type":52,"value":195},"v3",{"type":46,"tag":186,"props":197,"children":198},{},[199],{"type":52,"value":200},"v4",{"type":46,"tag":202,"props":203,"children":204},"tbody",{},[205,224,242,260,286,304,328,346,364],{"type":46,"tag":182,"props":206,"children":207},{},[208,214,219],{"type":46,"tag":209,"props":210,"children":211},"td",{},[212],{"type":52,"value":213},"Swap execution",{"type":46,"tag":209,"props":215,"children":216},{},[217],{"type":52,"value":218},"SwapRouter directly",{"type":46,"tag":209,"props":220,"children":221},{},[222],{"type":52,"value":223},"Universal Router required (V4Planner)",{"type":46,"tag":182,"props":225,"children":226},{},[227,232,237],{"type":46,"tag":209,"props":228,"children":229},{},[230],{"type":52,"value":231},"Pool architecture",{"type":46,"tag":209,"props":233,"children":234},{},[235],{"type":52,"value":236},"One contract per pool",{"type":46,"tag":209,"props":238,"children":239},{},[240],{"type":52,"value":241},"Singleton PoolManager",{"type":46,"tag":182,"props":243,"children":244},{},[245,250,255],{"type":46,"tag":209,"props":246,"children":247},{},[248],{"type":52,"value":249},"Pool state reads",{"type":46,"tag":209,"props":251,"children":252},{},[253],{"type":52,"value":254},"Direct pool contract",{"type":46,"tag":209,"props":256,"children":257},{},[258],{"type":52,"value":259},"StateView contract",{"type":46,"tag":182,"props":261,"children":262},{},[263,268,273],{"type":46,"tag":209,"props":264,"children":265},{},[266],{"type":52,"value":267},"Native ETH",{"type":46,"tag":209,"props":269,"children":270},{},[271],{"type":52,"value":272},"Wrap to WETH",{"type":46,"tag":209,"props":274,"children":275},{},[276,278,284],{"type":52,"value":277},"Native support (",{"type":46,"tag":65,"props":279,"children":281},{"className":280},[],[282],{"type":52,"value":283},"Ether.onChain(chainId)",{"type":52,"value":285},")",{"type":46,"tag":182,"props":287,"children":288},{},[289,294,299],{"type":46,"tag":209,"props":290,"children":291},{},[292],{"type":52,"value":293},"Position NFTs",{"type":46,"tag":209,"props":295,"children":296},{},[297],{"type":52,"value":298},"NonfungiblePositionManager",{"type":46,"tag":209,"props":300,"children":301},{},[302],{"type":52,"value":303},"PositionManager + multicall",{"type":46,"tag":182,"props":305,"children":306},{},[307,312,323],{"type":46,"tag":209,"props":308,"children":309},{},[310],{"type":52,"value":311},"Fee collection",{"type":46,"tag":209,"props":313,"children":314},{},[315,317],{"type":52,"value":316},"Explicit ",{"type":46,"tag":65,"props":318,"children":320},{"className":319},[],[321],{"type":52,"value":322},"collect()",{"type":46,"tag":209,"props":324,"children":325},{},[326],{"type":52,"value":327},"Automatic on position modification",{"type":46,"tag":182,"props":329,"children":330},{},[331,336,341],{"type":46,"tag":209,"props":332,"children":333},{},[334],{"type":52,"value":335},"Position discovery",{"type":46,"tag":209,"props":337,"children":338},{},[339],{"type":52,"value":340},"Onchain enumeration",{"type":46,"tag":209,"props":342,"children":343},{},[344],{"type":52,"value":345},"Offchain event indexing",{"type":46,"tag":182,"props":347,"children":348},{},[349,354,359],{"type":46,"tag":209,"props":350,"children":351},{},[352],{"type":52,"value":353},"Token approvals",{"type":46,"tag":209,"props":355,"children":356},{},[357],{"type":52,"value":358},"Direct approve",{"type":46,"tag":209,"props":360,"children":361},{},[362],{"type":52,"value":363},"Permit2 required",{"type":46,"tag":182,"props":365,"children":366},{},[367,372,377],{"type":46,"tag":209,"props":368,"children":369},{},[370],{"type":52,"value":371},"Contract addresses",{"type":46,"tag":209,"props":373,"children":374},{},[375],{"type":52,"value":376},"Same across chains",{"type":46,"tag":209,"props":378,"children":379},{},[380],{"type":52,"value":381},"Different per chain — verify from deployments",{"type":46,"tag":164,"props":383,"children":384},{},[],{"type":46,"tag":82,"props":386,"children":388},{"id":387},"core-contracts-per-chain",[389],{"type":52,"value":390},"Core Contracts (Per Chain)",{"type":46,"tag":59,"props":392,"children":393},{},[394,396,404],{"type":52,"value":395},"Look up addresses at ",{"type":46,"tag":397,"props":398,"children":402},"a",{"href":399,"rel":400},"https:\u002F\u002Fdocs.uniswap.org\u002Fcontracts\u002Fv4\u002Fdeployments",[401],"nofollow",[403],{"type":52,"value":399},{"type":52,"value":405}," — they differ per chain.",{"type":46,"tag":174,"props":407,"children":408},{},[409,425],{"type":46,"tag":178,"props":410,"children":411},{},[412],{"type":46,"tag":182,"props":413,"children":414},{},[415,420],{"type":46,"tag":186,"props":416,"children":417},{},[418],{"type":52,"value":419},"Contract",{"type":46,"tag":186,"props":421,"children":422},{},[423],{"type":52,"value":424},"Purpose",{"type":46,"tag":202,"props":426,"children":427},{},[428,441,454,467,480,493],{"type":46,"tag":182,"props":429,"children":430},{},[431,436],{"type":46,"tag":209,"props":432,"children":433},{},[434],{"type":52,"value":435},"PoolManager",{"type":46,"tag":209,"props":437,"children":438},{},[439],{"type":52,"value":440},"Singleton pool state",{"type":46,"tag":182,"props":442,"children":443},{},[444,449],{"type":46,"tag":209,"props":445,"children":446},{},[447],{"type":52,"value":448},"Universal Router",{"type":46,"tag":209,"props":450,"children":451},{},[452],{"type":52,"value":453},"Swap execution entry point",{"type":46,"tag":182,"props":455,"children":456},{},[457,462],{"type":46,"tag":209,"props":458,"children":459},{},[460],{"type":52,"value":461},"Quoter",{"type":46,"tag":209,"props":463,"children":464},{},[465],{"type":52,"value":466},"Offchain quote simulation (callStatic)",{"type":46,"tag":182,"props":468,"children":469},{},[470,475],{"type":46,"tag":209,"props":471,"children":472},{},[473],{"type":52,"value":474},"StateView",{"type":46,"tag":209,"props":476,"children":477},{},[478],{"type":52,"value":479},"Pool state reads (getSlot0, getLiquidity)",{"type":46,"tag":182,"props":481,"children":482},{},[483,488],{"type":46,"tag":209,"props":484,"children":485},{},[486],{"type":52,"value":487},"PositionManager",{"type":46,"tag":209,"props":489,"children":490},{},[491],{"type":52,"value":492},"LP position lifecycle",{"type":46,"tag":182,"props":494,"children":495},{},[496,501],{"type":46,"tag":209,"props":497,"children":498},{},[499],{"type":52,"value":500},"Permit2",{"type":46,"tag":209,"props":502,"children":503},{},[504,506,512],{"type":52,"value":505},"Token approval layer (same across chains: ",{"type":46,"tag":65,"props":507,"children":509},{"className":508},[],[510],{"type":52,"value":511},"0x000000000022D473030F116dDEE9F6B43aC78BA3",{"type":52,"value":285},{"type":46,"tag":164,"props":514,"children":515},{},[],{"type":46,"tag":82,"props":517,"children":519},{"id":518},"swap-pattern-universal-router",[520],{"type":52,"value":521},"Swap Pattern (Universal Router)",{"type":46,"tag":59,"props":523,"children":524},{},[525,527,533],{"type":52,"value":526},"All swaps use: V4Planner -> RoutePlanner -> Universal Router ",{"type":46,"tag":65,"props":528,"children":530},{"className":529},[],[531],{"type":52,"value":532},"execute()",{"type":52,"value":534},".",{"type":46,"tag":59,"props":536,"children":537},{},[538],{"type":46,"tag":539,"props":540,"children":541},"strong",{},[542],{"type":52,"value":543},"Single-hop (exact input):",{"type":46,"tag":120,"props":545,"children":549},{"className":546,"code":547,"language":548,"meta":125,"style":125},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { Actions, V4Planner } from '@uniswap\u002Fv4-sdk';\nimport { CommandType, RoutePlanner } from '@uniswap\u002Funiversal-router-sdk';\n\nconst v4Planner = new V4Planner();\nv4Planner.addAction(Actions.SWAP_EXACT_IN_SINGLE, [swapConfig]);\nv4Planner.addAction(Actions.SETTLE_ALL, [inputCurrency, amountIn]);\nv4Planner.addAction(Actions.TAKE_ALL, [outputCurrency, amountOutMinimum]);\n\nconst routePlanner = new RoutePlanner();\nroutePlanner.addCommand(CommandType.V4_SWAP, [v4Planner.actions, v4Planner.params]);\n\nconst deadline = Math.floor(Date.now() \u002F 1000) + 3600;\n\u002F\u002F Note: universalRouter.execute() is pseudocode for the viem call pattern.\n\u002F\u002F With viem, use: walletClient.writeContract({ address: UNIVERSAL_ROUTER_ADDRESS, abi: universalRouterAbi, functionName: 'execute', args: [routePlanner.commands, [v4Planner.finalize()], deadline], ...txOptions })\nawait universalRouter.execute(routePlanner.commands, [v4Planner.finalize()], deadline, txOptions);\n","typescript",[550],{"type":46,"tag":65,"props":551,"children":552},{"__ignoreMap":125},[553,614,665,675,714,759,810,861,869,902,974,982,1062,1072,1081],{"type":46,"tag":131,"props":554,"children":555},{"class":133,"line":134},[556,562,568,574,579,584,589,594,599,604,609],{"type":46,"tag":131,"props":557,"children":559},{"style":558},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[560],{"type":52,"value":561},"import",{"type":46,"tag":131,"props":563,"children":565},{"style":564},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[566],{"type":52,"value":567}," {",{"type":46,"tag":131,"props":569,"children":571},{"style":570},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[572],{"type":52,"value":573}," Actions",{"type":46,"tag":131,"props":575,"children":576},{"style":564},[577],{"type":52,"value":578},",",{"type":46,"tag":131,"props":580,"children":581},{"style":570},[582],{"type":52,"value":583}," V4Planner",{"type":46,"tag":131,"props":585,"children":586},{"style":564},[587],{"type":52,"value":588}," }",{"type":46,"tag":131,"props":590,"children":591},{"style":558},[592],{"type":52,"value":593}," from",{"type":46,"tag":131,"props":595,"children":596},{"style":564},[597],{"type":52,"value":598}," '",{"type":46,"tag":131,"props":600,"children":601},{"style":144},[602],{"type":52,"value":603},"@uniswap\u002Fv4-sdk",{"type":46,"tag":131,"props":605,"children":606},{"style":564},[607],{"type":52,"value":608},"'",{"type":46,"tag":131,"props":610,"children":611},{"style":564},[612],{"type":52,"value":613},";\n",{"type":46,"tag":131,"props":615,"children":617},{"class":133,"line":616},2,[618,622,626,631,635,640,644,648,652,657,661],{"type":46,"tag":131,"props":619,"children":620},{"style":558},[621],{"type":52,"value":561},{"type":46,"tag":131,"props":623,"children":624},{"style":564},[625],{"type":52,"value":567},{"type":46,"tag":131,"props":627,"children":628},{"style":570},[629],{"type":52,"value":630}," CommandType",{"type":46,"tag":131,"props":632,"children":633},{"style":564},[634],{"type":52,"value":578},{"type":46,"tag":131,"props":636,"children":637},{"style":570},[638],{"type":52,"value":639}," RoutePlanner",{"type":46,"tag":131,"props":641,"children":642},{"style":564},[643],{"type":52,"value":588},{"type":46,"tag":131,"props":645,"children":646},{"style":558},[647],{"type":52,"value":593},{"type":46,"tag":131,"props":649,"children":650},{"style":564},[651],{"type":52,"value":598},{"type":46,"tag":131,"props":653,"children":654},{"style":144},[655],{"type":52,"value":656},"@uniswap\u002Funiversal-router-sdk",{"type":46,"tag":131,"props":658,"children":659},{"style":564},[660],{"type":52,"value":608},{"type":46,"tag":131,"props":662,"children":663},{"style":564},[664],{"type":52,"value":613},{"type":46,"tag":131,"props":666,"children":668},{"class":133,"line":667},3,[669],{"type":46,"tag":131,"props":670,"children":672},{"emptyLinePlaceholder":671},true,[673],{"type":52,"value":674},"\n",{"type":46,"tag":131,"props":676,"children":678},{"class":133,"line":677},4,[679,685,690,695,700,705,710],{"type":46,"tag":131,"props":680,"children":682},{"style":681},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[683],{"type":52,"value":684},"const",{"type":46,"tag":131,"props":686,"children":687},{"style":570},[688],{"type":52,"value":689}," v4Planner ",{"type":46,"tag":131,"props":691,"children":692},{"style":564},[693],{"type":52,"value":694},"=",{"type":46,"tag":131,"props":696,"children":697},{"style":564},[698],{"type":52,"value":699}," new",{"type":46,"tag":131,"props":701,"children":703},{"style":702},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[704],{"type":52,"value":583},{"type":46,"tag":131,"props":706,"children":707},{"style":570},[708],{"type":52,"value":709},"()",{"type":46,"tag":131,"props":711,"children":712},{"style":564},[713],{"type":52,"value":613},{"type":46,"tag":131,"props":715,"children":717},{"class":133,"line":716},5,[718,723,727,732,737,741,746,750,755],{"type":46,"tag":131,"props":719,"children":720},{"style":570},[721],{"type":52,"value":722},"v4Planner",{"type":46,"tag":131,"props":724,"children":725},{"style":564},[726],{"type":52,"value":534},{"type":46,"tag":131,"props":728,"children":729},{"style":702},[730],{"type":52,"value":731},"addAction",{"type":46,"tag":131,"props":733,"children":734},{"style":570},[735],{"type":52,"value":736},"(Actions",{"type":46,"tag":131,"props":738,"children":739},{"style":564},[740],{"type":52,"value":534},{"type":46,"tag":131,"props":742,"children":743},{"style":570},[744],{"type":52,"value":745},"SWAP_EXACT_IN_SINGLE",{"type":46,"tag":131,"props":747,"children":748},{"style":564},[749],{"type":52,"value":578},{"type":46,"tag":131,"props":751,"children":752},{"style":570},[753],{"type":52,"value":754}," [swapConfig])",{"type":46,"tag":131,"props":756,"children":757},{"style":564},[758],{"type":52,"value":613},{"type":46,"tag":131,"props":760,"children":762},{"class":133,"line":761},6,[763,767,771,775,779,783,788,792,797,801,806],{"type":46,"tag":131,"props":764,"children":765},{"style":570},[766],{"type":52,"value":722},{"type":46,"tag":131,"props":768,"children":769},{"style":564},[770],{"type":52,"value":534},{"type":46,"tag":131,"props":772,"children":773},{"style":702},[774],{"type":52,"value":731},{"type":46,"tag":131,"props":776,"children":777},{"style":570},[778],{"type":52,"value":736},{"type":46,"tag":131,"props":780,"children":781},{"style":564},[782],{"type":52,"value":534},{"type":46,"tag":131,"props":784,"children":785},{"style":570},[786],{"type":52,"value":787},"SETTLE_ALL",{"type":46,"tag":131,"props":789,"children":790},{"style":564},[791],{"type":52,"value":578},{"type":46,"tag":131,"props":793,"children":794},{"style":570},[795],{"type":52,"value":796}," [inputCurrency",{"type":46,"tag":131,"props":798,"children":799},{"style":564},[800],{"type":52,"value":578},{"type":46,"tag":131,"props":802,"children":803},{"style":570},[804],{"type":52,"value":805}," amountIn])",{"type":46,"tag":131,"props":807,"children":808},{"style":564},[809],{"type":52,"value":613},{"type":46,"tag":131,"props":811,"children":813},{"class":133,"line":812},7,[814,818,822,826,830,834,839,843,848,852,857],{"type":46,"tag":131,"props":815,"children":816},{"style":570},[817],{"type":52,"value":722},{"type":46,"tag":131,"props":819,"children":820},{"style":564},[821],{"type":52,"value":534},{"type":46,"tag":131,"props":823,"children":824},{"style":702},[825],{"type":52,"value":731},{"type":46,"tag":131,"props":827,"children":828},{"style":570},[829],{"type":52,"value":736},{"type":46,"tag":131,"props":831,"children":832},{"style":564},[833],{"type":52,"value":534},{"type":46,"tag":131,"props":835,"children":836},{"style":570},[837],{"type":52,"value":838},"TAKE_ALL",{"type":46,"tag":131,"props":840,"children":841},{"style":564},[842],{"type":52,"value":578},{"type":46,"tag":131,"props":844,"children":845},{"style":570},[846],{"type":52,"value":847}," [outputCurrency",{"type":46,"tag":131,"props":849,"children":850},{"style":564},[851],{"type":52,"value":578},{"type":46,"tag":131,"props":853,"children":854},{"style":570},[855],{"type":52,"value":856}," amountOutMinimum])",{"type":46,"tag":131,"props":858,"children":859},{"style":564},[860],{"type":52,"value":613},{"type":46,"tag":131,"props":862,"children":864},{"class":133,"line":863},8,[865],{"type":46,"tag":131,"props":866,"children":867},{"emptyLinePlaceholder":671},[868],{"type":52,"value":674},{"type":46,"tag":131,"props":870,"children":872},{"class":133,"line":871},9,[873,877,882,886,890,894,898],{"type":46,"tag":131,"props":874,"children":875},{"style":681},[876],{"type":52,"value":684},{"type":46,"tag":131,"props":878,"children":879},{"style":570},[880],{"type":52,"value":881}," routePlanner ",{"type":46,"tag":131,"props":883,"children":884},{"style":564},[885],{"type":52,"value":694},{"type":46,"tag":131,"props":887,"children":888},{"style":564},[889],{"type":52,"value":699},{"type":46,"tag":131,"props":891,"children":892},{"style":702},[893],{"type":52,"value":639},{"type":46,"tag":131,"props":895,"children":896},{"style":570},[897],{"type":52,"value":709},{"type":46,"tag":131,"props":899,"children":900},{"style":564},[901],{"type":52,"value":613},{"type":46,"tag":131,"props":903,"children":905},{"class":133,"line":904},10,[906,911,915,920,925,929,934,938,943,947,952,956,961,965,970],{"type":46,"tag":131,"props":907,"children":908},{"style":570},[909],{"type":52,"value":910},"routePlanner",{"type":46,"tag":131,"props":912,"children":913},{"style":564},[914],{"type":52,"value":534},{"type":46,"tag":131,"props":916,"children":917},{"style":702},[918],{"type":52,"value":919},"addCommand",{"type":46,"tag":131,"props":921,"children":922},{"style":570},[923],{"type":52,"value":924},"(CommandType",{"type":46,"tag":131,"props":926,"children":927},{"style":564},[928],{"type":52,"value":534},{"type":46,"tag":131,"props":930,"children":931},{"style":570},[932],{"type":52,"value":933},"V4_SWAP",{"type":46,"tag":131,"props":935,"children":936},{"style":564},[937],{"type":52,"value":578},{"type":46,"tag":131,"props":939,"children":940},{"style":570},[941],{"type":52,"value":942}," [v4Planner",{"type":46,"tag":131,"props":944,"children":945},{"style":564},[946],{"type":52,"value":534},{"type":46,"tag":131,"props":948,"children":949},{"style":570},[950],{"type":52,"value":951},"actions",{"type":46,"tag":131,"props":953,"children":954},{"style":564},[955],{"type":52,"value":578},{"type":46,"tag":131,"props":957,"children":958},{"style":570},[959],{"type":52,"value":960}," v4Planner",{"type":46,"tag":131,"props":962,"children":963},{"style":564},[964],{"type":52,"value":534},{"type":46,"tag":131,"props":966,"children":967},{"style":570},[968],{"type":52,"value":969},"params])",{"type":46,"tag":131,"props":971,"children":972},{"style":564},[973],{"type":52,"value":613},{"type":46,"tag":131,"props":975,"children":977},{"class":133,"line":976},11,[978],{"type":46,"tag":131,"props":979,"children":980},{"emptyLinePlaceholder":671},[981],{"type":52,"value":674},{"type":46,"tag":131,"props":983,"children":985},{"class":133,"line":984},12,[986,990,995,999,1004,1008,1013,1018,1022,1027,1032,1037,1043,1048,1053,1058],{"type":46,"tag":131,"props":987,"children":988},{"style":681},[989],{"type":52,"value":684},{"type":46,"tag":131,"props":991,"children":992},{"style":570},[993],{"type":52,"value":994}," deadline ",{"type":46,"tag":131,"props":996,"children":997},{"style":564},[998],{"type":52,"value":694},{"type":46,"tag":131,"props":1000,"children":1001},{"style":570},[1002],{"type":52,"value":1003}," Math",{"type":46,"tag":131,"props":1005,"children":1006},{"style":564},[1007],{"type":52,"value":534},{"type":46,"tag":131,"props":1009,"children":1010},{"style":702},[1011],{"type":52,"value":1012},"floor",{"type":46,"tag":131,"props":1014,"children":1015},{"style":570},[1016],{"type":52,"value":1017},"(Date",{"type":46,"tag":131,"props":1019,"children":1020},{"style":564},[1021],{"type":52,"value":534},{"type":46,"tag":131,"props":1023,"children":1024},{"style":702},[1025],{"type":52,"value":1026},"now",{"type":46,"tag":131,"props":1028,"children":1029},{"style":570},[1030],{"type":52,"value":1031},"() ",{"type":46,"tag":131,"props":1033,"children":1034},{"style":564},[1035],{"type":52,"value":1036},"\u002F",{"type":46,"tag":131,"props":1038,"children":1040},{"style":1039},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1041],{"type":52,"value":1042}," 1000",{"type":46,"tag":131,"props":1044,"children":1045},{"style":570},[1046],{"type":52,"value":1047},") ",{"type":46,"tag":131,"props":1049,"children":1050},{"style":564},[1051],{"type":52,"value":1052},"+",{"type":46,"tag":131,"props":1054,"children":1055},{"style":1039},[1056],{"type":52,"value":1057}," 3600",{"type":46,"tag":131,"props":1059,"children":1060},{"style":564},[1061],{"type":52,"value":613},{"type":46,"tag":131,"props":1063,"children":1065},{"class":133,"line":1064},13,[1066],{"type":46,"tag":131,"props":1067,"children":1069},{"style":1068},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1070],{"type":52,"value":1071},"\u002F\u002F Note: universalRouter.execute() is pseudocode for the viem call pattern.\n",{"type":46,"tag":131,"props":1073,"children":1075},{"class":133,"line":1074},14,[1076],{"type":46,"tag":131,"props":1077,"children":1078},{"style":1068},[1079],{"type":52,"value":1080},"\u002F\u002F With viem, use: walletClient.writeContract({ address: UNIVERSAL_ROUTER_ADDRESS, abi: universalRouterAbi, functionName: 'execute', args: [routePlanner.commands, [v4Planner.finalize()], deadline], ...txOptions })\n",{"type":46,"tag":131,"props":1082,"children":1084},{"class":133,"line":1083},15,[1085,1090,1095,1099,1104,1109,1113,1118,1122,1126,1130,1135,1140,1144,1149,1153,1158],{"type":46,"tag":131,"props":1086,"children":1087},{"style":558},[1088],{"type":52,"value":1089},"await",{"type":46,"tag":131,"props":1091,"children":1092},{"style":570},[1093],{"type":52,"value":1094}," universalRouter",{"type":46,"tag":131,"props":1096,"children":1097},{"style":564},[1098],{"type":52,"value":534},{"type":46,"tag":131,"props":1100,"children":1101},{"style":702},[1102],{"type":52,"value":1103},"execute",{"type":46,"tag":131,"props":1105,"children":1106},{"style":570},[1107],{"type":52,"value":1108},"(routePlanner",{"type":46,"tag":131,"props":1110,"children":1111},{"style":564},[1112],{"type":52,"value":534},{"type":46,"tag":131,"props":1114,"children":1115},{"style":570},[1116],{"type":52,"value":1117},"commands",{"type":46,"tag":131,"props":1119,"children":1120},{"style":564},[1121],{"type":52,"value":578},{"type":46,"tag":131,"props":1123,"children":1124},{"style":570},[1125],{"type":52,"value":942},{"type":46,"tag":131,"props":1127,"children":1128},{"style":564},[1129],{"type":52,"value":534},{"type":46,"tag":131,"props":1131,"children":1132},{"style":702},[1133],{"type":52,"value":1134},"finalize",{"type":46,"tag":131,"props":1136,"children":1137},{"style":570},[1138],{"type":52,"value":1139},"()]",{"type":46,"tag":131,"props":1141,"children":1142},{"style":564},[1143],{"type":52,"value":578},{"type":46,"tag":131,"props":1145,"children":1146},{"style":570},[1147],{"type":52,"value":1148}," deadline",{"type":46,"tag":131,"props":1150,"children":1151},{"style":564},[1152],{"type":52,"value":578},{"type":46,"tag":131,"props":1154,"children":1155},{"style":570},[1156],{"type":52,"value":1157}," txOptions)",{"type":46,"tag":131,"props":1159,"children":1160},{"style":564},[1161],{"type":52,"value":613},{"type":46,"tag":59,"props":1163,"children":1164},{},[1165],{"type":46,"tag":539,"props":1166,"children":1167},{},[1168],{"type":52,"value":1169},"Multi-hop (exact input):",{"type":46,"tag":120,"props":1171,"children":1173},{"className":546,"code":1172,"language":548,"meta":125,"style":125},"import { Actions, V4Planner, encodeMultihopExactInPath } from '@uniswap\u002Fv4-sdk';\nimport { CommandType, RoutePlanner } from '@uniswap\u002Funiversal-router-sdk';\n\nconst v4Planner = new V4Planner();\n\u002F\u002F Build multi-hop path: tokenA -> tokenB -> tokenC\nconst path = encodeMultihopExactInPath([poolKeyAB, poolKeyBC], tokenA);\nv4Planner.addAction(Actions.SWAP_EXACT_IN, [{ path, amountIn, amountOutMinimum }]);\n\u002F\u002F SETTLE_ALL uses first pool's input currency; TAKE_ALL uses last pool's output currency\nv4Planner.addAction(Actions.SETTLE_ALL, [tokenA, amountIn]);\nv4Planner.addAction(Actions.TAKE_ALL, [tokenC, amountOutMinimum]);\n\nconst routePlanner = new RoutePlanner();\nroutePlanner.addCommand(CommandType.V4_SWAP, [v4Planner.actions, v4Planner.params]);\n\nconst deadline = Math.floor(Date.now() \u002F 1000) + 3600;\n\u002F\u002F Note: universalRouter.execute() is pseudocode for the viem call pattern.\n\u002F\u002F With viem, use: walletClient.writeContract({ address: UNIVERSAL_ROUTER_ADDRESS, abi: universalRouterAbi, functionName: 'execute', args: [routePlanner.commands, [v4Planner.finalize()], deadline], ...txOptions })\nawait universalRouter.execute(routePlanner.commands, [v4Planner.finalize()], deadline, txOptions);\n",[1174],{"type":46,"tag":65,"props":1175,"children":1176},{"__ignoreMap":125},[1177,1233,1280,1287,1318,1326,1373,1452,1460,1508,1556,1563,1594,1657,1664,1731,1739,1747],{"type":46,"tag":131,"props":1178,"children":1179},{"class":133,"line":134},[1180,1184,1188,1192,1196,1200,1204,1209,1213,1217,1221,1225,1229],{"type":46,"tag":131,"props":1181,"children":1182},{"style":558},[1183],{"type":52,"value":561},{"type":46,"tag":131,"props":1185,"children":1186},{"style":564},[1187],{"type":52,"value":567},{"type":46,"tag":131,"props":1189,"children":1190},{"style":570},[1191],{"type":52,"value":573},{"type":46,"tag":131,"props":1193,"children":1194},{"style":564},[1195],{"type":52,"value":578},{"type":46,"tag":131,"props":1197,"children":1198},{"style":570},[1199],{"type":52,"value":583},{"type":46,"tag":131,"props":1201,"children":1202},{"style":564},[1203],{"type":52,"value":578},{"type":46,"tag":131,"props":1205,"children":1206},{"style":570},[1207],{"type":52,"value":1208}," encodeMultihopExactInPath",{"type":46,"tag":131,"props":1210,"children":1211},{"style":564},[1212],{"type":52,"value":588},{"type":46,"tag":131,"props":1214,"children":1215},{"style":558},[1216],{"type":52,"value":593},{"type":46,"tag":131,"props":1218,"children":1219},{"style":564},[1220],{"type":52,"value":598},{"type":46,"tag":131,"props":1222,"children":1223},{"style":144},[1224],{"type":52,"value":603},{"type":46,"tag":131,"props":1226,"children":1227},{"style":564},[1228],{"type":52,"value":608},{"type":46,"tag":131,"props":1230,"children":1231},{"style":564},[1232],{"type":52,"value":613},{"type":46,"tag":131,"props":1234,"children":1235},{"class":133,"line":616},[1236,1240,1244,1248,1252,1256,1260,1264,1268,1272,1276],{"type":46,"tag":131,"props":1237,"children":1238},{"style":558},[1239],{"type":52,"value":561},{"type":46,"tag":131,"props":1241,"children":1242},{"style":564},[1243],{"type":52,"value":567},{"type":46,"tag":131,"props":1245,"children":1246},{"style":570},[1247],{"type":52,"value":630},{"type":46,"tag":131,"props":1249,"children":1250},{"style":564},[1251],{"type":52,"value":578},{"type":46,"tag":131,"props":1253,"children":1254},{"style":570},[1255],{"type":52,"value":639},{"type":46,"tag":131,"props":1257,"children":1258},{"style":564},[1259],{"type":52,"value":588},{"type":46,"tag":131,"props":1261,"children":1262},{"style":558},[1263],{"type":52,"value":593},{"type":46,"tag":131,"props":1265,"children":1266},{"style":564},[1267],{"type":52,"value":598},{"type":46,"tag":131,"props":1269,"children":1270},{"style":144},[1271],{"type":52,"value":656},{"type":46,"tag":131,"props":1273,"children":1274},{"style":564},[1275],{"type":52,"value":608},{"type":46,"tag":131,"props":1277,"children":1278},{"style":564},[1279],{"type":52,"value":613},{"type":46,"tag":131,"props":1281,"children":1282},{"class":133,"line":667},[1283],{"type":46,"tag":131,"props":1284,"children":1285},{"emptyLinePlaceholder":671},[1286],{"type":52,"value":674},{"type":46,"tag":131,"props":1288,"children":1289},{"class":133,"line":677},[1290,1294,1298,1302,1306,1310,1314],{"type":46,"tag":131,"props":1291,"children":1292},{"style":681},[1293],{"type":52,"value":684},{"type":46,"tag":131,"props":1295,"children":1296},{"style":570},[1297],{"type":52,"value":689},{"type":46,"tag":131,"props":1299,"children":1300},{"style":564},[1301],{"type":52,"value":694},{"type":46,"tag":131,"props":1303,"children":1304},{"style":564},[1305],{"type":52,"value":699},{"type":46,"tag":131,"props":1307,"children":1308},{"style":702},[1309],{"type":52,"value":583},{"type":46,"tag":131,"props":1311,"children":1312},{"style":570},[1313],{"type":52,"value":709},{"type":46,"tag":131,"props":1315,"children":1316},{"style":564},[1317],{"type":52,"value":613},{"type":46,"tag":131,"props":1319,"children":1320},{"class":133,"line":716},[1321],{"type":46,"tag":131,"props":1322,"children":1323},{"style":1068},[1324],{"type":52,"value":1325},"\u002F\u002F Build multi-hop path: tokenA -> tokenB -> tokenC\n",{"type":46,"tag":131,"props":1327,"children":1328},{"class":133,"line":761},[1329,1333,1338,1342,1346,1351,1355,1360,1364,1369],{"type":46,"tag":131,"props":1330,"children":1331},{"style":681},[1332],{"type":52,"value":684},{"type":46,"tag":131,"props":1334,"children":1335},{"style":570},[1336],{"type":52,"value":1337}," path ",{"type":46,"tag":131,"props":1339,"children":1340},{"style":564},[1341],{"type":52,"value":694},{"type":46,"tag":131,"props":1343,"children":1344},{"style":702},[1345],{"type":52,"value":1208},{"type":46,"tag":131,"props":1347,"children":1348},{"style":570},[1349],{"type":52,"value":1350},"([poolKeyAB",{"type":46,"tag":131,"props":1352,"children":1353},{"style":564},[1354],{"type":52,"value":578},{"type":46,"tag":131,"props":1356,"children":1357},{"style":570},[1358],{"type":52,"value":1359}," poolKeyBC]",{"type":46,"tag":131,"props":1361,"children":1362},{"style":564},[1363],{"type":52,"value":578},{"type":46,"tag":131,"props":1365,"children":1366},{"style":570},[1367],{"type":52,"value":1368}," tokenA)",{"type":46,"tag":131,"props":1370,"children":1371},{"style":564},[1372],{"type":52,"value":613},{"type":46,"tag":131,"props":1374,"children":1375},{"class":133,"line":812},[1376,1380,1384,1388,1392,1396,1401,1405,1410,1415,1420,1424,1429,1433,1438,1443,1448],{"type":46,"tag":131,"props":1377,"children":1378},{"style":570},[1379],{"type":52,"value":722},{"type":46,"tag":131,"props":1381,"children":1382},{"style":564},[1383],{"type":52,"value":534},{"type":46,"tag":131,"props":1385,"children":1386},{"style":702},[1387],{"type":52,"value":731},{"type":46,"tag":131,"props":1389,"children":1390},{"style":570},[1391],{"type":52,"value":736},{"type":46,"tag":131,"props":1393,"children":1394},{"style":564},[1395],{"type":52,"value":534},{"type":46,"tag":131,"props":1397,"children":1398},{"style":570},[1399],{"type":52,"value":1400},"SWAP_EXACT_IN",{"type":46,"tag":131,"props":1402,"children":1403},{"style":564},[1404],{"type":52,"value":578},{"type":46,"tag":131,"props":1406,"children":1407},{"style":570},[1408],{"type":52,"value":1409}," [",{"type":46,"tag":131,"props":1411,"children":1412},{"style":564},[1413],{"type":52,"value":1414},"{",{"type":46,"tag":131,"props":1416,"children":1417},{"style":570},[1418],{"type":52,"value":1419}," path",{"type":46,"tag":131,"props":1421,"children":1422},{"style":564},[1423],{"type":52,"value":578},{"type":46,"tag":131,"props":1425,"children":1426},{"style":570},[1427],{"type":52,"value":1428}," amountIn",{"type":46,"tag":131,"props":1430,"children":1431},{"style":564},[1432],{"type":52,"value":578},{"type":46,"tag":131,"props":1434,"children":1435},{"style":570},[1436],{"type":52,"value":1437}," amountOutMinimum ",{"type":46,"tag":131,"props":1439,"children":1440},{"style":564},[1441],{"type":52,"value":1442},"}",{"type":46,"tag":131,"props":1444,"children":1445},{"style":570},[1446],{"type":52,"value":1447},"])",{"type":46,"tag":131,"props":1449,"children":1450},{"style":564},[1451],{"type":52,"value":613},{"type":46,"tag":131,"props":1453,"children":1454},{"class":133,"line":863},[1455],{"type":46,"tag":131,"props":1456,"children":1457},{"style":1068},[1458],{"type":52,"value":1459},"\u002F\u002F SETTLE_ALL uses first pool's input currency; TAKE_ALL uses last pool's output currency\n",{"type":46,"tag":131,"props":1461,"children":1462},{"class":133,"line":871},[1463,1467,1471,1475,1479,1483,1487,1491,1496,1500,1504],{"type":46,"tag":131,"props":1464,"children":1465},{"style":570},[1466],{"type":52,"value":722},{"type":46,"tag":131,"props":1468,"children":1469},{"style":564},[1470],{"type":52,"value":534},{"type":46,"tag":131,"props":1472,"children":1473},{"style":702},[1474],{"type":52,"value":731},{"type":46,"tag":131,"props":1476,"children":1477},{"style":570},[1478],{"type":52,"value":736},{"type":46,"tag":131,"props":1480,"children":1481},{"style":564},[1482],{"type":52,"value":534},{"type":46,"tag":131,"props":1484,"children":1485},{"style":570},[1486],{"type":52,"value":787},{"type":46,"tag":131,"props":1488,"children":1489},{"style":564},[1490],{"type":52,"value":578},{"type":46,"tag":131,"props":1492,"children":1493},{"style":570},[1494],{"type":52,"value":1495}," [tokenA",{"type":46,"tag":131,"props":1497,"children":1498},{"style":564},[1499],{"type":52,"value":578},{"type":46,"tag":131,"props":1501,"children":1502},{"style":570},[1503],{"type":52,"value":805},{"type":46,"tag":131,"props":1505,"children":1506},{"style":564},[1507],{"type":52,"value":613},{"type":46,"tag":131,"props":1509,"children":1510},{"class":133,"line":904},[1511,1515,1519,1523,1527,1531,1535,1539,1544,1548,1552],{"type":46,"tag":131,"props":1512,"children":1513},{"style":570},[1514],{"type":52,"value":722},{"type":46,"tag":131,"props":1516,"children":1517},{"style":564},[1518],{"type":52,"value":534},{"type":46,"tag":131,"props":1520,"children":1521},{"style":702},[1522],{"type":52,"value":731},{"type":46,"tag":131,"props":1524,"children":1525},{"style":570},[1526],{"type":52,"value":736},{"type":46,"tag":131,"props":1528,"children":1529},{"style":564},[1530],{"type":52,"value":534},{"type":46,"tag":131,"props":1532,"children":1533},{"style":570},[1534],{"type":52,"value":838},{"type":46,"tag":131,"props":1536,"children":1537},{"style":564},[1538],{"type":52,"value":578},{"type":46,"tag":131,"props":1540,"children":1541},{"style":570},[1542],{"type":52,"value":1543}," [tokenC",{"type":46,"tag":131,"props":1545,"children":1546},{"style":564},[1547],{"type":52,"value":578},{"type":46,"tag":131,"props":1549,"children":1550},{"style":570},[1551],{"type":52,"value":856},{"type":46,"tag":131,"props":1553,"children":1554},{"style":564},[1555],{"type":52,"value":613},{"type":46,"tag":131,"props":1557,"children":1558},{"class":133,"line":976},[1559],{"type":46,"tag":131,"props":1560,"children":1561},{"emptyLinePlaceholder":671},[1562],{"type":52,"value":674},{"type":46,"tag":131,"props":1564,"children":1565},{"class":133,"line":984},[1566,1570,1574,1578,1582,1586,1590],{"type":46,"tag":131,"props":1567,"children":1568},{"style":681},[1569],{"type":52,"value":684},{"type":46,"tag":131,"props":1571,"children":1572},{"style":570},[1573],{"type":52,"value":881},{"type":46,"tag":131,"props":1575,"children":1576},{"style":564},[1577],{"type":52,"value":694},{"type":46,"tag":131,"props":1579,"children":1580},{"style":564},[1581],{"type":52,"value":699},{"type":46,"tag":131,"props":1583,"children":1584},{"style":702},[1585],{"type":52,"value":639},{"type":46,"tag":131,"props":1587,"children":1588},{"style":570},[1589],{"type":52,"value":709},{"type":46,"tag":131,"props":1591,"children":1592},{"style":564},[1593],{"type":52,"value":613},{"type":46,"tag":131,"props":1595,"children":1596},{"class":133,"line":1064},[1597,1601,1605,1609,1613,1617,1621,1625,1629,1633,1637,1641,1645,1649,1653],{"type":46,"tag":131,"props":1598,"children":1599},{"style":570},[1600],{"type":52,"value":910},{"type":46,"tag":131,"props":1602,"children":1603},{"style":564},[1604],{"type":52,"value":534},{"type":46,"tag":131,"props":1606,"children":1607},{"style":702},[1608],{"type":52,"value":919},{"type":46,"tag":131,"props":1610,"children":1611},{"style":570},[1612],{"type":52,"value":924},{"type":46,"tag":131,"props":1614,"children":1615},{"style":564},[1616],{"type":52,"value":534},{"type":46,"tag":131,"props":1618,"children":1619},{"style":570},[1620],{"type":52,"value":933},{"type":46,"tag":131,"props":1622,"children":1623},{"style":564},[1624],{"type":52,"value":578},{"type":46,"tag":131,"props":1626,"children":1627},{"style":570},[1628],{"type":52,"value":942},{"type":46,"tag":131,"props":1630,"children":1631},{"style":564},[1632],{"type":52,"value":534},{"type":46,"tag":131,"props":1634,"children":1635},{"style":570},[1636],{"type":52,"value":951},{"type":46,"tag":131,"props":1638,"children":1639},{"style":564},[1640],{"type":52,"value":578},{"type":46,"tag":131,"props":1642,"children":1643},{"style":570},[1644],{"type":52,"value":960},{"type":46,"tag":131,"props":1646,"children":1647},{"style":564},[1648],{"type":52,"value":534},{"type":46,"tag":131,"props":1650,"children":1651},{"style":570},[1652],{"type":52,"value":969},{"type":46,"tag":131,"props":1654,"children":1655},{"style":564},[1656],{"type":52,"value":613},{"type":46,"tag":131,"props":1658,"children":1659},{"class":133,"line":1074},[1660],{"type":46,"tag":131,"props":1661,"children":1662},{"emptyLinePlaceholder":671},[1663],{"type":52,"value":674},{"type":46,"tag":131,"props":1665,"children":1666},{"class":133,"line":1083},[1667,1671,1675,1679,1683,1687,1691,1695,1699,1703,1707,1711,1715,1719,1723,1727],{"type":46,"tag":131,"props":1668,"children":1669},{"style":681},[1670],{"type":52,"value":684},{"type":46,"tag":131,"props":1672,"children":1673},{"style":570},[1674],{"type":52,"value":994},{"type":46,"tag":131,"props":1676,"children":1677},{"style":564},[1678],{"type":52,"value":694},{"type":46,"tag":131,"props":1680,"children":1681},{"style":570},[1682],{"type":52,"value":1003},{"type":46,"tag":131,"props":1684,"children":1685},{"style":564},[1686],{"type":52,"value":534},{"type":46,"tag":131,"props":1688,"children":1689},{"style":702},[1690],{"type":52,"value":1012},{"type":46,"tag":131,"props":1692,"children":1693},{"style":570},[1694],{"type":52,"value":1017},{"type":46,"tag":131,"props":1696,"children":1697},{"style":564},[1698],{"type":52,"value":534},{"type":46,"tag":131,"props":1700,"children":1701},{"style":702},[1702],{"type":52,"value":1026},{"type":46,"tag":131,"props":1704,"children":1705},{"style":570},[1706],{"type":52,"value":1031},{"type":46,"tag":131,"props":1708,"children":1709},{"style":564},[1710],{"type":52,"value":1036},{"type":46,"tag":131,"props":1712,"children":1713},{"style":1039},[1714],{"type":52,"value":1042},{"type":46,"tag":131,"props":1716,"children":1717},{"style":570},[1718],{"type":52,"value":1047},{"type":46,"tag":131,"props":1720,"children":1721},{"style":564},[1722],{"type":52,"value":1052},{"type":46,"tag":131,"props":1724,"children":1725},{"style":1039},[1726],{"type":52,"value":1057},{"type":46,"tag":131,"props":1728,"children":1729},{"style":564},[1730],{"type":52,"value":613},{"type":46,"tag":131,"props":1732,"children":1734},{"class":133,"line":1733},16,[1735],{"type":46,"tag":131,"props":1736,"children":1737},{"style":1068},[1738],{"type":52,"value":1071},{"type":46,"tag":131,"props":1740,"children":1742},{"class":133,"line":1741},17,[1743],{"type":46,"tag":131,"props":1744,"children":1745},{"style":1068},[1746],{"type":52,"value":1080},{"type":46,"tag":131,"props":1748,"children":1750},{"class":133,"line":1749},18,[1751,1755,1759,1763,1767,1771,1775,1779,1783,1787,1791,1795,1799,1803,1807,1811,1815],{"type":46,"tag":131,"props":1752,"children":1753},{"style":558},[1754],{"type":52,"value":1089},{"type":46,"tag":131,"props":1756,"children":1757},{"style":570},[1758],{"type":52,"value":1094},{"type":46,"tag":131,"props":1760,"children":1761},{"style":564},[1762],{"type":52,"value":534},{"type":46,"tag":131,"props":1764,"children":1765},{"style":702},[1766],{"type":52,"value":1103},{"type":46,"tag":131,"props":1768,"children":1769},{"style":570},[1770],{"type":52,"value":1108},{"type":46,"tag":131,"props":1772,"children":1773},{"style":564},[1774],{"type":52,"value":534},{"type":46,"tag":131,"props":1776,"children":1777},{"style":570},[1778],{"type":52,"value":1117},{"type":46,"tag":131,"props":1780,"children":1781},{"style":564},[1782],{"type":52,"value":578},{"type":46,"tag":131,"props":1784,"children":1785},{"style":570},[1786],{"type":52,"value":942},{"type":46,"tag":131,"props":1788,"children":1789},{"style":564},[1790],{"type":52,"value":534},{"type":46,"tag":131,"props":1792,"children":1793},{"style":702},[1794],{"type":52,"value":1134},{"type":46,"tag":131,"props":1796,"children":1797},{"style":570},[1798],{"type":52,"value":1139},{"type":46,"tag":131,"props":1800,"children":1801},{"style":564},[1802],{"type":52,"value":578},{"type":46,"tag":131,"props":1804,"children":1805},{"style":570},[1806],{"type":52,"value":1148},{"type":46,"tag":131,"props":1808,"children":1809},{"style":564},[1810],{"type":52,"value":578},{"type":46,"tag":131,"props":1812,"children":1813},{"style":570},[1814],{"type":52,"value":1157},{"type":46,"tag":131,"props":1816,"children":1817},{"style":564},[1818],{"type":52,"value":613},{"type":46,"tag":59,"props":1820,"children":1821},{},[1822,1827,1829,1835],{"type":46,"tag":539,"props":1823,"children":1824},{},[1825],{"type":52,"value":1826},"SwapConfig",{"type":52,"value":1828}," (",{"type":46,"tag":65,"props":1830,"children":1832},{"className":1831},[],[1833],{"type":52,"value":1834},"SwapExactInSingle",{"type":52,"value":1836},"):",{"type":46,"tag":120,"props":1838,"children":1840},{"className":546,"code":1839,"language":548,"meta":125,"style":125},"const swapConfig = {\n  poolKey: { currency0, currency1, fee, tickSpacing, hooks },\n  zeroForOne,\n  amountIn,\n  amountOutMinimum,\n  hookData: '0x00',\n};\n",[1841],{"type":46,"tag":65,"props":1842,"children":1843},{"__ignoreMap":125},[1844,1865,1929,1942,1954,1966,1995],{"type":46,"tag":131,"props":1845,"children":1846},{"class":133,"line":134},[1847,1851,1856,1860],{"type":46,"tag":131,"props":1848,"children":1849},{"style":681},[1850],{"type":52,"value":684},{"type":46,"tag":131,"props":1852,"children":1853},{"style":570},[1854],{"type":52,"value":1855}," swapConfig ",{"type":46,"tag":131,"props":1857,"children":1858},{"style":564},[1859],{"type":52,"value":694},{"type":46,"tag":131,"props":1861,"children":1862},{"style":564},[1863],{"type":52,"value":1864}," {\n",{"type":46,"tag":131,"props":1866,"children":1867},{"class":133,"line":616},[1868,1874,1879,1883,1888,1892,1897,1901,1906,1910,1915,1919,1924],{"type":46,"tag":131,"props":1869,"children":1871},{"style":1870},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[1872],{"type":52,"value":1873},"  poolKey",{"type":46,"tag":131,"props":1875,"children":1876},{"style":564},[1877],{"type":52,"value":1878},":",{"type":46,"tag":131,"props":1880,"children":1881},{"style":564},[1882],{"type":52,"value":567},{"type":46,"tag":131,"props":1884,"children":1885},{"style":570},[1886],{"type":52,"value":1887}," currency0",{"type":46,"tag":131,"props":1889,"children":1890},{"style":564},[1891],{"type":52,"value":578},{"type":46,"tag":131,"props":1893,"children":1894},{"style":570},[1895],{"type":52,"value":1896}," currency1",{"type":46,"tag":131,"props":1898,"children":1899},{"style":564},[1900],{"type":52,"value":578},{"type":46,"tag":131,"props":1902,"children":1903},{"style":570},[1904],{"type":52,"value":1905}," fee",{"type":46,"tag":131,"props":1907,"children":1908},{"style":564},[1909],{"type":52,"value":578},{"type":46,"tag":131,"props":1911,"children":1912},{"style":570},[1913],{"type":52,"value":1914}," tickSpacing",{"type":46,"tag":131,"props":1916,"children":1917},{"style":564},[1918],{"type":52,"value":578},{"type":46,"tag":131,"props":1920,"children":1921},{"style":570},[1922],{"type":52,"value":1923}," hooks ",{"type":46,"tag":131,"props":1925,"children":1926},{"style":564},[1927],{"type":52,"value":1928},"},\n",{"type":46,"tag":131,"props":1930,"children":1931},{"class":133,"line":667},[1932,1937],{"type":46,"tag":131,"props":1933,"children":1934},{"style":570},[1935],{"type":52,"value":1936},"  zeroForOne",{"type":46,"tag":131,"props":1938,"children":1939},{"style":564},[1940],{"type":52,"value":1941},",\n",{"type":46,"tag":131,"props":1943,"children":1944},{"class":133,"line":677},[1945,1950],{"type":46,"tag":131,"props":1946,"children":1947},{"style":570},[1948],{"type":52,"value":1949},"  amountIn",{"type":46,"tag":131,"props":1951,"children":1952},{"style":564},[1953],{"type":52,"value":1941},{"type":46,"tag":131,"props":1955,"children":1956},{"class":133,"line":716},[1957,1962],{"type":46,"tag":131,"props":1958,"children":1959},{"style":570},[1960],{"type":52,"value":1961},"  amountOutMinimum",{"type":46,"tag":131,"props":1963,"children":1964},{"style":564},[1965],{"type":52,"value":1941},{"type":46,"tag":131,"props":1967,"children":1968},{"class":133,"line":761},[1969,1974,1978,1982,1987,1991],{"type":46,"tag":131,"props":1970,"children":1971},{"style":1870},[1972],{"type":52,"value":1973},"  hookData",{"type":46,"tag":131,"props":1975,"children":1976},{"style":564},[1977],{"type":52,"value":1878},{"type":46,"tag":131,"props":1979,"children":1980},{"style":564},[1981],{"type":52,"value":598},{"type":46,"tag":131,"props":1983,"children":1984},{"style":144},[1985],{"type":52,"value":1986},"0x00",{"type":46,"tag":131,"props":1988,"children":1989},{"style":564},[1990],{"type":52,"value":608},{"type":46,"tag":131,"props":1992,"children":1993},{"style":564},[1994],{"type":52,"value":1941},{"type":46,"tag":131,"props":1996,"children":1997},{"class":133,"line":812},[1998],{"type":46,"tag":131,"props":1999,"children":2000},{"style":564},[2001],{"type":52,"value":2002},"};\n",{"type":46,"tag":164,"props":2004,"children":2005},{},[],{"type":46,"tag":82,"props":2007,"children":2009},{"id":2008},"quoting-pattern",[2010],{"type":52,"value":2011},"Quoting Pattern",{"type":46,"tag":59,"props":2013,"children":2014},{},[2015,2017,2023],{"type":52,"value":2016},"Use the Quoter contract with ",{"type":46,"tag":65,"props":2018,"children":2020},{"className":2019},[],[2021],{"type":52,"value":2022},"callStatic",{"type":52,"value":2024}," — this simulates the swap offchain without executing it\nor spending gas.",{"type":46,"tag":120,"props":2026,"children":2028},{"className":546,"code":2027,"language":548,"meta":125,"style":125},"const quote = await quoterContract.callStatic.quoteExactInputSingle({\n  poolKey,\n  zeroForOne,\n  exactAmount: amountIn,\n  hookData: '0x00',\n});\n",[2029],{"type":46,"tag":65,"props":2030,"children":2031},{"__ignoreMap":125},[2032,2085,2096,2107,2127,2154],{"type":46,"tag":131,"props":2033,"children":2034},{"class":133,"line":134},[2035,2039,2044,2048,2053,2058,2062,2066,2070,2075,2080],{"type":46,"tag":131,"props":2036,"children":2037},{"style":681},[2038],{"type":52,"value":684},{"type":46,"tag":131,"props":2040,"children":2041},{"style":570},[2042],{"type":52,"value":2043}," quote ",{"type":46,"tag":131,"props":2045,"children":2046},{"style":564},[2047],{"type":52,"value":694},{"type":46,"tag":131,"props":2049,"children":2050},{"style":558},[2051],{"type":52,"value":2052}," await",{"type":46,"tag":131,"props":2054,"children":2055},{"style":570},[2056],{"type":52,"value":2057}," quoterContract",{"type":46,"tag":131,"props":2059,"children":2060},{"style":564},[2061],{"type":52,"value":534},{"type":46,"tag":131,"props":2063,"children":2064},{"style":570},[2065],{"type":52,"value":2022},{"type":46,"tag":131,"props":2067,"children":2068},{"style":564},[2069],{"type":52,"value":534},{"type":46,"tag":131,"props":2071,"children":2072},{"style":702},[2073],{"type":52,"value":2074},"quoteExactInputSingle",{"type":46,"tag":131,"props":2076,"children":2077},{"style":570},[2078],{"type":52,"value":2079},"(",{"type":46,"tag":131,"props":2081,"children":2082},{"style":564},[2083],{"type":52,"value":2084},"{\n",{"type":46,"tag":131,"props":2086,"children":2087},{"class":133,"line":616},[2088,2092],{"type":46,"tag":131,"props":2089,"children":2090},{"style":570},[2091],{"type":52,"value":1873},{"type":46,"tag":131,"props":2093,"children":2094},{"style":564},[2095],{"type":52,"value":1941},{"type":46,"tag":131,"props":2097,"children":2098},{"class":133,"line":667},[2099,2103],{"type":46,"tag":131,"props":2100,"children":2101},{"style":570},[2102],{"type":52,"value":1936},{"type":46,"tag":131,"props":2104,"children":2105},{"style":564},[2106],{"type":52,"value":1941},{"type":46,"tag":131,"props":2108,"children":2109},{"class":133,"line":677},[2110,2115,2119,2123],{"type":46,"tag":131,"props":2111,"children":2112},{"style":1870},[2113],{"type":52,"value":2114},"  exactAmount",{"type":46,"tag":131,"props":2116,"children":2117},{"style":564},[2118],{"type":52,"value":1878},{"type":46,"tag":131,"props":2120,"children":2121},{"style":570},[2122],{"type":52,"value":1428},{"type":46,"tag":131,"props":2124,"children":2125},{"style":564},[2126],{"type":52,"value":1941},{"type":46,"tag":131,"props":2128,"children":2129},{"class":133,"line":716},[2130,2134,2138,2142,2146,2150],{"type":46,"tag":131,"props":2131,"children":2132},{"style":1870},[2133],{"type":52,"value":1973},{"type":46,"tag":131,"props":2135,"children":2136},{"style":564},[2137],{"type":52,"value":1878},{"type":46,"tag":131,"props":2139,"children":2140},{"style":564},[2141],{"type":52,"value":598},{"type":46,"tag":131,"props":2143,"children":2144},{"style":144},[2145],{"type":52,"value":1986},{"type":46,"tag":131,"props":2147,"children":2148},{"style":564},[2149],{"type":52,"value":608},{"type":46,"tag":131,"props":2151,"children":2152},{"style":564},[2153],{"type":52,"value":1941},{"type":46,"tag":131,"props":2155,"children":2156},{"class":133,"line":761},[2157,2161,2165],{"type":46,"tag":131,"props":2158,"children":2159},{"style":564},[2160],{"type":52,"value":1442},{"type":46,"tag":131,"props":2162,"children":2163},{"style":570},[2164],{"type":52,"value":285},{"type":46,"tag":131,"props":2166,"children":2167},{"style":564},[2168],{"type":52,"value":613},{"type":46,"tag":59,"props":2170,"children":2171},{},[2172],{"type":52,"value":2173},"Four available methods:",{"type":46,"tag":89,"props":2175,"children":2176},{},[2177,2187,2198,2209],{"type":46,"tag":93,"props":2178,"children":2179},{},[2180,2185],{"type":46,"tag":65,"props":2181,"children":2183},{"className":2182},[],[2184],{"type":52,"value":2074},{"type":52,"value":2186}," — single-hop, exact input amount",{"type":46,"tag":93,"props":2188,"children":2189},{},[2190,2196],{"type":46,"tag":65,"props":2191,"children":2193},{"className":2192},[],[2194],{"type":52,"value":2195},"quoteExactInput",{"type":52,"value":2197}," — multi-hop, exact input amount",{"type":46,"tag":93,"props":2199,"children":2200},{},[2201,2207],{"type":46,"tag":65,"props":2202,"children":2204},{"className":2203},[],[2205],{"type":52,"value":2206},"quoteExactOutputSingle",{"type":52,"value":2208}," — single-hop, exact output amount",{"type":46,"tag":93,"props":2210,"children":2211},{},[2212,2218],{"type":46,"tag":65,"props":2213,"children":2215},{"className":2214},[],[2216],{"type":52,"value":2217},"quoteExactOutput",{"type":52,"value":2219}," — multi-hop, exact output amount",{"type":46,"tag":164,"props":2221,"children":2222},{},[],{"type":46,"tag":82,"props":2224,"children":2226},{"id":2225},"pool-state-reads-stateview",[2227],{"type":52,"value":2228},"Pool State Reads (StateView)",{"type":46,"tag":120,"props":2230,"children":2232},{"className":546,"code":2231,"language":548,"meta":125,"style":125},"import { Pool } from '@uniswap\u002Fv4-sdk';\n\nconst poolId = Pool.getPoolId(currency0, currency1, fee, tickSpacing, hooks);\n\nconst [slot0, liquidity] = await Promise.all([\n  stateViewContract.getSlot0(poolId),\n  stateViewContract.getLiquidity(poolId),\n]);\n\u002F\u002F slot0 → { sqrtPriceX96, tick, protocolFee, lpFee }\n",[2233],{"type":46,"tag":65,"props":2234,"children":2235},{"__ignoreMap":125},[2236,2276,2283,2354,2361,2419,2445,2469,2480],{"type":46,"tag":131,"props":2237,"children":2238},{"class":133,"line":134},[2239,2243,2247,2252,2256,2260,2264,2268,2272],{"type":46,"tag":131,"props":2240,"children":2241},{"style":558},[2242],{"type":52,"value":561},{"type":46,"tag":131,"props":2244,"children":2245},{"style":564},[2246],{"type":52,"value":567},{"type":46,"tag":131,"props":2248,"children":2249},{"style":570},[2250],{"type":52,"value":2251}," Pool",{"type":46,"tag":131,"props":2253,"children":2254},{"style":564},[2255],{"type":52,"value":588},{"type":46,"tag":131,"props":2257,"children":2258},{"style":558},[2259],{"type":52,"value":593},{"type":46,"tag":131,"props":2261,"children":2262},{"style":564},[2263],{"type":52,"value":598},{"type":46,"tag":131,"props":2265,"children":2266},{"style":144},[2267],{"type":52,"value":603},{"type":46,"tag":131,"props":2269,"children":2270},{"style":564},[2271],{"type":52,"value":608},{"type":46,"tag":131,"props":2273,"children":2274},{"style":564},[2275],{"type":52,"value":613},{"type":46,"tag":131,"props":2277,"children":2278},{"class":133,"line":616},[2279],{"type":46,"tag":131,"props":2280,"children":2281},{"emptyLinePlaceholder":671},[2282],{"type":52,"value":674},{"type":46,"tag":131,"props":2284,"children":2285},{"class":133,"line":667},[2286,2290,2295,2299,2303,2307,2312,2317,2321,2325,2329,2333,2337,2341,2345,2350],{"type":46,"tag":131,"props":2287,"children":2288},{"style":681},[2289],{"type":52,"value":684},{"type":46,"tag":131,"props":2291,"children":2292},{"style":570},[2293],{"type":52,"value":2294}," poolId ",{"type":46,"tag":131,"props":2296,"children":2297},{"style":564},[2298],{"type":52,"value":694},{"type":46,"tag":131,"props":2300,"children":2301},{"style":570},[2302],{"type":52,"value":2251},{"type":46,"tag":131,"props":2304,"children":2305},{"style":564},[2306],{"type":52,"value":534},{"type":46,"tag":131,"props":2308,"children":2309},{"style":702},[2310],{"type":52,"value":2311},"getPoolId",{"type":46,"tag":131,"props":2313,"children":2314},{"style":570},[2315],{"type":52,"value":2316},"(currency0",{"type":46,"tag":131,"props":2318,"children":2319},{"style":564},[2320],{"type":52,"value":578},{"type":46,"tag":131,"props":2322,"children":2323},{"style":570},[2324],{"type":52,"value":1896},{"type":46,"tag":131,"props":2326,"children":2327},{"style":564},[2328],{"type":52,"value":578},{"type":46,"tag":131,"props":2330,"children":2331},{"style":570},[2332],{"type":52,"value":1905},{"type":46,"tag":131,"props":2334,"children":2335},{"style":564},[2336],{"type":52,"value":578},{"type":46,"tag":131,"props":2338,"children":2339},{"style":570},[2340],{"type":52,"value":1914},{"type":46,"tag":131,"props":2342,"children":2343},{"style":564},[2344],{"type":52,"value":578},{"type":46,"tag":131,"props":2346,"children":2347},{"style":570},[2348],{"type":52,"value":2349}," hooks)",{"type":46,"tag":131,"props":2351,"children":2352},{"style":564},[2353],{"type":52,"value":613},{"type":46,"tag":131,"props":2355,"children":2356},{"class":133,"line":677},[2357],{"type":46,"tag":131,"props":2358,"children":2359},{"emptyLinePlaceholder":671},[2360],{"type":52,"value":674},{"type":46,"tag":131,"props":2362,"children":2363},{"class":133,"line":716},[2364,2368,2372,2377,2381,2386,2391,2396,2400,2405,2409,2414],{"type":46,"tag":131,"props":2365,"children":2366},{"style":681},[2367],{"type":52,"value":684},{"type":46,"tag":131,"props":2369,"children":2370},{"style":564},[2371],{"type":52,"value":1409},{"type":46,"tag":131,"props":2373,"children":2374},{"style":570},[2375],{"type":52,"value":2376},"slot0",{"type":46,"tag":131,"props":2378,"children":2379},{"style":564},[2380],{"type":52,"value":578},{"type":46,"tag":131,"props":2382,"children":2383},{"style":570},[2384],{"type":52,"value":2385}," liquidity",{"type":46,"tag":131,"props":2387,"children":2388},{"style":564},[2389],{"type":52,"value":2390},"]",{"type":46,"tag":131,"props":2392,"children":2393},{"style":564},[2394],{"type":52,"value":2395}," =",{"type":46,"tag":131,"props":2397,"children":2398},{"style":558},[2399],{"type":52,"value":2052},{"type":46,"tag":131,"props":2401,"children":2402},{"style":138},[2403],{"type":52,"value":2404}," Promise",{"type":46,"tag":131,"props":2406,"children":2407},{"style":564},[2408],{"type":52,"value":534},{"type":46,"tag":131,"props":2410,"children":2411},{"style":702},[2412],{"type":52,"value":2413},"all",{"type":46,"tag":131,"props":2415,"children":2416},{"style":570},[2417],{"type":52,"value":2418},"([\n",{"type":46,"tag":131,"props":2420,"children":2421},{"class":133,"line":761},[2422,2427,2431,2436,2441],{"type":46,"tag":131,"props":2423,"children":2424},{"style":570},[2425],{"type":52,"value":2426},"  stateViewContract",{"type":46,"tag":131,"props":2428,"children":2429},{"style":564},[2430],{"type":52,"value":534},{"type":46,"tag":131,"props":2432,"children":2433},{"style":702},[2434],{"type":52,"value":2435},"getSlot0",{"type":46,"tag":131,"props":2437,"children":2438},{"style":570},[2439],{"type":52,"value":2440},"(poolId)",{"type":46,"tag":131,"props":2442,"children":2443},{"style":564},[2444],{"type":52,"value":1941},{"type":46,"tag":131,"props":2446,"children":2447},{"class":133,"line":812},[2448,2452,2456,2461,2465],{"type":46,"tag":131,"props":2449,"children":2450},{"style":570},[2451],{"type":52,"value":2426},{"type":46,"tag":131,"props":2453,"children":2454},{"style":564},[2455],{"type":52,"value":534},{"type":46,"tag":131,"props":2457,"children":2458},{"style":702},[2459],{"type":52,"value":2460},"getLiquidity",{"type":46,"tag":131,"props":2462,"children":2463},{"style":570},[2464],{"type":52,"value":2440},{"type":46,"tag":131,"props":2466,"children":2467},{"style":564},[2468],{"type":52,"value":1941},{"type":46,"tag":131,"props":2470,"children":2471},{"class":133,"line":863},[2472,2476],{"type":46,"tag":131,"props":2473,"children":2474},{"style":570},[2475],{"type":52,"value":1447},{"type":46,"tag":131,"props":2477,"children":2478},{"style":564},[2479],{"type":52,"value":613},{"type":46,"tag":131,"props":2481,"children":2482},{"class":133,"line":871},[2483],{"type":46,"tag":131,"props":2484,"children":2485},{"style":1068},[2486],{"type":52,"value":2487},"\u002F\u002F slot0 → { sqrtPriceX96, tick, protocolFee, lpFee }\n",{"type":46,"tag":164,"props":2489,"children":2490},{},[],{"type":46,"tag":82,"props":2492,"children":2494},{"id":2493},"erc20-approval-flow-permit2",[2495],{"type":52,"value":2496},"ERC20 Approval Flow (Permit2)",{"type":46,"tag":59,"props":2498,"children":2499},{},[2500],{"type":52,"value":2501},"ERC20 swaps require two approvals — token -> Permit2, then Permit2 -> Universal Router:",{"type":46,"tag":120,"props":2503,"children":2505},{"className":546,"code":2504,"language":548,"meta":125,"style":125},"\u002F\u002F Step 1: Approve Permit2 on the token contract\nawait erc20Contract.approve(PERMIT2_ADDRESS, MaxUint256);\n\n\u002F\u002F Step 2: Approve Universal Router on Permit2\nawait permit2Contract.approve(tokenAddress, UNIVERSAL_ROUTER_ADDRESS, MAX_UINT160, deadline);\n",[2506],{"type":46,"tag":65,"props":2507,"children":2508},{"__ignoreMap":125},[2509,2517,2556,2563,2571],{"type":46,"tag":131,"props":2510,"children":2511},{"class":133,"line":134},[2512],{"type":46,"tag":131,"props":2513,"children":2514},{"style":1068},[2515],{"type":52,"value":2516},"\u002F\u002F Step 1: Approve Permit2 on the token contract\n",{"type":46,"tag":131,"props":2518,"children":2519},{"class":133,"line":616},[2520,2524,2529,2533,2538,2543,2547,2552],{"type":46,"tag":131,"props":2521,"children":2522},{"style":558},[2523],{"type":52,"value":1089},{"type":46,"tag":131,"props":2525,"children":2526},{"style":570},[2527],{"type":52,"value":2528}," erc20Contract",{"type":46,"tag":131,"props":2530,"children":2531},{"style":564},[2532],{"type":52,"value":534},{"type":46,"tag":131,"props":2534,"children":2535},{"style":702},[2536],{"type":52,"value":2537},"approve",{"type":46,"tag":131,"props":2539,"children":2540},{"style":570},[2541],{"type":52,"value":2542},"(PERMIT2_ADDRESS",{"type":46,"tag":131,"props":2544,"children":2545},{"style":564},[2546],{"type":52,"value":578},{"type":46,"tag":131,"props":2548,"children":2549},{"style":570},[2550],{"type":52,"value":2551}," MaxUint256)",{"type":46,"tag":131,"props":2553,"children":2554},{"style":564},[2555],{"type":52,"value":613},{"type":46,"tag":131,"props":2557,"children":2558},{"class":133,"line":667},[2559],{"type":46,"tag":131,"props":2560,"children":2561},{"emptyLinePlaceholder":671},[2562],{"type":52,"value":674},{"type":46,"tag":131,"props":2564,"children":2565},{"class":133,"line":677},[2566],{"type":46,"tag":131,"props":2567,"children":2568},{"style":1068},[2569],{"type":52,"value":2570},"\u002F\u002F Step 2: Approve Universal Router on Permit2\n",{"type":46,"tag":131,"props":2572,"children":2573},{"class":133,"line":716},[2574,2578,2583,2587,2591,2596,2600,2605,2609,2614,2618,2623],{"type":46,"tag":131,"props":2575,"children":2576},{"style":558},[2577],{"type":52,"value":1089},{"type":46,"tag":131,"props":2579,"children":2580},{"style":570},[2581],{"type":52,"value":2582}," permit2Contract",{"type":46,"tag":131,"props":2584,"children":2585},{"style":564},[2586],{"type":52,"value":534},{"type":46,"tag":131,"props":2588,"children":2589},{"style":702},[2590],{"type":52,"value":2537},{"type":46,"tag":131,"props":2592,"children":2593},{"style":570},[2594],{"type":52,"value":2595},"(tokenAddress",{"type":46,"tag":131,"props":2597,"children":2598},{"style":564},[2599],{"type":52,"value":578},{"type":46,"tag":131,"props":2601,"children":2602},{"style":570},[2603],{"type":52,"value":2604}," UNIVERSAL_ROUTER_ADDRESS",{"type":46,"tag":131,"props":2606,"children":2607},{"style":564},[2608],{"type":52,"value":578},{"type":46,"tag":131,"props":2610,"children":2611},{"style":570},[2612],{"type":52,"value":2613}," MAX_UINT160",{"type":46,"tag":131,"props":2615,"children":2616},{"style":564},[2617],{"type":52,"value":578},{"type":46,"tag":131,"props":2619,"children":2620},{"style":570},[2621],{"type":52,"value":2622}," deadline)",{"type":46,"tag":131,"props":2624,"children":2625},{"style":564},[2626],{"type":52,"value":613},{"type":46,"tag":59,"props":2628,"children":2629},{},[2630,2632,2638],{"type":52,"value":2631},"Native ETH swaps bypass both approvals — pass ",{"type":46,"tag":65,"props":2633,"children":2635},{"className":2634},[],[2636],{"type":52,"value":2637},"value",{"type":52,"value":2639}," in the transaction options instead.",{"type":46,"tag":164,"props":2641,"children":2642},{},[],{"type":46,"tag":82,"props":2644,"children":2646},{"id":2645},"position-management-positionmanager",[2647],{"type":52,"value":2648},"Position Management (PositionManager)",{"type":46,"tag":59,"props":2650,"children":2651},{},[2652,2654,2660],{"type":52,"value":2653},"All operations use ",{"type":46,"tag":65,"props":2655,"children":2657},{"className":2656},[],[2658],{"type":52,"value":2659},"PositionManager.multicall()",{"type":52,"value":1878},{"type":46,"tag":174,"props":2662,"children":2663},{},[2664,2680],{"type":46,"tag":178,"props":2665,"children":2666},{},[2667],{"type":46,"tag":182,"props":2668,"children":2669},{},[2670,2675],{"type":46,"tag":186,"props":2671,"children":2672},{},[2673],{"type":52,"value":2674},"Operation",{"type":46,"tag":186,"props":2676,"children":2677},{},[2678],{"type":52,"value":2679},"SDK Method",{"type":46,"tag":202,"props":2681,"children":2682},{},[2683,2700,2717,2734],{"type":46,"tag":182,"props":2684,"children":2685},{},[2686,2691],{"type":46,"tag":209,"props":2687,"children":2688},{},[2689],{"type":52,"value":2690},"Add liquidity",{"type":46,"tag":209,"props":2692,"children":2693},{},[2694],{"type":46,"tag":65,"props":2695,"children":2697},{"className":2696},[],[2698],{"type":52,"value":2699},"V4PositionManager.addCallParameters(position, options)",{"type":46,"tag":182,"props":2701,"children":2702},{},[2703,2708],{"type":46,"tag":209,"props":2704,"children":2705},{},[2706],{"type":52,"value":2707},"Remove liquidity",{"type":46,"tag":209,"props":2709,"children":2710},{},[2711],{"type":46,"tag":65,"props":2712,"children":2714},{"className":2713},[],[2715],{"type":52,"value":2716},"V4PositionManager.removeCallParameters(position, options)",{"type":46,"tag":182,"props":2718,"children":2719},{},[2720,2725],{"type":46,"tag":209,"props":2721,"children":2722},{},[2723],{"type":52,"value":2724},"Collect fees",{"type":46,"tag":209,"props":2726,"children":2727},{},[2728],{"type":46,"tag":65,"props":2729,"children":2731},{"className":2730},[],[2732],{"type":52,"value":2733},"V4PositionManager.collectCallParameters(options)",{"type":46,"tag":182,"props":2735,"children":2736},{},[2737,2742],{"type":46,"tag":209,"props":2738,"children":2739},{},[2740],{"type":52,"value":2741},"Create position",{"type":46,"tag":209,"props":2743,"children":2744},{},[2745],{"type":46,"tag":65,"props":2746,"children":2748},{"className":2747},[],[2749],{"type":52,"value":2750},"V4PositionManager.createCallParameters(position, options)",{"type":46,"tag":120,"props":2752,"children":2754},{"className":546,"code":2753,"language":548,"meta":125,"style":125},"const { calldata, value } = V4PositionManager.addCallParameters(position, {\n  slippageTolerance: new Percent(50, 10_000),\n  deadline: deadline.toString(),\n  tokenId: tokenId.toString(),\n  useNative: token0.isNative ? Ether.onChain(chainId) : undefined,\n  batchPermit,\n  hookData: '0x',\n});\n\nawait walletClient.writeContract({\n  address: POSITION_MANAGER_ADDRESS,\n  functionName: 'multicall',\n  args: [[calldata]],\n  value: BigInt(value),\n});\n",[2755],{"type":46,"tag":65,"props":2756,"children":2757},{"__ignoreMap":125},[2758,2818,2865,2898,2931,2990,3002,3030,3045,3052,3081,3102,3131,3152,3178],{"type":46,"tag":131,"props":2759,"children":2760},{"class":133,"line":134},[2761,2765,2769,2774,2778,2783,2787,2791,2796,2800,2805,2810,2814],{"type":46,"tag":131,"props":2762,"children":2763},{"style":681},[2764],{"type":52,"value":684},{"type":46,"tag":131,"props":2766,"children":2767},{"style":564},[2768],{"type":52,"value":567},{"type":46,"tag":131,"props":2770,"children":2771},{"style":570},[2772],{"type":52,"value":2773}," calldata",{"type":46,"tag":131,"props":2775,"children":2776},{"style":564},[2777],{"type":52,"value":578},{"type":46,"tag":131,"props":2779,"children":2780},{"style":570},[2781],{"type":52,"value":2782}," value ",{"type":46,"tag":131,"props":2784,"children":2785},{"style":564},[2786],{"type":52,"value":1442},{"type":46,"tag":131,"props":2788,"children":2789},{"style":564},[2790],{"type":52,"value":2395},{"type":46,"tag":131,"props":2792,"children":2793},{"style":570},[2794],{"type":52,"value":2795}," V4PositionManager",{"type":46,"tag":131,"props":2797,"children":2798},{"style":564},[2799],{"type":52,"value":534},{"type":46,"tag":131,"props":2801,"children":2802},{"style":702},[2803],{"type":52,"value":2804},"addCallParameters",{"type":46,"tag":131,"props":2806,"children":2807},{"style":570},[2808],{"type":52,"value":2809},"(position",{"type":46,"tag":131,"props":2811,"children":2812},{"style":564},[2813],{"type":52,"value":578},{"type":46,"tag":131,"props":2815,"children":2816},{"style":564},[2817],{"type":52,"value":1864},{"type":46,"tag":131,"props":2819,"children":2820},{"class":133,"line":616},[2821,2826,2830,2834,2839,2843,2848,2852,2857,2861],{"type":46,"tag":131,"props":2822,"children":2823},{"style":1870},[2824],{"type":52,"value":2825},"  slippageTolerance",{"type":46,"tag":131,"props":2827,"children":2828},{"style":564},[2829],{"type":52,"value":1878},{"type":46,"tag":131,"props":2831,"children":2832},{"style":564},[2833],{"type":52,"value":699},{"type":46,"tag":131,"props":2835,"children":2836},{"style":702},[2837],{"type":52,"value":2838}," Percent",{"type":46,"tag":131,"props":2840,"children":2841},{"style":570},[2842],{"type":52,"value":2079},{"type":46,"tag":131,"props":2844,"children":2845},{"style":1039},[2846],{"type":52,"value":2847},"50",{"type":46,"tag":131,"props":2849,"children":2850},{"style":564},[2851],{"type":52,"value":578},{"type":46,"tag":131,"props":2853,"children":2854},{"style":1039},[2855],{"type":52,"value":2856}," 10_000",{"type":46,"tag":131,"props":2858,"children":2859},{"style":570},[2860],{"type":52,"value":285},{"type":46,"tag":131,"props":2862,"children":2863},{"style":564},[2864],{"type":52,"value":1941},{"type":46,"tag":131,"props":2866,"children":2867},{"class":133,"line":667},[2868,2873,2877,2881,2885,2890,2894],{"type":46,"tag":131,"props":2869,"children":2870},{"style":1870},[2871],{"type":52,"value":2872},"  deadline",{"type":46,"tag":131,"props":2874,"children":2875},{"style":564},[2876],{"type":52,"value":1878},{"type":46,"tag":131,"props":2878,"children":2879},{"style":570},[2880],{"type":52,"value":1148},{"type":46,"tag":131,"props":2882,"children":2883},{"style":564},[2884],{"type":52,"value":534},{"type":46,"tag":131,"props":2886,"children":2887},{"style":702},[2888],{"type":52,"value":2889},"toString",{"type":46,"tag":131,"props":2891,"children":2892},{"style":570},[2893],{"type":52,"value":709},{"type":46,"tag":131,"props":2895,"children":2896},{"style":564},[2897],{"type":52,"value":1941},{"type":46,"tag":131,"props":2899,"children":2900},{"class":133,"line":677},[2901,2906,2910,2915,2919,2923,2927],{"type":46,"tag":131,"props":2902,"children":2903},{"style":1870},[2904],{"type":52,"value":2905},"  tokenId",{"type":46,"tag":131,"props":2907,"children":2908},{"style":564},[2909],{"type":52,"value":1878},{"type":46,"tag":131,"props":2911,"children":2912},{"style":570},[2913],{"type":52,"value":2914}," tokenId",{"type":46,"tag":131,"props":2916,"children":2917},{"style":564},[2918],{"type":52,"value":534},{"type":46,"tag":131,"props":2920,"children":2921},{"style":702},[2922],{"type":52,"value":2889},{"type":46,"tag":131,"props":2924,"children":2925},{"style":570},[2926],{"type":52,"value":709},{"type":46,"tag":131,"props":2928,"children":2929},{"style":564},[2930],{"type":52,"value":1941},{"type":46,"tag":131,"props":2932,"children":2933},{"class":133,"line":716},[2934,2939,2943,2948,2952,2957,2962,2967,2971,2976,2981,2985],{"type":46,"tag":131,"props":2935,"children":2936},{"style":1870},[2937],{"type":52,"value":2938},"  useNative",{"type":46,"tag":131,"props":2940,"children":2941},{"style":564},[2942],{"type":52,"value":1878},{"type":46,"tag":131,"props":2944,"children":2945},{"style":570},[2946],{"type":52,"value":2947}," token0",{"type":46,"tag":131,"props":2949,"children":2950},{"style":564},[2951],{"type":52,"value":534},{"type":46,"tag":131,"props":2953,"children":2954},{"style":570},[2955],{"type":52,"value":2956},"isNative ",{"type":46,"tag":131,"props":2958,"children":2959},{"style":564},[2960],{"type":52,"value":2961},"?",{"type":46,"tag":131,"props":2963,"children":2964},{"style":570},[2965],{"type":52,"value":2966}," Ether",{"type":46,"tag":131,"props":2968,"children":2969},{"style":564},[2970],{"type":52,"value":534},{"type":46,"tag":131,"props":2972,"children":2973},{"style":702},[2974],{"type":52,"value":2975},"onChain",{"type":46,"tag":131,"props":2977,"children":2978},{"style":570},[2979],{"type":52,"value":2980},"(chainId) ",{"type":46,"tag":131,"props":2982,"children":2983},{"style":564},[2984],{"type":52,"value":1878},{"type":46,"tag":131,"props":2986,"children":2987},{"style":564},[2988],{"type":52,"value":2989}," undefined,\n",{"type":46,"tag":131,"props":2991,"children":2992},{"class":133,"line":761},[2993,2998],{"type":46,"tag":131,"props":2994,"children":2995},{"style":570},[2996],{"type":52,"value":2997},"  batchPermit",{"type":46,"tag":131,"props":2999,"children":3000},{"style":564},[3001],{"type":52,"value":1941},{"type":46,"tag":131,"props":3003,"children":3004},{"class":133,"line":812},[3005,3009,3013,3017,3022,3026],{"type":46,"tag":131,"props":3006,"children":3007},{"style":1870},[3008],{"type":52,"value":1973},{"type":46,"tag":131,"props":3010,"children":3011},{"style":564},[3012],{"type":52,"value":1878},{"type":46,"tag":131,"props":3014,"children":3015},{"style":564},[3016],{"type":52,"value":598},{"type":46,"tag":131,"props":3018,"children":3019},{"style":144},[3020],{"type":52,"value":3021},"0x",{"type":46,"tag":131,"props":3023,"children":3024},{"style":564},[3025],{"type":52,"value":608},{"type":46,"tag":131,"props":3027,"children":3028},{"style":564},[3029],{"type":52,"value":1941},{"type":46,"tag":131,"props":3031,"children":3032},{"class":133,"line":863},[3033,3037,3041],{"type":46,"tag":131,"props":3034,"children":3035},{"style":564},[3036],{"type":52,"value":1442},{"type":46,"tag":131,"props":3038,"children":3039},{"style":570},[3040],{"type":52,"value":285},{"type":46,"tag":131,"props":3042,"children":3043},{"style":564},[3044],{"type":52,"value":613},{"type":46,"tag":131,"props":3046,"children":3047},{"class":133,"line":871},[3048],{"type":46,"tag":131,"props":3049,"children":3050},{"emptyLinePlaceholder":671},[3051],{"type":52,"value":674},{"type":46,"tag":131,"props":3053,"children":3054},{"class":133,"line":904},[3055,3059,3064,3068,3073,3077],{"type":46,"tag":131,"props":3056,"children":3057},{"style":558},[3058],{"type":52,"value":1089},{"type":46,"tag":131,"props":3060,"children":3061},{"style":570},[3062],{"type":52,"value":3063}," walletClient",{"type":46,"tag":131,"props":3065,"children":3066},{"style":564},[3067],{"type":52,"value":534},{"type":46,"tag":131,"props":3069,"children":3070},{"style":702},[3071],{"type":52,"value":3072},"writeContract",{"type":46,"tag":131,"props":3074,"children":3075},{"style":570},[3076],{"type":52,"value":2079},{"type":46,"tag":131,"props":3078,"children":3079},{"style":564},[3080],{"type":52,"value":2084},{"type":46,"tag":131,"props":3082,"children":3083},{"class":133,"line":976},[3084,3089,3093,3098],{"type":46,"tag":131,"props":3085,"children":3086},{"style":1870},[3087],{"type":52,"value":3088},"  address",{"type":46,"tag":131,"props":3090,"children":3091},{"style":564},[3092],{"type":52,"value":1878},{"type":46,"tag":131,"props":3094,"children":3095},{"style":570},[3096],{"type":52,"value":3097}," POSITION_MANAGER_ADDRESS",{"type":46,"tag":131,"props":3099,"children":3100},{"style":564},[3101],{"type":52,"value":1941},{"type":46,"tag":131,"props":3103,"children":3104},{"class":133,"line":984},[3105,3110,3114,3118,3123,3127],{"type":46,"tag":131,"props":3106,"children":3107},{"style":1870},[3108],{"type":52,"value":3109},"  functionName",{"type":46,"tag":131,"props":3111,"children":3112},{"style":564},[3113],{"type":52,"value":1878},{"type":46,"tag":131,"props":3115,"children":3116},{"style":564},[3117],{"type":52,"value":598},{"type":46,"tag":131,"props":3119,"children":3120},{"style":144},[3121],{"type":52,"value":3122},"multicall",{"type":46,"tag":131,"props":3124,"children":3125},{"style":564},[3126],{"type":52,"value":608},{"type":46,"tag":131,"props":3128,"children":3129},{"style":564},[3130],{"type":52,"value":1941},{"type":46,"tag":131,"props":3132,"children":3133},{"class":133,"line":1064},[3134,3139,3143,3148],{"type":46,"tag":131,"props":3135,"children":3136},{"style":1870},[3137],{"type":52,"value":3138},"  args",{"type":46,"tag":131,"props":3140,"children":3141},{"style":564},[3142],{"type":52,"value":1878},{"type":46,"tag":131,"props":3144,"children":3145},{"style":570},[3146],{"type":52,"value":3147}," [[calldata]]",{"type":46,"tag":131,"props":3149,"children":3150},{"style":564},[3151],{"type":52,"value":1941},{"type":46,"tag":131,"props":3153,"children":3154},{"class":133,"line":1074},[3155,3160,3164,3169,3174],{"type":46,"tag":131,"props":3156,"children":3157},{"style":1870},[3158],{"type":52,"value":3159},"  value",{"type":46,"tag":131,"props":3161,"children":3162},{"style":564},[3163],{"type":52,"value":1878},{"type":46,"tag":131,"props":3165,"children":3166},{"style":702},[3167],{"type":52,"value":3168}," BigInt",{"type":46,"tag":131,"props":3170,"children":3171},{"style":570},[3172],{"type":52,"value":3173},"(value)",{"type":46,"tag":131,"props":3175,"children":3176},{"style":564},[3177],{"type":52,"value":1941},{"type":46,"tag":131,"props":3179,"children":3180},{"class":133,"line":1083},[3181,3185,3189],{"type":46,"tag":131,"props":3182,"children":3183},{"style":564},[3184],{"type":52,"value":1442},{"type":46,"tag":131,"props":3186,"children":3187},{"style":570},[3188],{"type":52,"value":285},{"type":46,"tag":131,"props":3190,"children":3191},{"style":564},[3192],{"type":52,"value":613},{"type":46,"tag":164,"props":3194,"children":3195},{},[],{"type":46,"tag":82,"props":3197,"children":3199},{"id":3198},"strict-rules",[3200],{"type":52,"value":3201},"Strict Rules",{"type":46,"tag":89,"props":3203,"children":3204},{},[3205,3210,3215,3227,3239,3244,3256],{"type":46,"tag":93,"props":3206,"children":3207},{},[3208],{"type":52,"value":3209},"NEVER call PoolManager directly for swaps — ALWAYS route through Universal Router.",{"type":46,"tag":93,"props":3211,"children":3212},{},[3213],{"type":52,"value":3214},"NEVER assume contract addresses are the same across chains — look up from the deployments page.",{"type":46,"tag":93,"props":3216,"children":3217},{},[3218,3220,3225],{"type":52,"value":3219},"NEVER call Quoter onchain (gas expensive) — ALWAYS use ",{"type":46,"tag":65,"props":3221,"children":3223},{"className":3222},[],[3224],{"type":52,"value":2022},{"type":52,"value":3226}," for offchain simulation.",{"type":46,"tag":93,"props":3228,"children":3229},{},[3230,3232,3237],{"type":52,"value":3231},"NEVER skip Permit2 for ERC20 swaps — direct ",{"type":46,"tag":65,"props":3233,"children":3235},{"className":3234},[],[3236],{"type":52,"value":2537},{"type":52,"value":3238}," to Universal Router will not work.",{"type":46,"tag":93,"props":3240,"children":3241},{},[3242],{"type":52,"value":3243},"ALWAYS set a deadline on swaps and LP operations.",{"type":46,"tag":93,"props":3245,"children":3246},{},[3247,3249,3254],{"type":52,"value":3248},"ALWAYS handle native ETH with ",{"type":46,"tag":65,"props":3250,"children":3252},{"className":3251},[],[3253],{"type":52,"value":283},{"type":52,"value":3255},", not WETH, in v4 pool contexts.",{"type":46,"tag":93,"props":3257,"children":3258},{},[3259,3261,3267],{"type":52,"value":3260},"ALWAYS use ",{"type":46,"tag":65,"props":3262,"children":3264},{"className":3263},[],[3265],{"type":52,"value":3266},"Pool.getPoolId()",{"type":52,"value":3268}," to compute pool identifiers — do not construct manually.",{"type":46,"tag":164,"props":3270,"children":3271},{},[],{"type":46,"tag":82,"props":3273,"children":3275},{"id":3274},"links",[3276],{"type":52,"value":3277},"Links",{"type":46,"tag":89,"props":3279,"children":3280},{},[3281,3292,3303,3314,3325,3335],{"type":46,"tag":93,"props":3282,"children":3283},{},[3284,3286],{"type":52,"value":3285},"SDK overview: ",{"type":46,"tag":397,"props":3287,"children":3290},{"href":3288,"rel":3289},"https:\u002F\u002Fdocs.uniswap.org\u002Fsdk\u002Fv4\u002Foverview",[401],[3291],{"type":52,"value":3288},{"type":46,"tag":93,"props":3293,"children":3294},{},[3295,3297],{"type":52,"value":3296},"Swap guides: ",{"type":46,"tag":397,"props":3298,"children":3301},{"href":3299,"rel":3300},"https:\u002F\u002Fdocs.uniswap.org\u002Fsdk\u002Fv4\u002Fguides\u002Fswaps\u002Fquoting",[401],[3302],{"type":52,"value":3299},{"type":46,"tag":93,"props":3304,"children":3305},{},[3306,3308],{"type":52,"value":3307},"Liquidity guide: ",{"type":46,"tag":397,"props":3309,"children":3312},{"href":3310,"rel":3311},"https:\u002F\u002Fdocs.uniswap.org\u002Fsdk\u002Fv4\u002Fguides\u002Fliquidity\u002Fadd-remove-liquidity",[401],[3313],{"type":52,"value":3310},{"type":46,"tag":93,"props":3315,"children":3316},{},[3317,3319],{"type":52,"value":3318},"Pool data: ",{"type":46,"tag":397,"props":3320,"children":3323},{"href":3321,"rel":3322},"https:\u002F\u002Fdocs.uniswap.org\u002Fsdk\u002Fv4\u002Fguides\u002Fadvanced\u002Fpool-data",[401],[3324],{"type":52,"value":3321},{"type":46,"tag":93,"props":3326,"children":3327},{},[3328,3330],{"type":52,"value":3329},"Deployments: ",{"type":46,"tag":397,"props":3331,"children":3333},{"href":399,"rel":3332},[401],[3334],{"type":52,"value":399},{"type":46,"tag":93,"props":3336,"children":3337},{},[3338,3340],{"type":52,"value":3339},"npm: ",{"type":46,"tag":397,"props":3341,"children":3344},{"href":3342,"rel":3343},"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@uniswap\u002Fv4-sdk",[401],[3345],{"type":52,"value":3342},{"type":46,"tag":164,"props":3347,"children":3348},{},[],{"type":46,"tag":82,"props":3350,"children":3352},{"id":3351},"related-skills",[3353],{"type":52,"value":3354},"Related Skills",{"type":46,"tag":89,"props":3356,"children":3357},{},[3358,3368],{"type":46,"tag":93,"props":3359,"children":3360},{},[3361,3366],{"type":46,"tag":65,"props":3362,"children":3364},{"className":3363},[],[3365],{"type":52,"value":78},{"type":52,"value":3367}," — Trading API and v3-centric swap integration (not direct v4 SDK)",{"type":46,"tag":93,"props":3369,"children":3370},{},[3371,3376],{"type":46,"tag":65,"props":3372,"children":3374},{"className":3373},[],[3375],{"type":52,"value":70},{"type":52,"value":3377}," — Solidity hook contract generation (not app-layer SDK)",{"type":46,"tag":3379,"props":3380,"children":3381},"style",{},[3382],{"type":52,"value":3383},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3385,"total":1083},[3386,3401,3416,3427,3440,3453,3466],{"slug":3387,"name":3387,"fn":3388,"description":3389,"org":3390,"tags":3391,"stars":25,"repoUrl":26,"updatedAt":3400},"configurator","configure auction smart contract parameters","Configure CCA (Continuous Clearing Auction) smart contract parameters through an interactive bulk form flow. Use when user says \"configure auction\", \"cca auction\", \"setup token auction\", \"auction configuration\", \"continuous auction\", or mentions CCA contracts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3392,3395,3396,3399],{"name":3393,"slug":3394,"type":15},"Configuration","configuration",{"name":23,"slug":24,"type":15},{"name":3397,"slug":3398,"type":15},"Smart Contracts","smart-contracts",{"name":13,"slug":14,"type":15},"2026-07-17T06:08:08.974641",{"slug":3402,"name":3402,"fn":3403,"description":3404,"org":3405,"tags":3406,"stars":25,"repoUrl":26,"updatedAt":3415},"copy-trade","copy trades from crypto wallets","This skill should be used when the user asks to \"copy trades from\" a wallet, \"mirror a wallet\", \"follow this address\", set up \"copy trading\", \"track and replicate a trader\", or mirror another account's swaps bounded by guardrails. Watches a target wallet and mirrors its trades, filtered by chain, asset match, position size, and the follower's own portfolio state.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3407,3410,3411,3414],{"name":3408,"slug":3409,"type":15},"Automation","automation",{"name":23,"slug":24,"type":15},{"name":3412,"slug":3413,"type":15},"Trading","trading",{"name":13,"slug":14,"type":15},"2026-07-17T06:04:21.974052",{"slug":3417,"name":3417,"fn":3418,"description":3419,"org":3420,"tags":3421,"stars":25,"repoUrl":26,"updatedAt":3426},"dca-bot","automate dollar cost average token purchases","This skill should be used when the user wants to \"dca into\" a token, \"buy X every day\", set up a \"recurring buy\", \"dollar cost average\" into an asset, \"schedule a buy\", or \"auto-buy on a dip\". Buys a fixed amount into a token on a schedule, optionally only when a condition holds (for example only when ETH is below a price threshold). The host agent's scheduler wakes the skill on a cadence; each wake is one self-contained run.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3422,3423,3424,3425],{"name":3408,"slug":3409,"type":15},{"name":17,"slug":18,"type":15},{"name":3412,"slug":3413,"type":15},{"name":13,"slug":14,"type":15},"2026-07-17T06:05:37.160647",{"slug":3428,"name":3428,"fn":3429,"description":3430,"org":3431,"tags":3432,"stars":25,"repoUrl":26,"updatedAt":3439},"deployer","deploy Uniswap CCA smart contracts","Deploy CCA (Continuous Clearing Auction) smart contracts using the Factory pattern. Use when user says \"deploy auction\", \"deploy cca\", \"factory deployment\", or wants to deploy a configured auction.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3433,3436,3437,3438],{"name":3434,"slug":3435,"type":15},"Deployment","deployment",{"name":23,"slug":24,"type":15},{"name":3397,"slug":3398,"type":15},{"name":13,"slug":14,"type":15},"2026-07-17T06:08:09.661977",{"slug":3441,"name":3441,"fn":3442,"description":3443,"org":3444,"tags":3445,"stars":25,"repoUrl":26,"updatedAt":3452},"index-bot","create and rebalance asset portfolios","This skill should be used when the user asks to \"create an index\", \"build a basket of top assets\", \"buy a weighted basket\", \"make a portfolio of assets\", \"equal-weight basket\", \"rebalance my portfolio\", \"track the top N tokens\", or wants an automated, weighted multi-asset basket that buys in one pass and rebalances on a cadence. Builds the basket spec, delegates each buy and rebalance swap to the swap-integration Trading API flow, and records target weights in state.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3446,3447,3450,3451],{"name":23,"slug":24,"type":15},{"name":3448,"slug":3449,"type":15},"Portfolio Management","portfolio-management",{"name":3412,"slug":3413,"type":15},{"name":13,"slug":14,"type":15},"2026-07-17T06:04:22.328253",{"slug":3454,"name":3454,"fn":3455,"description":3456,"org":3457,"tags":3458,"stars":25,"repoUrl":26,"updatedAt":3465},"liquidity-planner","plan and create liquidity positions","This skill should be used when the user asks to \"provide liquidity\", \"create LP position\", \"add liquidity to pool\", \"become a liquidity provider\", \"create v3 position\", \"create v4 position\", \"concentrated liquidity\", \"set price range\", or mentions providing liquidity, LP positions, or liquidity pools on Uniswap. Generates deep links to create positions in the Uniswap interface.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3459,3460,3461,3464],{"name":17,"slug":18,"type":15},{"name":23,"slug":24,"type":15},{"name":3462,"slug":3463,"type":15},"Liquidity","liquidity",{"name":13,"slug":14,"type":15},"2026-07-17T06:08:09.315325",{"slug":3467,"name":3467,"fn":3468,"description":3469,"org":3470,"tags":3471,"stars":25,"repoUrl":26,"updatedAt":3478},"lp-integration","integrate Uniswap liquidity provisioning","Integrate Uniswap liquidity provisioning (LP) into applications via the LP REST API. Use when the user says \"LP API\", \"liquidity provisioning API\", \"provide liquidity programmatically\", \"create LP position via API\", \"add liquidity via API\", \"increase liquidity\", \"decrease liquidity\", \"remove liquidity\", \"claim LP fees\", \"collect LP fees\", \"manage LP positions in code\", or mentions building a backend, bot, or frontend that creates or manages Uniswap v2\u002Fv3\u002Fv4 liquidity positions through an API. Also use when debugging LP API calls (e.g. \u002Flp\u002Fcreate, \u002Flp\u002Fcheck_approval, \u002Flp\u002Fincrease, \u002Flp\u002Fdecrease, \u002Flp\u002Fclaim_fees), unexpected response fields, the approval or EIP-712 permit flow, or transaction-building errors for liquidity positions. For generating deep links to the Uniswap web app instead of calling the API, use the liquidity-planner skill; for using the Uniswap v4 SDK directly rather than the REST API, use the v4-sdk-integration skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3472,3475,3476,3477],{"name":3473,"slug":3474,"type":15},"API Development","api-development",{"name":17,"slug":18,"type":15},{"name":3462,"slug":3463,"type":15},{"name":13,"slug":14,"type":15},"2026-07-17T06:08:13.704465",{"items":3480,"total":3586},[3481,3488,3495,3502,3509,3516,3523,3530,3544,3555,3565,3576],{"slug":3387,"name":3387,"fn":3388,"description":3389,"org":3482,"tags":3483,"stars":25,"repoUrl":26,"updatedAt":3400},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3484,3485,3486,3487],{"name":3393,"slug":3394,"type":15},{"name":23,"slug":24,"type":15},{"name":3397,"slug":3398,"type":15},{"name":13,"slug":14,"type":15},{"slug":3402,"name":3402,"fn":3403,"description":3404,"org":3489,"tags":3490,"stars":25,"repoUrl":26,"updatedAt":3415},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3491,3492,3493,3494],{"name":3408,"slug":3409,"type":15},{"name":23,"slug":24,"type":15},{"name":3412,"slug":3413,"type":15},{"name":13,"slug":14,"type":15},{"slug":3417,"name":3417,"fn":3418,"description":3419,"org":3496,"tags":3497,"stars":25,"repoUrl":26,"updatedAt":3426},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3498,3499,3500,3501],{"name":3408,"slug":3409,"type":15},{"name":17,"slug":18,"type":15},{"name":3412,"slug":3413,"type":15},{"name":13,"slug":14,"type":15},{"slug":3428,"name":3428,"fn":3429,"description":3430,"org":3503,"tags":3504,"stars":25,"repoUrl":26,"updatedAt":3439},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3505,3506,3507,3508],{"name":3434,"slug":3435,"type":15},{"name":23,"slug":24,"type":15},{"name":3397,"slug":3398,"type":15},{"name":13,"slug":14,"type":15},{"slug":3441,"name":3441,"fn":3442,"description":3443,"org":3510,"tags":3511,"stars":25,"repoUrl":26,"updatedAt":3452},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3512,3513,3514,3515],{"name":23,"slug":24,"type":15},{"name":3448,"slug":3449,"type":15},{"name":3412,"slug":3413,"type":15},{"name":13,"slug":14,"type":15},{"slug":3454,"name":3454,"fn":3455,"description":3456,"org":3517,"tags":3518,"stars":25,"repoUrl":26,"updatedAt":3465},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3519,3520,3521,3522],{"name":17,"slug":18,"type":15},{"name":23,"slug":24,"type":15},{"name":3462,"slug":3463,"type":15},{"name":13,"slug":14,"type":15},{"slug":3467,"name":3467,"fn":3468,"description":3469,"org":3524,"tags":3525,"stars":25,"repoUrl":26,"updatedAt":3478},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3526,3527,3528,3529],{"name":3473,"slug":3474,"type":15},{"name":17,"slug":18,"type":15},{"name":3462,"slug":3463,"type":15},{"name":13,"slug":14,"type":15},{"slug":3531,"name":3531,"fn":3532,"description":3533,"org":3534,"tags":3535,"stars":25,"repoUrl":26,"updatedAt":3543},"pay-with-any-token","pay HTTP 402 challenges with Uniswap","Pay HTTP 402 payment challenges using tokens via the Tempo CLI and Uniswap Trading API. Use when the user encounters a 402 Payment Required response, needs to fulfill a machine payment, mentions \"MPP\", \"Tempo payment\", \"pay for API access\", \"HTTP 402\", \"x402\", \"machine payment protocol\", \"pay-with-any-token\", \"use tempo\", \"tempo request\", or \"tempo wallet\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3536,3537,3540,3541],{"name":17,"slug":18,"type":15},{"name":3538,"slug":3539,"type":15},"Payments","payments",{"name":3412,"slug":3413,"type":15},{"name":3542,"slug":3542,"type":15},"x402","2026-07-17T06:04:29.756086",{"slug":3545,"name":3545,"fn":3546,"description":3547,"org":3548,"tags":3549,"stars":25,"repoUrl":26,"updatedAt":3554},"pay-with-app","pay 402 payment challenges","Pay HTTP 402 payment challenges issued by OKX's Agent Payments Protocol (APP) on X Layer using tokens from any chain via the Uniswap Trading API. Use this skill whenever the user encounters a 402 challenge whose network resolves to X Layer (chain 196), mentions \"APP\", \"Agent Payments Protocol\", \"OKX agent payment\", \"OKX Onchain OS\", \"OKX agentic wallet\", \"x402 on X Layer\", \"USDT0\", \"x42\", \"Instant Payment\", \"Batch Payment\", \"pay for X Layer API\", or wants to pay an OKX-backed merchant. Even when the user does not explicitly say APP, prefer this skill for any 402 challenge whose network resolves to X Layer (chain 196). For 402 challenges on other chains (Ethereum, Base, Arbitrum, Tempo) use pay-with-any-token instead.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3550,3551,3552,3553],{"name":3473,"slug":3474,"type":15},{"name":3538,"slug":3539,"type":15},{"name":13,"slug":14,"type":15},{"name":3542,"slug":3542,"type":15},"2026-07-17T06:07:38.795043",{"slug":78,"name":78,"fn":3556,"description":3557,"org":3558,"tags":3559,"stars":25,"repoUrl":26,"updatedAt":3564},"integrate Uniswap swap functionality","Integrate Uniswap swaps into applications. Use when user says \"integrate swaps\", \"uniswap\", \"trading api\", \"add swap functionality\", \"build a swap frontend\", \"create a swap script\", \"smart contract swap integration\", \"use Universal Router\", \"Trading API\", or mentions swapping tokens via Uniswap.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3560,3561,3562,3563],{"name":3473,"slug":3474,"type":15},{"name":17,"slug":18,"type":15},{"name":3412,"slug":3413,"type":15},{"name":13,"slug":14,"type":15},"2026-07-17T06:08:10.354222",{"slug":3566,"name":3566,"fn":3567,"description":3568,"org":3569,"tags":3570,"stars":25,"repoUrl":26,"updatedAt":3575},"swap-planner","plan and execute token swaps","This skill should be used when the user asks to \"swap tokens\", \"trade ETH for USDC\", \"exchange tokens on Uniswap\", \"buy tokens\", \"sell tokens\", \"convert ETH to stablecoins\", \"find memecoins\", \"discover tokens\", \"research tokens\", \"tokens to buy\", \"find tokens to swap\", \"what should I buy\", or mentions swapping, trading, researching, discovering, buying, or exchanging tokens on any Uniswap-supported chain. Supports both known token swaps and token discovery workflows (discovery uses keyword search and web search — there is no live \"trending\" feed). Generates deep links to execute swaps in the Uniswap interface.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3571,3572,3573,3574],{"name":17,"slug":18,"type":15},{"name":3462,"slug":3463,"type":15},{"name":3412,"slug":3413,"type":15},{"name":13,"slug":14,"type":15},"2026-07-17T06:08:10.008152",{"slug":3577,"name":3577,"fn":3578,"description":3579,"org":3580,"tags":3581,"stars":25,"repoUrl":26,"updatedAt":3585},"v4-hook-generator","generate Uniswap v4 hook contracts","Generate Uniswap v4 hook contracts via OpenZeppelin MCP. Use when building custom swap logic, async swaps, hook-owned liquidity, custom curves, dynamic fees, MEV protection, limit orders, or oracle hooks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3582,3583,3584],{"name":23,"slug":24,"type":15},{"name":3397,"slug":3398,"type":15},{"name":13,"slug":14,"type":15},"2026-07-17T06:04:19.17669",19]