[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-uniswap-swap-integration":3,"mdc--3w73co-key":36,"related-repo-uniswap-swap-integration":27993,"related-org-uniswap-swap-integration":28084},{"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},"swap-integration","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},"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},"Trading","trading",{"name":23,"slug":24,"type":15},"API Development","api-development",215,"https:\u002F\u002Fgithub.com\u002FUniswap\u002Funiswap-ai","2026-07-17T06:08:10.354222","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\u002Fswap-integration","---\nname: swap-integration\ndescription: 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.\nallowed-tools: Read, Write, Edit, Glob, Grep, Bash(npm:*), Bash(npx:*), Bash(yarn:*), Bash(curl:*), WebFetch, Task(subagent_type:swap-integration-expert)\nmodel: opus\nlicense: MIT\nmetadata:\n  author: uniswap\n  version: '1.3.0'\n---\n\n# Swap Integration\n\nIntegrate Uniswap swaps into frontends, backends, and smart contracts.\n\n## Prerequisites\n\nThis skill assumes familiarity with viem basics (client setup, account management, contract interactions, transaction signing). Install the **uniswap-viem** plugin for comprehensive viem\u002Fwagmi guidance: `claude plugin add @uniswap\u002Funiswap-viem`\n\n## Quick Decision Guide\n\n| Building...                    | Use This Method               |\n| ------------------------------ | ----------------------------- |\n| Frontend with React\u002FNext.js    | Trading API                   |\n| Backend script or bot          | Trading API                   |\n| Smart contract integration     | Universal Router direct calls |\n| Need full control over routing | Universal Router SDK          |\n\n### Routing Types Quick Reference\n\n| Type     | Description                             | Chains                             |\n| -------- | --------------------------------------- | ---------------------------------- |\n| CLASSIC  | Standard AMM swap through Uniswap pools | All supported chains               |\n| DUTCH_V2 | UniswapX Dutch auction V2               | Ethereum, Arbitrum, Base, Unichain |\n| PRIORITY | MEV-protected priority order            | Base, Unichain                     |\n| WRAP     | ETH to WETH conversion                  | All                                |\n| UNWRAP   | WETH to ETH conversion                  | All                                |\n\nSee [Routing Types](#routing-types) for the complete list including DUTCH_V3, DUTCH_LIMIT, LIMIT_ORDER, BRIDGE, and QUICKROUTE.\n\n## Integration Methods\n\n### 1. Trading API (Recommended)\n\nBest for: Frontends, backends, scripts. Handles routing optimization automatically.\n\n**Base URL**: `https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1`\n\n**Authentication**: `x-api-key: \u003Cyour-api-key>` header required\n\n**Getting an API Key**: The Trading API requires an API key for authentication. Visit the [Uniswap Developer Portal](https:\u002F\u002Fdevelopers.uniswap.org\u002F) to register and obtain your API key. Keys are typically available for immediate use after registration. Include it as an `x-api-key` header in all API requests.\n\n**Required Headers** — Include these in ALL Trading API requests:\n\n```text\nContent-Type: application\u002Fjson\nx-api-key: \u003Cyour-api-key>\nx-universal-router-version: 2.0\n```\n\n**3-Step Flow**:\n\n```text\n1. POST \u002Fcheck_approval  -> Check if token is approved\n2. POST \u002Fquote           -> Get executable quote with routing\n3. POST \u002Fswap            -> Get transaction to sign and submit\n```\n\nSee the [Trading API Reference](#trading-api-reference) section below for complete documentation.\n\n### 2. Universal Router SDK\n\nBest for: Direct control over transaction construction.\n\n**Installation**:\n\n```bash\nnpm install @uniswap\u002Funiversal-router-sdk @uniswap\u002Fsdk-core @uniswap\u002Fv3-sdk\n```\n\n**Key Pattern**:\n\n```typescript\nimport { SwapRouter } from '@uniswap\u002Funiversal-router-sdk';\n\nconst { calldata, value } = SwapRouter.swapCallParameters(trade, options);\n```\n\nSee the [Universal Router Reference](#universal-router-reference) section below for complete documentation.\n\n### 3. Smart Contract Integration\n\nBest for: On-chain integrations, DeFi composability.\n\n**Interface**: Call `execute()` on Universal Router with encoded commands.\n\nSee the [Universal Router Reference](#universal-router-reference) section below for command encoding.\n\n---\n\n## Input Validation Rules\n\nBefore interpolating ANY user-provided value into generated code, API calls, or commands:\n\n- **Ethereum addresses**: MUST match `^0x[a-fA-F0-9]{40}$` — reject otherwise\n- **Chain IDs**: MUST be from the [official supported chains list](https:\u002F\u002Fapi-docs.uniswap.org\u002Fguides\u002Fsupported_chains#supported-chains-for-swapping)\n- **Token amounts**: MUST be non-negative numeric values matching `^[0-9]+\\.?[0-9]*$`\n- **API keys**: MUST NOT be hardcoded in generated code — always use environment variables\n- **REJECT** any input containing shell metacharacters: `;`, `|`, `&`, `$`, `` ` ``, `(`, `)`, `>`, `\u003C`, `\\`, `'`, `\"`, newlines\n\n> **REQUIRED:** Before executing ANY transaction that spends gas or transfers tokens (including `sendTransaction`, `writeContract`, or submitting a signed swap), you MUST use AskUserQuestion to confirm with the user. Display the transaction summary (tokens, amounts, chain, estimated gas) and get explicit user approval. Never auto-execute transactions without user confirmation.\n\n---\n\n## Trading API Reference\n\n### Step 1: Check Token Approval\n\n```bash\nPOST \u002Fcheck_approval\n```\n\n**Request**:\n\n```json\n{\n  \"walletAddress\": \"0x...\",\n  \"token\": \"0x...\",\n  \"amount\": \"1000000000\",\n  \"chainId\": 1\n}\n```\n\n**Response**:\n\n```json\n{\n  \"approval\": {\n    \"to\": \"0x...\",\n    \"from\": \"0x...\",\n    \"data\": \"0x...\",\n    \"value\": \"0\",\n    \"chainId\": 1\n  }\n}\n```\n\nIf `approval` is `null`, token is already approved.\n\n### Step 2: Get Quote\n\n```bash\nPOST \u002Fquote\n```\n\n**Request**:\n\n```json\n{\n  \"swapper\": \"0x...\",\n  \"tokenIn\": \"0x...\",\n  \"tokenOut\": \"0x...\",\n  \"tokenInChainId\": \"1\",\n  \"tokenOutChainId\": \"1\",\n  \"amount\": \"1000000000000000000\",\n  \"type\": \"EXACT_INPUT\",\n  \"slippageTolerance\": 0.5,\n  \"routingPreference\": \"BEST_PRICE\"\n}\n```\n\n> **Note**: `tokenInChainId` and `tokenOutChainId` must be **strings** (e.g., `\"1\"`), not numbers.\n\n**Key Parameters**:\n\n| Parameter           | Description                                                       |\n| ------------------- | ----------------------------------------------------------------- |\n| `type`              | `EXACT_INPUT` or `EXACT_OUTPUT`                                   |\n| `slippageTolerance` | 0-100 percentage                                                  |\n| `protocols`         | Optional: `[\"V2\", \"V3\", \"V4\"]`                                    |\n| `routingPreference` | `BEST_PRICE`, `FASTEST`, `CLASSIC`                                |\n| `autoSlippage`      | `true` to auto-calculate slippage (overrides `slippageTolerance`) |\n| `urgency`           | `normal` or `fast` — affects UniswapX auction timing              |\n\n**Response** — the shape differs by routing type. `BEST_PRICE` routing on Ethereum mainnet typically returns UniswapX (DUTCH_V2), not CLASSIC.\n\n**CLASSIC response**:\n\n```json\n{\n  \"routing\": \"CLASSIC\",\n  \"quote\": {\n    \"input\": { \"token\": \"0x...\", \"amount\": \"1000000000000000000\" },\n    \"output\": { \"token\": \"0x...\", \"amount\": \"999000000\" },\n    \"slippage\": 0.5,\n    \"route\": [],\n    \"gasFee\": \"5000000000000000\",\n    \"gasFeeUSD\": \"0.01\",\n    \"gasUseEstimate\": \"150000\"\n  },\n  \"permitData\": null\n}\n```\n\n**UniswapX (DUTCH_V2\u002FV3\u002FPRIORITY) response** — different `quote` shape, no `quote.output`:\n\n```json\n{\n  \"routing\": \"DUTCH_V2\",\n  \"quote\": {\n    \"orderInfo\": {\n      \"reactor\": \"0x...\",\n      \"swapper\": \"0x...\",\n      \"nonce\": \"...\",\n      \"deadline\": 1772031054,\n      \"cosigner\": \"0x...\",\n      \"input\": {\n        \"token\": \"0x...\",\n        \"startAmount\": \"1000000000000000000\",\n        \"endAmount\": \"1000000000000000000\"\n      },\n      \"outputs\": [\n        {\n          \"token\": \"0x...\",\n          \"startAmount\": \"999000000\",\n          \"endAmount\": \"994000000\",\n          \"recipient\": \"0x...\"\n        }\n      ],\n      \"chainId\": 1\n    },\n    \"encodedOrder\": \"0x...\",\n    \"orderHash\": \"0x...\"\n  },\n  \"permitData\": { \"domain\": {}, \"types\": {}, \"values\": {} }\n}\n```\n\n> **UniswapX output amount**: Use `quote.orderInfo.outputs[0].startAmount` for the best-case fill amount. The `endAmount` is the floor after full auction decay. There is no `quote.output.amount` on UniswapX responses — accessing it will throw at runtime.\n>\n> **Display tip**: For CLASSIC routes, use `gasFeeUSD` (a string with the USD value) for gas cost display. Do **not** manually convert `gasFee` (wei) using a hardcoded ETH price — this leads to wildly inaccurate estimates (e.g., ~$87 instead of ~$0.01). UniswapX routes are gasless for the swapper.\n\nSee [QuoteResponse TypeScript Types](#7-quoteresponse-typescript-types) for compile-time type safety across routing types.\n\n### Step 3: Execute Swap\n\n```bash\nPOST \u002Fswap\n```\n\n**Request** - Spread the quote response directly into the body:\n\n```typescript\n\u002F\u002F CORRECT: Spread the quote response, strip null fields\nconst quoteResponse = await fetchQuote(params);\n\n\u002F\u002F Always strip permitData\u002FpermitTransaction — handle them explicitly by routing type\nconst { permitData, permitTransaction, ...cleanQuote } = quoteResponse;\nconst swapRequest: Record\u003Cstring, unknown> = { ...cleanQuote };\n\nconst isUniswapX =\n  quoteResponse.routing === 'DUTCH_V2' ||\n  quoteResponse.routing === 'DUTCH_V3' ||\n  quoteResponse.routing === 'PRIORITY';\n\nif (isUniswapX) {\n  \u002F\u002F UniswapX: signature only — permitData must NOT go to \u002Fswap\n  if (permit2Signature) swapRequest.signature = permit2Signature;\n} else {\n  \u002F\u002F CLASSIC: both signature and permitData, or neither\n  if (permit2Signature && permitData && typeof permitData === 'object') {\n    swapRequest.signature = permit2Signature;\n    swapRequest.permitData = permitData;\n  }\n}\n```\n\n**Critical**: Do NOT wrap the quote in `{quote: quoteResponse}`. The API expects the quote response fields spread into the request body.\n\n**Permit2 Rules** (CLASSIC routes):\n\n- `signature` and `permitData` must BOTH be present, or BOTH be absent\n- Never set `permitData: null` — omit the field entirely\n- The quote response often includes `permitData: null` — strip this before sending\n\n**UniswapX Routes** (DUTCH_V2\u002FV3\u002FPRIORITY): `permitData` is used locally to sign the order but must be **excluded** from the `\u002Fswap` body. See [Signing vs. Submission Flow](#uniswapx-signing-vs-submission-flow).\n\n**Response** (ready-to-sign transaction):\n\n```json\n{\n  \"swap\": {\n    \"to\": \"0x...\",\n    \"from\": \"0x...\",\n    \"data\": \"0x...\",\n    \"value\": \"0\",\n    \"chainId\": 1,\n    \"gasLimit\": \"250000\"\n  }\n}\n```\n\n**Response Validation** - Always validate before broadcasting:\n\n```typescript\nfunction validateSwapResponse(response: SwapResponse): void {\n  if (!response.swap?.data || response.swap.data === '' || response.swap.data === '0x') {\n    throw new Error('swap.data is empty - quote may have expired');\n  }\n  if (!isAddress(response.swap.to) || !isAddress(response.swap.from)) {\n    throw new Error('Invalid address in swap response');\n  }\n}\n```\n\n### Supported Chains\n\nSee the [official supported chains list](https:\u002F\u002Fapi-docs.uniswap.org\u002Fguides\u002Fsupported_chains#supported-chains-for-swapping) for the current set of chains and their IDs.\n\n### Routing Types\n\n| Type        | Description                                   |\n| ----------- | --------------------------------------------- |\n| CLASSIC     | Standard AMM swap through Uniswap pools       |\n| DUTCH_V2    | UniswapX Dutch auction V2                     |\n| DUTCH_V3    | UniswapX Dutch auction V3                     |\n| PRIORITY    | MEV-protected priority order (Base, Unichain) |\n| DUTCH_LIMIT | UniswapX Dutch limit order                    |\n| LIMIT_ORDER | Limit order                                   |\n| WRAP        | ETH to WETH conversion                        |\n| UNWRAP      | WETH to ETH conversion                        |\n| BRIDGE      | Cross-chain bridge                            |\n| QUICKROUTE  | Fast approximation quote                      |\n\n**UniswapX availability**: UniswapX V2 orders are supported on Ethereum (1), Arbitrum (42161), Base (8453), and Unichain (130). The auction mechanism varies by chain — see [UniswapX Auction Types](#uniswapx-auction-types) below.\n\n---\n\n## Critical Implementation Notes\n\nThese are common pitfalls discovered during real-world Trading API integration. **Follow these rules to avoid on-chain reverts and API errors.**\n\n### 1. Swap Request Body Format\n\nThe `\u002Fswap` endpoint expects the quote response **spread into the request body**, not wrapped in a `quote` field.\n\n```typescript\n\u002F\u002F WRONG - causes \"quote does not match any of the allowed types\"\nconst badRequest = {\n  quote: quoteResponse, \u002F\u002F Don't wrap!\n  signature: '0x...',\n};\n\n\u002F\u002F CORRECT - spread the quote response\nconst goodRequest = {\n  ...quoteResponse,\n  signature: '0x...', \u002F\u002F Only if using Permit2\n};\n```\n\n### 2. Null Field Handling\n\nThe API rejects `permitData: null`. Additionally, `permitData` handling differs by routing type — see [Signing vs. Submission Flow](#uniswapx-signing-vs-submission-flow) for the full explanation.\n\n```typescript\nfunction prepareSwapRequest(quoteResponse: QuoteResponse, signature?: string): object {\n  \u002F\u002F Always strip permitData and permitTransaction from the spread — handle them explicitly\n  const { permitData, permitTransaction, ...cleanQuote } = quoteResponse;\n  const request: Record\u003Cstring, unknown> = { ...cleanQuote };\n\n  \u002F\u002F UniswapX (DUTCH_V2, DUTCH_V3, PRIORITY): permitData is for LOCAL signing only.\n  \u002F\u002F The \u002Fswap body must NOT include permitData — the order is encoded in\n  \u002F\u002F quote.encodedOrder. Only the signature is needed.\n  const isUniswapX =\n    quoteResponse.routing === 'DUTCH_V2' ||\n    quoteResponse.routing === 'DUTCH_V3' ||\n    quoteResponse.routing === 'PRIORITY';\n\n  if (isUniswapX) {\n    if (signature) request.signature = signature;\n  } else {\n    \u002F\u002F CLASSIC: both signature and permitData required together, or both omitted.\n    \u002F\u002F The Universal Router contract needs permitData to verify the Permit2\n    \u002F\u002F authorization on-chain.\n    if (signature && permitData && typeof permitData === 'object') {\n      request.signature = signature;\n      request.permitData = permitData;\n    }\n  }\n\n  return request;\n}\n```\n\n### 3. Permit2 Field Rules\n\nThe rules for `signature` and `permitData` in the `\u002Fswap` request body depend on the routing type:\n\n**CLASSIC routes**:\n\n| Scenario                   | `signature` | `permitData` |\n| -------------------------- | ----------- | ------------ |\n| Standard swap (no Permit2) | Omit        | Omit         |\n| Permit2 swap               | Required    | Required     |\n| **Invalid**                | Present     | Missing      |\n| **Invalid**                | Missing     | Present      |\n| **Invalid (API error)**    | Any         | `null`       |\n\n**UniswapX routes (DUTCH_V2\u002FV3\u002FPRIORITY)**:\n\n| Scenario       | `signature` | `permitData`             |\n| -------------- | ----------- | ------------------------ |\n| UniswapX order | Required    | **Omit** (do not send)   |\n| **Invalid**    | Any         | Present (schema rejects) |\n\n### 4. Pre-Broadcast Validation\n\nAlways validate the swap response before sending to the blockchain:\n\n```typescript\nimport { isAddress, isHex } from 'viem';\n\nfunction validateSwapBeforeBroadcast(swap: SwapTransaction): void {\n  \u002F\u002F 1. data must be non-empty hex\n  if (!swap.data || swap.data === '' || swap.data === '0x') {\n    throw new Error('swap.data is empty - this will revert on-chain. Re-fetch the quote.');\n  }\n\n  if (!isHex(swap.data)) {\n    throw new Error('swap.data is not valid hex');\n  }\n\n  \u002F\u002F 2. Addresses must be valid\n  if (!isAddress(swap.to)) {\n    throw new Error('swap.to is not a valid address');\n  }\n\n  if (!isAddress(swap.from)) {\n    throw new Error('swap.from is not a valid address');\n  }\n\n  \u002F\u002F 3. Value must be present (can be \"0\" for non-ETH swaps)\n  if (swap.value === undefined || swap.value === null) {\n    throw new Error('swap.value is missing');\n  }\n}\n```\n\n### 5. Browser Environment Setup\n\nWhen using viem\u002Fwagmi in browser environments, you need Node.js polyfills:\n\n**Install buffer polyfill**:\n\n```bash\nnpm install buffer\n```\n\n**Add to your entry file (before other imports)**:\n\n```typescript\n\u002F\u002F src\u002Fmain.tsx or src\u002Findex.tsx\nimport { Buffer } from 'buffer';\nglobalThis.Buffer = Buffer;\n\n\u002F\u002F Then your other imports\nimport React from 'react';\nimport { WagmiProvider } from 'wagmi';\n\u002F\u002F ...\n```\n\n**Vite configuration** (`vite.config.ts`):\n\n```typescript\nexport default defineConfig({\n  define: {\n    global: 'globalThis',\n  },\n  optimizeDeps: {\n    include: ['buffer'],\n  },\n  resolve: {\n    alias: {\n      buffer: 'buffer',\n    },\n  },\n});\n```\n\nWithout this setup, you'll see: `ReferenceError: Buffer is not defined`\n\n#### CORS Proxy Configuration\n\nThe Trading API does not support browser CORS preflight requests — `OPTIONS` requests return `415 Unsupported Media Type`. Direct `fetch()` calls from a browser will always fail. You **must** proxy API requests through your own server or dev server.\n\n**Vite dev proxy** (merge into the same `vite.config.ts` used for the Buffer polyfill above):\n\n```typescript\nexport default defineConfig({\n  server: {\n    proxy: {\n      '\u002Fapi\u002Funiswap': {\n        target: 'https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1',\n        changeOrigin: true,\n        rewrite: (path) => path.replace(\u002F^\\\u002Fapi\\\u002Funiswap\u002F, ''),\n      },\n    },\n  },\n});\n```\n\nThen use `\u002Fapi\u002Funiswap\u002Fquote` instead of the full URL in your frontend code.\n\n**Vercel production proxy** (`vercel.json`):\n\n```json\n{\n  \"rewrites\": [\n    {\n      \"source\": \"\u002Fapi\u002Funiswap\u002F:path*\",\n      \"destination\": \"https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1\u002F:path*\"\n    }\n  ]\n}\n```\n\n**Cloudflare Pages** (`public\u002F_redirects`):\n\n```text\n\u002Fapi\u002Funiswap\u002F* https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1\u002F:splat 200\n```\n\n**Next.js** (`next.config.js`):\n\n```javascript\nmodule.exports = {\n  async rewrites() {\n    return [\n      {\n        source: '\u002Fapi\u002Funiswap\u002F:path*',\n        destination: 'https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1\u002F:path*',\n      },\n    ];\n  },\n};\n```\n\nWithout a proxy, you'll see: `415 Unsupported Media Type` on preflight or CORS errors in the browser console.\n\n### 6. Quote Freshness\n\n- Quotes expire quickly (typically 30 seconds)\n- Always re-fetch if the user takes time to review\n- Use the `deadline` parameter to prevent stale execution\n- If `\u002Fswap` returns empty `data`, the quote likely expired\n\n### 7. QuoteResponse TypeScript Types\n\nThe quote response shape differs by routing type. Use a discriminated union on the `routing` field to get compile-time safety instead of casting to `any`:\n\n```typescript\ntype ClassicQuoteResponse = {\n  routing: 'CLASSIC' | 'WRAP' | 'UNWRAP';\n  quote: {\n    input: { token: string; amount: string };\n    output: { token: string; amount: string };\n    slippage: number;\n    route: unknown[];\n    gasFee: string;\n    gasFeeUSD: string;\n    gasUseEstimate: string;\n  };\n  permitData: Record\u003Cstring, unknown> | null;\n};\n\ntype DutchOrderOutput = {\n  token: string;\n  startAmount: string;\n  endAmount: string;\n  recipient: string;\n};\n\ntype UniswapXQuoteResponse = {\n  routing: 'DUTCH_V2' | 'DUTCH_V3' | 'PRIORITY';\n  quote: {\n    orderInfo: {\n      outputs: DutchOrderOutput[];\n      input: { token: string; startAmount: string; endAmount: string };\n      deadline: number;\n      nonce: string;\n    };\n    encodedOrder: string;\n    orderHash: string;\n  };\n  \u002F\u002F EIP-712 typed data — sign locally, do NOT send to \u002Fswap\n  permitData: Record\u003Cstring, unknown> | null;\n};\n\ntype QuoteResponse = ClassicQuoteResponse | UniswapXQuoteResponse;\n\n\u002F\u002F Type guard for routing-aware logic\nfunction isUniswapXQuote(q: QuoteResponse): q is UniswapXQuoteResponse {\n  return q.routing === 'DUTCH_V2' || q.routing === 'DUTCH_V3' || q.routing === 'PRIORITY';\n}\n\n\u002F\u002F Reading the output amount by routing type\nfunction getOutputAmount(q: QuoteResponse): string {\n  if (isUniswapXQuote(q)) {\n    const firstOutput = q.quote.orderInfo.outputs[0];\n    if (!firstOutput) throw new Error('UniswapX quote has no outputs');\n    \u002F\u002F startAmount = best-case fill; endAmount = floor after auction decay\n    return firstOutput.startAmount;\n  }\n  return q.quote.output.amount;\n}\n```\n\n---\n\n## Universal Router Reference\n\nThe Universal Router is a unified interface for swapping across Uniswap v2, v3, and v4.\n\n### Core Function\n\n```solidity\nfunction execute(\n    bytes calldata commands,\n    bytes[] calldata inputs,\n    uint256 deadline\n) external payable;\n```\n\n### Command Encoding\n\nEach command is a single byte:\n\n| Bits | Name     | Purpose                             |\n| ---- | -------- | ----------------------------------- |\n| 0    | flag     | Allow revert (1 = continue on fail) |\n| 1-2  | reserved | Use 0                               |\n| 3-7  | command  | Operation identifier                |\n\n### Swap Commands\n\n| Code | Command           | Description               |\n| ---- | ----------------- | ------------------------- |\n| 0x00 | V3_SWAP_EXACT_IN  | v3 swap with exact input  |\n| 0x01 | V3_SWAP_EXACT_OUT | v3 swap with exact output |\n| 0x08 | V2_SWAP_EXACT_IN  | v2 swap with exact input  |\n| 0x09 | V2_SWAP_EXACT_OUT | v2 swap with exact output |\n| 0x10 | V4_SWAP           | v4 swap                   |\n\n### Token Operations\n\n| Code | Command     | Description                |\n| ---- | ----------- | -------------------------- |\n| 0x04 | SWEEP       | Clear router token balance |\n| 0x05 | TRANSFER    | Send specific amount       |\n| 0x0b | WRAP_ETH    | ETH to WETH                |\n| 0x0c | UNWRAP_WETH | WETH to ETH                |\n\n### Permit2 Commands\n\n| Code | Command               | Description           |\n| ---- | --------------------- | --------------------- |\n| 0x02 | PERMIT2_TRANSFER_FROM | Single token transfer |\n| 0x03 | PERMIT2_PERMIT_BATCH  | Batch approval        |\n| 0x0a | PERMIT2_PERMIT        | Single approval       |\n\n### SDK Usage\n\n```typescript\nimport { SwapRouter, UniswapTrade } from '@uniswap\u002Funiversal-router-sdk'\nimport { TradeType } from '@uniswap\u002Fsdk-core'\n\n\u002F\u002F Build trade using v3-sdk or router-sdk\nconst trade = new RouterTrade({\n  v3Routes: [...],\n  tradeType: TradeType.EXACT_INPUT\n})\n\n\u002F\u002F Get calldata for Universal Router\nconst { calldata, value } = SwapRouter.swapCallParameters(trade, {\n  slippageTolerance: new Percent(50, 10000), \u002F\u002F 0.5%\n  recipient: walletAddress,\n  deadline: Math.floor(Date.now() \u002F 1000) + 1200 \u002F\u002F 20 min\n})\n\n\u002F\u002F Send transaction\nconst tx = await wallet.sendTransaction({\n  to: UNIVERSAL_ROUTER_ADDRESS,\n  data: calldata,\n  value\n})\n```\n\n---\n\n## Permit2 Integration\n\nPermit2 enables signature-based token approvals instead of on-chain approve() calls.\n\n### Approval Target: Permit2 vs Legacy (Direct to Router)\n\nThere are two approval paths. Choose based on your integration type:\n\n| Approach                    | Approve To       | Per-Swap Auth       | Best For                         |\n| --------------------------- | ---------------- | ------------------- | -------------------------------- |\n| **Permit2** (recommended)   | Permit2 contract | EIP-712 signature   | Frontends with user interaction  |\n| **Legacy** (direct approve) | Universal Router | None (pre-approved) | Backend services, smart accounts |\n\n**Permit2 flow** (frontend with user signing):\n\n1. User approves token to Permit2 contract (one-time)\n2. Each swap: user signs an EIP-712 permit message\n3. Universal Router uses the signature to transfer tokens via Permit2\n\n**Legacy flow** (backend services, ERC-4337 smart accounts):\n\n1. Approve token directly to the Universal Router address (one-time)\n2. Each swap: no additional authorization needed\n3. Simpler for automated systems that cannot sign EIP-712 messages\n\nUse the Trading API's `\u002Fcheck_approval` endpoint — it returns the correct approval target based on the routing type.\n\n### How It Works\n\n1. User approves Permit2 contract once (infinite approval)\n2. For each swap, user signs a message authorizing the transfer\n3. Universal Router uses signature to transfer tokens via Permit2\n\n### Two Modes\n\n| Mode              | Description                                |\n| ----------------- | ------------------------------------------ |\n| SignatureTransfer | One-time signature, no on-chain state      |\n| AllowanceTransfer | Time-limited allowance with on-chain state |\n\n### Integration Pattern\n\n```typescript\nimport { getContract, maxUint256, type Address } from 'viem';\n\nconst PERMIT2_ADDRESS = '0x000000000022D473030F116dDEE9F6B43aC78BA3' as const;\n\n\u002F\u002F Check if Permit2 approval exists\nconst allowance = await publicClient.readContract({\n  address: PERMIT2_ADDRESS,\n  abi: permit2Abi,\n  functionName: 'allowance',\n  args: [userAddress, tokenAddress, spenderAddress],\n});\n\n\u002F\u002F If not approved, user must approve Permit2 first\nif (allowance.amount \u003C requiredAmount) {\n  const hash = await walletClient.writeContract({\n    address: tokenAddress,\n    abi: erc20Abi,\n    functionName: 'approve',\n    args: [PERMIT2_ADDRESS, maxUint256],\n  });\n  await publicClient.waitForTransactionReceipt({ hash });\n}\n\n\u002F\u002F Then sign permit for the swap\nconst permitSignature = await signPermit(...);\n```\n\n---\n\n## UniswapX Auction Types\n\nUniswapX routes swaps through off-chain fillers who compete to execute orders at better prices than on-chain AMMs. The auction mechanism varies by chain.\n\n### Exclusive Dutch Auction (Ethereum)\n\n- Starts with an RFQ (Request for Quote) phase where permissioned quoters compete\n- Winning quoter receives **exclusive filling rights** for a set period\n- If the exclusive filler doesn't execute, falls back to an open Dutch auction where the price decays each block\n- Best for large swaps where MEV protection matters most\n\n**Trading API routing type**: `DUTCH_V2` or `DUTCH_V3`\n\n### Open Dutch Auction (Arbitrum)\n\n- Direct open auction without an RFQ phase\n- Fillers compete on-chain through a descending price mechanism\n- Leverages Arbitrum's fast 0.25-second block times for rapid price discovery\n- The **Unimind algorithm** sets auction parameters based on historical pair performance\n\n**Trading API routing type**: `DUTCH_V2`\n\n### Priority Gas Auction (Base, Unichain)\n\n- Fillers bid by submitting transactions with varying **priority fees** at a target block\n- Highest priority fee wins the right to fill the order\n- Exploits OP Stack's priority ordering mechanism\n- Effective on chains where block builders respect priority ordering\n\n**Trading API routing type**: `PRIORITY`\n\n### Key Properties (All Auction Types)\n\n- **Gasless for users** — fillers pay gas fees, incorporated into final pricing\n- **No cost on failure** — if a swap doesn't fill, the user pays nothing\n- **MEV protection** — auction mechanics prevent frontrunning and sandwich attacks\n- UniswapX V2 is currently supported on Ethereum (1), Arbitrum (42161), Base (8453), and Unichain (130)\n\nFor more detail, see the [UniswapX Auction Types documentation](https:\u002F\u002Fdocs.uniswap.org\u002Fcontracts\u002Funiswapx\u002Fauctiontypes).\n\n### UniswapX: Signing vs. Submission Flow\n\nThe `permitData` field in the quote response serves different purposes depending on the routing type. Conflating the two causes `RequestValidationError` on `\u002Fswap`.\n\n**CLASSIC flow** — `permitData` goes to the server:\n\n1. `\u002Fquote` returns `permitData` (EIP-712 typed data for the Permit2 allowance)\n2. User signs `permitData` locally → produces `signature`\n3. `\u002Fswap` body includes **both** `signature` and `permitData` — the Universal Router contract needs `permitData` to reconstruct and verify the Permit2 authorization on-chain\n\n**UniswapX flow (DUTCH_V2\u002FV3\u002FPRIORITY)** — `permitData` stays local:\n\n1. `\u002Fquote` returns `permitData` (EIP-712 typed data for the Dutch order)\n2. User signs `permitData` locally → produces `signature`\n3. `\u002Fswap` body includes **only** `signature` — the order is already fully encoded in `quote.encodedOrder`, which the off-chain filler system reads directly. Sending `permitData` to `\u002Fswap` causes a schema validation error.\n\n| Route Type           | Sign with `permitData`? | Send `permitData` to `\u002Fswap`? | Send `signature` to `\u002Fswap`? |\n| -------------------- | ----------------------- | ----------------------------- | ---------------------------- |\n| CLASSIC              | Yes                     | **Yes** (router needs it)     | Yes (if using Permit2)       |\n| DUTCH_V2\u002FV3\u002FPRIORITY | Yes                     | **No** (schema rejects it)    | Yes                          |\n\n> **Common mistake**: The API error `\"quote\" does not match any of the allowed types` often points at the `quote` field, but the actual cause is `permitData` being present for a UniswapX route. Strip `permitData` before submitting — see the routing-aware `prepareSwapRequest` in [Null Field Handling](#2-null-field-handling).\n\n---\n\n## Direct Universal Router Integration (SDK)\n\nFor direct Universal Router integration without the Trading API, use the SDK's high-level API.\n\n### Installation\n\n```bash\nnpm install @uniswap\u002Funiversal-router-sdk @uniswap\u002Frouter-sdk @uniswap\u002Fsdk-core @uniswap\u002Fv3-sdk viem\n```\n\n### High-Level Approach (Recommended)\n\nUse `RouterTrade` + `SwapRouter.swapCallParameters()` for automatic command building:\n\n```typescript\nimport { SwapRouter } from '@uniswap\u002Funiversal-router-sdk';\nimport { Trade as RouterTrade } from '@uniswap\u002Frouter-sdk';\nimport { TradeType, Percent } from '@uniswap\u002Fsdk-core';\nimport { Route as V3Route, Pool } from '@uniswap\u002Fv3-sdk';\n\n\u002F\u002F 1. Fetch pool data (required to construct routes)\n\u002F\u002F Using viem to read on-chain pool state:\nconst slot0 = await publicClient.readContract({\n  address: poolAddress,\n  abi: [\n    {\n      name: 'slot0',\n      type: 'function',\n      stateMutability: 'view',\n      inputs: [],\n      outputs: [\n        { name: 'sqrtPriceX96', type: 'uint160' },\n        { name: 'tick', type: 'int24' },\n        { name: 'observationIndex', type: 'uint16' },\n        { name: 'observationCardinality', type: 'uint16' },\n        { name: 'observationCardinalityNext', type: 'uint16' },\n        { name: 'feeProtocol', type: 'uint8' },\n        { name: 'unlocked', type: 'bool' },\n      ],\n    },\n  ],\n  functionName: 'slot0',\n});\nconst liquidity = await publicClient.readContract({\n  address: poolAddress,\n  abi: [\n    {\n      name: 'liquidity',\n      type: 'function',\n      stateMutability: 'view',\n      inputs: [],\n      outputs: [{ type: 'uint128' }],\n    },\n  ],\n  functionName: 'liquidity',\n});\n\nconst pool = new Pool(tokenIn, tokenOut, fee, slot0[0].toString(), liquidity.toString(), slot0[1]);\n\n\u002F\u002F 2. Build route and trade\nconst route = new V3Route([pool], tokenIn, tokenOut);\nconst trade = RouterTrade.createUncheckedTrade({\n  route,\n  inputAmount: amountIn,\n  outputAmount: expectedOut,\n  tradeType: TradeType.EXACT_INPUT,\n});\n\n\u002F\u002F 3. Get calldata\nconst { calldata, value } = SwapRouter.swapCallParameters(trade, {\n  slippageTolerance: new Percent(50, 10000), \u002F\u002F 0.5%\n  recipient: walletAddress,\n  deadline: Math.floor(Date.now() \u002F 1000) + 1800,\n});\n\n\u002F\u002F 4. Execute with viem\nconst hash = await walletClient.sendTransaction({\n  to: UNIVERSAL_ROUTER_ADDRESS,\n  data: calldata,\n  value: BigInt(value),\n});\n```\n\n### Low-Level Approach (Manual Commands)\n\nFor custom flows (fee collection, complex routing), use `RoutePlanner` directly:\n\n```typescript\nimport { RoutePlanner, CommandType, ROUTER_AS_RECIPIENT } from '@uniswap\u002Funiversal-router-sdk';\nimport { encodeRouteToPath } from '@uniswap\u002Fv3-sdk';\n\n\u002F\u002F Special addresses\nconst MSG_SENDER = '0x0000000000000000000000000000000000000001';\nconst ADDRESS_THIS = '0x0000000000000000000000000000000000000002';\n```\n\n### Example: V3 Swap with Manual Commands\n\n```typescript\nimport { RoutePlanner, CommandType } from '@uniswap\u002Funiversal-router-sdk';\nimport { encodeRouteToPath, Route } from '@uniswap\u002Fv3-sdk';\n\nasync function swapV3Manual(route: Route, amountIn: bigint, amountOutMin: bigint) {\n  const planner = new RoutePlanner();\n\n  \u002F\u002F Encode V3 path from route\n  const path = encodeRouteToPath(route, false); \u002F\u002F false = exactInput\n\n  planner.addCommand(CommandType.V3_SWAP_EXACT_IN, [\n    MSG_SENDER, \u002F\u002F recipient\n    amountIn, \u002F\u002F amountIn\n    amountOutMin, \u002F\u002F amountOutMin\n    path, \u002F\u002F encoded path\n    true, \u002F\u002F payerIsUser\n  ]);\n\n  return executeRoute(planner);\n}\n```\n\n### Example: ETH to Token (Wrap + Swap)\n\n```typescript\nasync function swapEthToToken(route: Route, amountIn: bigint, amountOutMin: bigint) {\n  const planner = new RoutePlanner();\n  const path = encodeRouteToPath(route, false);\n\n  \u002F\u002F 1. Wrap ETH to WETH (keep in router)\n  planner.addCommand(CommandType.WRAP_ETH, [ADDRESS_THIS, amountIn]);\n\n  \u002F\u002F 2. Swap WETH → Token (payerIsUser = false since using router's WETH)\n  planner.addCommand(CommandType.V3_SWAP_EXACT_IN, [\n    MSG_SENDER,\n    amountIn,\n    amountOutMin,\n    path,\n    false,\n  ]);\n\n  return executeRoute(planner, { value: amountIn });\n}\n```\n\n### Example: Token to ETH (Swap + Unwrap)\n\n```typescript\nasync function swapTokenToEth(route: Route, amountIn: bigint, amountOutMin: bigint) {\n  const planner = new RoutePlanner();\n  const path = encodeRouteToPath(route, false);\n\n  \u002F\u002F 1. Swap Token → WETH (output to router)\n  planner.addCommand(CommandType.V3_SWAP_EXACT_IN, [\n    ADDRESS_THIS,\n    amountIn,\n    amountOutMin,\n    path,\n    true,\n  ]);\n\n  \u002F\u002F 2. Unwrap WETH to ETH\n  planner.addCommand(CommandType.UNWRAP_WETH, [MSG_SENDER, amountOutMin]);\n\n  return executeRoute(planner);\n}\n```\n\n### Example: Fee Collection with PAY_PORTION\n\n```typescript\nasync function swapWithFee(route: Route, amountIn: bigint, feeRecipient: Address, feeBips: number) {\n  const planner = new RoutePlanner();\n  const path = encodeRouteToPath(route, false);\n  const outputToken = route.output.wrapped.address;\n\n  \u002F\u002F Swap to router (ADDRESS_THIS)\n  planner.addCommand(CommandType.V3_SWAP_EXACT_IN, [ADDRESS_THIS, amountIn, 0n, path, true]);\n\n  \u002F\u002F Pay fee portion (e.g., 30 bips = 0.3%)\n  planner.addCommand(CommandType.PAY_PORTION, [outputToken, feeRecipient, feeBips]);\n\n  \u002F\u002F Sweep remainder to user\n  planner.addCommand(CommandType.SWEEP, [outputToken, MSG_SENDER, 0n]);\n\n  return executeRoute(planner);\n}\n```\n\n### Execute Route Helper\n\n```typescript\nimport { UNIVERSAL_ROUTER_ADDRESS } from '@uniswap\u002Funiversal-router-sdk';\n\nconst ROUTER_ABI = [\n  {\n    name: 'execute',\n    type: 'function',\n    stateMutability: 'payable',\n    inputs: [\n      { name: 'commands', type: 'bytes' },\n      { name: 'inputs', type: 'bytes[]' },\n      { name: 'deadline', type: 'uint256' },\n    ],\n    outputs: [],\n  },\n] as const;\n\nasync function executeRoute(planner: RoutePlanner, options?: { value?: bigint }) {\n  const deadline = BigInt(Math.floor(Date.now() \u002F 1000) + 1800);\n  const routerAddress = UNIVERSAL_ROUTER_ADDRESS('2.0', 1); \u002F\u002F version, chainId\n\n  const { request } = await publicClient.simulateContract({\n    address: routerAddress,\n    abi: ROUTER_ABI,\n    functionName: 'execute',\n    args: [planner.commands, planner.inputs, deadline],\n    account,\n    value: options?.value ?? 0n,\n  });\n\n  return walletClient.writeContract(request);\n}\n```\n\n### Command Cheat Sheet\n\n| Command           | Parameters                                               |\n| ----------------- | -------------------------------------------------------- |\n| V3_SWAP_EXACT_IN  | (recipient, amountIn, amountOutMin, path, payerIsUser)   |\n| V3_SWAP_EXACT_OUT | (recipient, amountOut, amountInMax, path, payerIsUser)   |\n| V2_SWAP_EXACT_IN  | (recipient, amountIn, amountOutMin, path[], payerIsUser) |\n| V2_SWAP_EXACT_OUT | (recipient, amountOut, amountInMax, path[], payerIsUser) |\n| WRAP_ETH          | (recipient, amount)                                      |\n| UNWRAP_WETH       | (recipient, amountMin)                                   |\n| SWEEP             | (token, recipient, amountMin)                            |\n| TRANSFER          | (token, recipient, amount)                               |\n| PAY_PORTION       | (token, recipient, bips)                                 |\n\n### Fee Tiers\n\n| Tier   | Value | Percentage |\n| ------ | ----- | ---------- |\n| LOWEST | 100   | 0.01%      |\n| LOW    | 500   | 0.05%      |\n| MEDIUM | 3000  | 0.30%      |\n| HIGH   | 10000 | 1.00%      |\n\n---\n\n## Common Integration Patterns\n\n### Frontend Swap Hook (React)\n\n**Note**: Ensure you've set up the Buffer polyfill and CORS proxy (see Critical Implementation Notes). For wagmi v2 `useWalletClient()` pitfalls, see [wagmi v2 Integration Pitfalls](#wagmi-v2-integration-pitfalls) below.\n\n```typescript\nimport { isAddress, isHex } from 'viem';\nimport { useWalletClient } from 'wagmi';\n\n\u002F\u002F In browser apps, use your CORS proxy path instead (see CORS Proxy Configuration)\n\u002F\u002F e.g., const API_URL = '\u002Fapi\u002Funiswap';\nconst API_URL = 'https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1';\n\nfunction useSwap() {\n  const { data: walletClient } = useWalletClient();\n  const [quoteResponse, setQuoteResponse] = useState(null);\n  const [loading, setLoading] = useState(false);\n  const [error, setError] = useState(null);\n\n  const getQuote = async (params) => {\n    setLoading(true);\n    setError(null);\n    try {\n      const response = await fetch(`${API_URL}\u002Fquote`, {\n        method: 'POST',\n        headers: {\n          'Content-Type': 'application\u002Fjson',\n          'x-api-key': API_KEY,\n          'x-universal-router-version': '2.0',\n        },\n        body: JSON.stringify(params),\n      });\n      const data = await response.json();\n      if (!response.ok) throw new Error(data.detail || 'Quote failed');\n      setQuoteResponse(data); \u002F\u002F Store the FULL response, not just data.quote\n    } catch (err) {\n      setError(err.message);\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const executeSwap = async (permit2Signature?: string) => {\n    if (!quoteResponse) throw new Error('No quote available');\n\n    \u002F\u002F Strip null fields and spread quote response into body\n    const { permitData, permitTransaction, ...cleanQuote } = quoteResponse;\n    const swapRequest: Record\u003Cstring, unknown> = { ...cleanQuote };\n\n    \u002F\u002F CRITICAL: permitData handling differs by routing type\n    const isUniswapX =\n      quoteResponse.routing === 'DUTCH_V2' ||\n      quoteResponse.routing === 'DUTCH_V3' ||\n      quoteResponse.routing === 'PRIORITY';\n\n    if (isUniswapX) {\n      \u002F\u002F UniswapX: signature only — permitData must NOT be sent to \u002Fswap\n      \u002F\u002F (permitData is used locally to sign the order, not submitted to the API)\n      if (permit2Signature) swapRequest.signature = permit2Signature;\n    } else {\n      \u002F\u002F CLASSIC: both signature and permitData required together, or both omitted\n      if (permit2Signature && permitData && typeof permitData === 'object') {\n        swapRequest.signature = permit2Signature;\n        swapRequest.permitData = permitData;\n      }\n    }\n\n    const swapResponse = await fetch(`${API_URL}\u002Fswap`, {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application\u002Fjson',\n        'x-api-key': API_KEY,\n        'x-universal-router-version': '2.0',\n      },\n      body: JSON.stringify(swapRequest),\n    });\n    const data = await swapResponse.json();\n    if (!swapResponse.ok) throw new Error(data.detail || 'Swap failed');\n\n    \u002F\u002F CRITICAL: Validate response before broadcasting\n    if (!data.swap?.data || data.swap.data === '' || data.swap.data === '0x') {\n      throw new Error('Empty swap data - quote may have expired. Please refresh.');\n    }\n\n    \u002F\u002F Send transaction via wallet (walletClient from useWalletClient())\n    if (!walletClient) throw new Error('Wallet not connected');\n    const tx = await walletClient.sendTransaction(data.swap);\n    return tx;\n  };\n\n  return { quote: quoteResponse?.quote, loading, error, getQuote, executeSwap };\n}\n```\n\n### wagmi v2 Integration Pitfalls\n\nThe `useWalletClient()` hook from wagmi v2 can return `undefined` even when the wallet is connected — it resolves asynchronously. This causes \"wallet not connected\" errors at swap time. Additionally, the returned client needs a `chain` for `sendTransaction()` to work.\n\n**Recommended pattern** — use `@wagmi\u002Fcore` action functions at swap time instead of hooks:\n\n```typescript\nimport { getWalletClient, getPublicClient, switchChain } from '@wagmi\u002Fcore';\nimport type { Config } from 'wagmi';\n\nasync function executeSwapTransaction(\n  config: Config,\n  chainId: number,\n  swapTx: { to: string; data: string; value: string }\n) {\n  \u002F\u002F 1. Ensure the wallet is on the correct chain\n  await switchChain(config, { chainId });\n\n  \u002F\u002F 2. Get wallet client with explicit chainId — avoids undefined and missing chain\n  const walletClient = await getWalletClient(config, { chainId });\n\n  \u002F\u002F 3. Execute the swap\n  const hash = await walletClient.sendTransaction({\n    to: swapTx.to as `0x${string}`,\n    data: swapTx.data as `0x${string}`,\n    value: BigInt(swapTx.value || '0'),\n  });\n\n  \u002F\u002F 4. Wait for confirmation\n  const publicClient = getPublicClient(config, { chainId });\n  if (!publicClient) throw new Error(`No public client configured for chainId ${chainId}`);\n  return publicClient.waitForTransactionReceipt({ hash });\n}\n```\n\n**Why this matters**:\n\n- `useWalletClient()` hook returns `{ data: undefined }` during async resolution, even after `useAccount()` shows connected\n- `getWalletClient(config, { chainId })` is a promise that resolves only when the client is ready, and includes the chain\n- `switchChain()` prevents \"chain mismatch\" errors when the wallet is on a different network than the swap\n\n### Backend Swap Script (Node.js)\n\n```typescript\nimport { createWalletClient, createPublicClient, http, isAddress, isHex, type Address } from 'viem';\nimport { privateKeyToAccount } from 'viem\u002Faccounts';\nimport { mainnet } from 'viem\u002Fchains';\n\nconst API_URL = 'https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1';\nconst API_KEY = process.env.UNISWAP_API_KEY!;\n\nconst account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);\nconst publicClient = createPublicClient({ chain: mainnet, transport: http() });\nconst walletClient = createWalletClient({ account, chain: mainnet, transport: http() });\n\n\u002F\u002F Helper to prepare \u002Fswap request body — routing-aware permitData handling\nfunction prepareSwapRequest(quoteResponse: Record\u003Cstring, unknown>, signature?: string): object {\n  const { permitData, permitTransaction, ...cleanQuote } = quoteResponse;\n  const request: Record\u003Cstring, unknown> = { ...cleanQuote };\n\n  \u002F\u002F UniswapX (DUTCH_V2, DUTCH_V3, PRIORITY): permitData is for LOCAL signing only.\n  \u002F\u002F The \u002Fswap body must NOT include permitData — the order is already encoded\n  \u002F\u002F in quote.encodedOrder. Only the signature is needed.\n  const isUniswapX =\n    quoteResponse.routing === 'DUTCH_V2' ||\n    quoteResponse.routing === 'DUTCH_V3' ||\n    quoteResponse.routing === 'PRIORITY';\n\n  if (isUniswapX) {\n    if (signature) request.signature = signature;\n  } else {\n    \u002F\u002F CLASSIC: both signature and permitData required together, or both omitted\n    if (signature && permitData && typeof permitData === 'object') {\n      request.signature = signature;\n      request.permitData = permitData;\n    }\n  }\n\n  return request;\n}\n\n\u002F\u002F Validate swap response before broadcasting\nfunction validateSwap(swap: { data?: string; to?: string; from?: string }): void {\n  if (!swap?.data || swap.data === '' || swap.data === '0x') {\n    throw new Error('swap.data is empty - quote may have expired');\n  }\n  if (!isHex(swap.data)) {\n    throw new Error('swap.data is not valid hex');\n  }\n  if (!swap.to || !isAddress(swap.to) || !swap.from || !isAddress(swap.from)) {\n    throw new Error('Invalid address in swap response');\n  }\n}\n\nasync function executeSwap(tokenIn: Address, tokenOut: Address, amount: string, chainId: number) {\n  const ETH_ADDRESS = '0x0000000000000000000000000000000000000000';\n\n  \u002F\u002F 1. Check approval (for ERC20 tokens, not native ETH)\n  if (tokenIn !== ETH_ADDRESS) {\n    const approvalRes = await fetch(`${API_URL}\u002Fcheck_approval`, {\n      method: 'POST',\n      headers: {\n        'x-api-key': API_KEY,\n        'Content-Type': 'application\u002Fjson',\n        'x-universal-router-version': '2.0',\n      },\n      body: JSON.stringify({\n        walletAddress: account.address,\n        token: tokenIn,\n        amount,\n        chainId,\n      }),\n    });\n    const approvalData = await approvalRes.json();\n\n    if (approvalData.approval) {\n      const hash = await walletClient.sendTransaction({\n        to: approvalData.approval.to,\n        data: approvalData.approval.data,\n        value: BigInt(approvalData.approval.value || '0'),\n      });\n      await publicClient.waitForTransactionReceipt({ hash });\n    }\n  }\n\n  \u002F\u002F 2. Get quote\n  const quoteRes = await fetch(`${API_URL}\u002Fquote`, {\n    method: 'POST',\n    headers: {\n      'x-api-key': API_KEY,\n      'Content-Type': 'application\u002Fjson',\n      'x-universal-router-version': '2.0',\n    },\n    body: JSON.stringify({\n      swapper: account.address,\n      tokenIn,\n      tokenOut,\n      tokenInChainId: String(chainId),\n      tokenOutChainId: String(chainId),\n      amount,\n      type: 'EXACT_INPUT',\n      slippageTolerance: 0.5,\n    }),\n  });\n  const quoteResponse = await quoteRes.json(); \u002F\u002F Store FULL response\n\n  if (!quoteRes.ok) {\n    throw new Error(quoteResponse.detail || 'Quote failed');\n  }\n\n  \u002F\u002F 3. Execute swap - CRITICAL: spread quote response, strip null fields\n  const swapRequest = prepareSwapRequest(quoteResponse);\n\n  const swapRes = await fetch(`${API_URL}\u002Fswap`, {\n    method: 'POST',\n    headers: {\n      'x-api-key': API_KEY,\n      'Content-Type': 'application\u002Fjson',\n      'x-universal-router-version': '2.0',\n    },\n    body: JSON.stringify(swapRequest),\n  });\n  const swapData = await swapRes.json();\n\n  if (!swapRes.ok) {\n    throw new Error(swapData.detail || 'Swap request failed');\n  }\n\n  \u002F\u002F 4. Validate before broadcasting\n  validateSwap(swapData.swap);\n\n  const hash = await walletClient.sendTransaction({\n    to: swapData.swap.to,\n    data: swapData.swap.data,\n    value: BigInt(swapData.swap.value || '0'),\n  });\n  return publicClient.waitForTransactionReceipt({ hash });\n}\n```\n\n### Smart Contract Integration (Solidity)\n\n```solidity\n\u002F\u002F SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IUniversalRouter {\n    function execute(\n        bytes calldata commands,\n        bytes[] calldata inputs,\n        uint256 deadline\n    ) external payable;\n}\n\ninterface IERC20 {\n    function approve(address spender, uint256 amount) external returns (bool);\n}\n\ncontract SwapIntegration {\n    IUniversalRouter public immutable router;\n    address public constant PERMIT2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\n\n    constructor(address _router) {\n        router = IUniversalRouter(_router);\n    }\n\n    function swap(\n        bytes calldata commands,\n        bytes[] calldata inputs,\n        uint256 deadline\n    ) external payable {\n        router.execute{value: msg.value}(commands, inputs, deadline);\n    }\n\n    \u002F\u002F Approve token for Permit2 (one-time setup)\n    function approveToken(address token) external {\n        IERC20(token).approve(PERMIT2, type(uint256).max);\n    }\n}\n```\n\n---\n\n## Advanced Patterns\n\n### Smart Account Integration (ERC-4337)\n\nExecute Trading API swaps through ERC-4337 smart accounts with delegation. The pattern:\n\n1. Get swap calldata from Trading API (standard 3-step flow)\n2. Wrap the calldata in a delegation redemption execution\n3. Submit via **`bundlerClient.sendUserOperation()`** — always use the viem bundler client's\n   `sendUserOperation` method (not a custom wrapper function)\n\n> **REQUIRED:** The final submission step MUST use `bundlerClient.sendUserOperation()` from the\n> viem permissionless\u002Fbundler client. Do NOT write a custom `submitUserOperation` wrapper that\n> bypasses this — the bundler client handles UserOperation construction, gas estimation, and\n> submission automatically.\n\n```typescript\n\u002F\u002F After getting swap calldata from Trading API:\nconst { to, data, value } = swapResponse.swap;\n\n\u002F\u002F Wrap in delegation execution\nconst execution = {\n  target: to, \u002F\u002F Universal Router\n  callData: data,\n  value: BigInt(value),\n};\n\n\u002F\u002F Submit via bundler — use sendUserOperation directly\nconst userOpHash = await bundlerClient.sendUserOperation({\n  account: delegateSmartAccount,\n  calls: [\n    {\n      to: delegationManagerAddress,\n      data: encodeFunctionData({\n        abi: delegationManagerAbi,\n        functionName: 'redeemDelegations',\n        args: [[[signedDelegation]], [0], [[execution]]],\n      }),\n      value: execution.value,\n    },\n  ],\n});\n```\n\n**Key considerations**:\n\n- Use legacy approvals (direct to Universal Router) instead of Permit2 for smart accounts — see [Approval Target](#approval-target-permit2-vs-legacy-direct-to-router)\n- Add 20-30% gas buffer for bundler gas estimation\n- Handle bundler-specific error codes separately from standard transaction errors\n\nSee [Advanced Patterns Reference](.\u002Freferences\u002Fadvanced-patterns.md#smart-account-integration-erc-4337) for the complete implementation with types and error handling.\n\n### WETH Handling on L2s\n\nOn L2 chains (Base, Optimism, Arbitrum), swaps outputting ETH may deliver WETH instead of native ETH. Always check and unwrap after swaps:\n\n```typescript\nimport { parseAbi, type Address } from 'viem';\n\nconst WETH_ABI = parseAbi([\n  'function balanceOf(address) view returns (uint256)',\n  'function withdraw(uint256)',\n]);\n\nconst WETH_ADDRESSES: Record\u003Cnumber, Address> = {\n  1: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n  10: '0x4200000000000000000000000000000000000006',\n  8453: '0x4200000000000000000000000000000000000006',\n  42161: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',\n};\n\n\u002F\u002F After swap completes on an L2:\nconst wethAddress = WETH_ADDRESSES[chainId];\nif (wethAddress) {\n  const wethBalance = await publicClient.readContract({\n    address: wethAddress,\n    abi: WETH_ABI,\n    functionName: 'balanceOf',\n    args: [accountAddress],\n  });\n\n  if (wethBalance > 0n) {\n    const hash = await walletClient.writeContract({\n      address: wethAddress,\n      abi: WETH_ABI,\n      functionName: 'withdraw',\n      args: [wethBalance],\n    });\n    await publicClient.waitForTransactionReceipt({ hash });\n  }\n}\n```\n\nSee [Advanced Patterns Reference](.\u002Freferences\u002Fadvanced-patterns.md#weth-handling-on-l2s) for chain-specific WETH addresses and integration details.\n\n### Rate Limiting\n\nThe Trading API enforces rate limits (~10 requests\u002Fsecond per endpoint). For batch operations:\n\n- Add **100-200ms delays** between sequential API calls\n- Implement **exponential backoff with jitter** on 429 responses\n- **Cache approval results** — approvals rarely change between calls\n\n```typescript\n\u002F\u002F Exponential backoff for 429 responses\nasync function fetchWithRetry(url: string, init: RequestInit, maxRetries = 5): Promise\u003CResponse> {\n  for (let attempt = 0; attempt \u003C= maxRetries; attempt++) {\n    const response = await fetch(url, init);\n    if (response.status !== 429 && response.status \u003C 500) return response;\n    if (attempt === maxRetries) throw new Error(`Failed after ${maxRetries} retries`);\n\n    const delay = Math.min(200 * Math.pow(2, attempt) + Math.random() * 100, 10000);\n    await new Promise((resolve) => setTimeout(resolve, delay));\n  }\n  throw new Error('Unreachable');\n}\n```\n\nSee [Advanced Patterns Reference](.\u002Freferences\u002Fadvanced-patterns.md#rate-limiting-best-practices) for batch operation patterns and full retry implementation.\n\n---\n\n## Key Contract Addresses\n\n### Universal Router (v4)\n\nAddresses are per-chain. The legacy v1 address `0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD` is deprecated.\n\n| Chain       | ID      | Address                                      |\n| ----------- | ------- | -------------------------------------------- |\n| Ethereum    | 1       | `0x66a9893cc07d91d95644aedd05d03f95e1dba8af` |\n| Unichain    | 130     | `0xef740bf23acae26f6492b10de645d6b98dc8eaf3` |\n| Optimism    | 10      | `0x851116d9223fabed8e56c0e6b8ad0c31d98b3507` |\n| Base        | 8453    | `0x6ff5693b99212da76ad316178a184ab56d299b43` |\n| Arbitrum    | 42161   | `0xa51afafe0263b40edaef0df8781ea9aa03e381a3` |\n| Polygon     | 137     | `0x1095692a6237d83c6a72f3f5efedb9a670c49223` |\n| Blast       | 81457   | `0xeabbcb3e8e415306207ef514f660a3f820025be3` |\n| BNB         | 56      | `0x1906c1d672b88cd1b9ac7593301ca990f94eae07` |\n| Zora        | 7777777 | `0x3315ef7ca28db74abadc6c44570efdf06b04b020` |\n| World Chain | 480     | `0x8ac7bee993bb44dab564ea4bc9ea67bf9eb5e743` |\n| Avalanche   | 43114   | `0x94b75331ae8d42c1b61065089b7d48fe14aa73b7` |\n| Celo        | 42220   | `0xcb695bc5d3aa22cad1e6df07801b061a05a0233a` |\n| Soneium     | 1868    | `0x4cded7edf52c8aa5259a54ec6a3ce7c6d2a455df` |\n| Ink         | 57073   | `0x112908dac86e20e7241b0927479ea3bf935d1fa0` |\n| Monad       | 143     | `0x0d97dc33264bfc1c226207428a79b26757fb9dc3` |\n\nFor testnet addresses, see [Uniswap v4 Deployments](https:\u002F\u002Fdocs.uniswap.org\u002Fcontracts\u002Fv4\u002Fdeployments).\n\n### Permit2\n\n| Chain      | Address                                      |\n| ---------- | -------------------------------------------- |\n| All chains | `0x000000000022D473030F116dDEE9F6B43aC78BA3` |\n\n---\n\n## Troubleshooting\n\n### Common Issues\n\n| Issue                                                  | Solution                                                                                                                                                                                                     |\n| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| \"Insufficient allowance\"                               | Call \u002Fcheck_approval first and submit approval tx                                                                                                                                                            |\n| \"Quote expired\"                                        | Increase deadline or re-fetch quote                                                                                                                                                                          |\n| \"Slippage exceeded\"                                    | Increase slippageTolerance or retry                                                                                                                                                                          |\n| \"Insufficient liquidity\"                               | Try smaller amount or different route                                                                                                                                                                        |\n| **\"Buffer is not defined\"**                            | Add Buffer polyfill (see Critical Implementation Notes)                                                                                                                                                      |\n| **On-chain revert with empty data**                    | Validate `swap.data` is non-empty hex before broadcasting                                                                                                                                                    |\n| **\"permitData must be of type object\"**                | Strip `permitData: null` from request - omit field entirely                                                                                                                                                  |\n| **\"quote does not match any of the allowed types\"**    | Don't wrap quote in `{quote: ...}` — spread into request body. Also check: for UniswapX routes, `permitData` must be omitted from the `\u002Fswap` body (see [API Validation Errors](#api-validation-errors-400)) |\n| **Received WETH instead of ETH on L2**                 | Check and unwrap WETH after swap (see [WETH Handling on L2s](#weth-handling-on-l2s))                                                                                                                         |\n| **429 Too Many Requests**                              | Implement exponential backoff and add delays between batch requests (see [Rate Limiting](#rate-limiting))                                                                                                    |\n| **415 on OPTIONS preflight \u002F CORS error**              | Set up a CORS proxy (see [CORS Proxy Configuration](#cors-proxy-configuration) in Browser Environment Setup)                                                                                                 |\n| **walletClient is undefined when wallet is connected** | Use `getWalletClient()` from `@wagmi\u002Fcore` instead of the `useWalletClient()` hook (see [wagmi v2 Integration Pitfalls](#wagmi-v2-integration-pitfalls))                                                     |\n| **\"Please provide a chain with the chain argument\"**   | Pass `chainId` to `getWalletClient(config, { chainId })`                                                                                                                                                     |\n| **Chain mismatch error on swap**                       | Call `switchChain()` before `getWalletClient()` (see [wagmi v2 Integration Pitfalls](#wagmi-v2-integration-pitfalls))                                                                                        |\n\n### API Validation Errors (400)\n\n| Error Message                                     | Cause                                                                    | Fix                                                                                                        |\n| ------------------------------------------------- | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |\n| `\"permitData\" must be of type object`             | Sending `permitData: null`                                               | Omit the field entirely when null                                                                          |\n| `\"quote\" does not match any of the allowed types` | Wrapping quote in `{quote: quoteResponse}`                               | Spread quote response: `{...quoteResponse}`                                                                |\n| `\"quote\" does not match any of the allowed types` | Including `permitData` in a UniswapX (DUTCH_V2\u002FV3\u002FPRIORITY) `\u002Fswap` body | Omit `permitData` for UniswapX routes — see [Signing vs. Submission](#uniswapx-signing-vs-submission-flow) |\n| `signature and permitData must both be present`   | Including only one Permit2 field (CLASSIC routes only)                   | Include both or neither for CLASSIC; omit `permitData` for UniswapX                                        |\n\n### API Error Codes\n\n| Code | Meaning                                                  |\n| ---- | -------------------------------------------------------- |\n| 400  | Invalid request parameters (see validation errors above) |\n| 401  | Invalid or missing API key                               |\n| 404  | No route found for pair                                  |\n| 429  | Rate limit exceeded                                      |\n| 500  | API error - implement exponential backoff retry          |\n\n### Pre-Broadcast Checklist\n\nBefore sending a swap transaction to the blockchain:\n\n1. **Verify `swap.data`** is non-empty hex (not `''`, not `'0x'`)\n2. **Verify addresses** - `swap.to` and `swap.from` are valid\n3. **Check quote freshness** - Re-fetch if older than 30 seconds\n4. **Validate gas** - Apply 10-20% buffer to estimates\n5. **Confirm balance** - User has sufficient token balance\n\n---\n\n## Additional Resources\n\n- [Universal Router GitHub](https:\u002F\u002Fgithub.com\u002FUniswap\u002Funiversal-router)\n- [Uniswap Docs](https:\u002F\u002Fdocs.uniswap.org)\n- [SDK Monorepo](https:\u002F\u002Fgithub.com\u002FUniswap\u002Fsdks)\n- [Permit2 Patterns](https:\u002F\u002Fgithub.com\u002Fdragonfly-xyz\u002Fuseful-solidity-patterns\u002Ftree\u002Fmain\u002Fpatterns\u002Fpermit2)\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, Task(subagent_type:swap-integration-expert)","opus",{"author":8,"version":41},"1.3.0",{"type":43,"children":44},"root",[45,53,59,66,86,92,171,178,294,308,314,320,325,341,358,386,396,408,418,427,440,446,451,460,502,511,653,664,670,675,693,703,707,713,718,879,908,911,916,922,942,951,1118,1127,1353,1373,1379,1398,1406,1746,1787,1796,1974,1990,1999,2453,2477,3293,3360,3372,3378,3397,3406,3965,3983,3993,4037,4076,4085,4338,4348,4721,4727,4738,4743,4883,4901,4904,4910,4920,4926,4952,5138,5144,5169,5788,5794,5819,5828,5958,5967,6039,6045,6050,6736,6742,6747,6756,6779,6788,6970,6986,7220,7231,7238,7274,7291,7560,7573,7589,7727,7743,7752,7768,7924,7936,7942,7985,7991,8010,9391,9394,9399,9404,9410,9459,9465,9470,9550,9556,9672,9678,9774,9780,9858,9864,10408,10411,10417,10422,10428,10433,10521,10531,10550,10560,10578,10591,10597,10615,10621,10668,10674,11297,11300,11305,11310,11316,11346,11366,11372,11401,11414,11420,11450,11463,11469,11507,11520,11526,11551,11568,11643,11659,11737,11851,11908,11911,11917,11922,11927,11968,11974,11995,13874,13880,13893,14079,14085,14554,14560,14975,14981,15371,15377,15915,15921,16851,16857,16995,17001,17100,17103,17109,17115,17139,19615,19620,19655,19673,20467,20476,20527,20533,24360,24366,24646,24649,24655,24661,24666,24703,24730,25229,25238,25262,25274,25280,25285,26066,26077,26083,26088,26125,26760,26771,26774,26780,26786,26799,27155,27168,27173,27209,27212,27218,27224,27577,27583,27745,27751,27836,27842,27847,27935,27938,27944,27987],{"type":46,"tag":47,"props":48,"children":49},"element","h1",{"id":4},[50],{"type":51,"value":52},"text","Swap Integration",{"type":46,"tag":54,"props":55,"children":56},"p",{},[57],{"type":51,"value":58},"Integrate Uniswap swaps into frontends, backends, and smart contracts.",{"type":46,"tag":60,"props":61,"children":63},"h2",{"id":62},"prerequisites",[64],{"type":51,"value":65},"Prerequisites",{"type":46,"tag":54,"props":67,"children":68},{},[69,71,77,79],{"type":51,"value":70},"This skill assumes familiarity with viem basics (client setup, account management, contract interactions, transaction signing). Install the ",{"type":46,"tag":72,"props":73,"children":74},"strong",{},[75],{"type":51,"value":76},"uniswap-viem",{"type":51,"value":78}," plugin for comprehensive viem\u002Fwagmi guidance: ",{"type":46,"tag":80,"props":81,"children":83},"code",{"className":82},[],[84],{"type":51,"value":85},"claude plugin add @uniswap\u002Funiswap-viem",{"type":46,"tag":60,"props":87,"children":89},{"id":88},"quick-decision-guide",[90],{"type":51,"value":91},"Quick Decision Guide",{"type":46,"tag":93,"props":94,"children":95},"table",{},[96,115],{"type":46,"tag":97,"props":98,"children":99},"thead",{},[100],{"type":46,"tag":101,"props":102,"children":103},"tr",{},[104,110],{"type":46,"tag":105,"props":106,"children":107},"th",{},[108],{"type":51,"value":109},"Building...",{"type":46,"tag":105,"props":111,"children":112},{},[113],{"type":51,"value":114},"Use This Method",{"type":46,"tag":116,"props":117,"children":118},"tbody",{},[119,133,145,158],{"type":46,"tag":101,"props":120,"children":121},{},[122,128],{"type":46,"tag":123,"props":124,"children":125},"td",{},[126],{"type":51,"value":127},"Frontend with React\u002FNext.js",{"type":46,"tag":123,"props":129,"children":130},{},[131],{"type":51,"value":132},"Trading API",{"type":46,"tag":101,"props":134,"children":135},{},[136,141],{"type":46,"tag":123,"props":137,"children":138},{},[139],{"type":51,"value":140},"Backend script or bot",{"type":46,"tag":123,"props":142,"children":143},{},[144],{"type":51,"value":132},{"type":46,"tag":101,"props":146,"children":147},{},[148,153],{"type":46,"tag":123,"props":149,"children":150},{},[151],{"type":51,"value":152},"Smart contract integration",{"type":46,"tag":123,"props":154,"children":155},{},[156],{"type":51,"value":157},"Universal Router direct calls",{"type":46,"tag":101,"props":159,"children":160},{},[161,166],{"type":46,"tag":123,"props":162,"children":163},{},[164],{"type":51,"value":165},"Need full control over routing",{"type":46,"tag":123,"props":167,"children":168},{},[169],{"type":51,"value":170},"Universal Router SDK",{"type":46,"tag":172,"props":173,"children":175},"h3",{"id":174},"routing-types-quick-reference",[176],{"type":51,"value":177},"Routing Types Quick Reference",{"type":46,"tag":93,"props":179,"children":180},{},[181,202],{"type":46,"tag":97,"props":182,"children":183},{},[184],{"type":46,"tag":101,"props":185,"children":186},{},[187,192,197],{"type":46,"tag":105,"props":188,"children":189},{},[190],{"type":51,"value":191},"Type",{"type":46,"tag":105,"props":193,"children":194},{},[195],{"type":51,"value":196},"Description",{"type":46,"tag":105,"props":198,"children":199},{},[200],{"type":51,"value":201},"Chains",{"type":46,"tag":116,"props":203,"children":204},{},[205,223,241,259,277],{"type":46,"tag":101,"props":206,"children":207},{},[208,213,218],{"type":46,"tag":123,"props":209,"children":210},{},[211],{"type":51,"value":212},"CLASSIC",{"type":46,"tag":123,"props":214,"children":215},{},[216],{"type":51,"value":217},"Standard AMM swap through Uniswap pools",{"type":46,"tag":123,"props":219,"children":220},{},[221],{"type":51,"value":222},"All supported chains",{"type":46,"tag":101,"props":224,"children":225},{},[226,231,236],{"type":46,"tag":123,"props":227,"children":228},{},[229],{"type":51,"value":230},"DUTCH_V2",{"type":46,"tag":123,"props":232,"children":233},{},[234],{"type":51,"value":235},"UniswapX Dutch auction V2",{"type":46,"tag":123,"props":237,"children":238},{},[239],{"type":51,"value":240},"Ethereum, Arbitrum, Base, Unichain",{"type":46,"tag":101,"props":242,"children":243},{},[244,249,254],{"type":46,"tag":123,"props":245,"children":246},{},[247],{"type":51,"value":248},"PRIORITY",{"type":46,"tag":123,"props":250,"children":251},{},[252],{"type":51,"value":253},"MEV-protected priority order",{"type":46,"tag":123,"props":255,"children":256},{},[257],{"type":51,"value":258},"Base, Unichain",{"type":46,"tag":101,"props":260,"children":261},{},[262,267,272],{"type":46,"tag":123,"props":263,"children":264},{},[265],{"type":51,"value":266},"WRAP",{"type":46,"tag":123,"props":268,"children":269},{},[270],{"type":51,"value":271},"ETH to WETH conversion",{"type":46,"tag":123,"props":273,"children":274},{},[275],{"type":51,"value":276},"All",{"type":46,"tag":101,"props":278,"children":279},{},[280,285,290],{"type":46,"tag":123,"props":281,"children":282},{},[283],{"type":51,"value":284},"UNWRAP",{"type":46,"tag":123,"props":286,"children":287},{},[288],{"type":51,"value":289},"WETH to ETH conversion",{"type":46,"tag":123,"props":291,"children":292},{},[293],{"type":51,"value":276},{"type":46,"tag":54,"props":295,"children":296},{},[297,299,306],{"type":51,"value":298},"See ",{"type":46,"tag":300,"props":301,"children":303},"a",{"href":302},"#routing-types",[304],{"type":51,"value":305},"Routing Types",{"type":51,"value":307}," for the complete list including DUTCH_V3, DUTCH_LIMIT, LIMIT_ORDER, BRIDGE, and QUICKROUTE.",{"type":46,"tag":60,"props":309,"children":311},{"id":310},"integration-methods",[312],{"type":51,"value":313},"Integration Methods",{"type":46,"tag":172,"props":315,"children":317},{"id":316},"_1-trading-api-recommended",[318],{"type":51,"value":319},"1. Trading API (Recommended)",{"type":46,"tag":54,"props":321,"children":322},{},[323],{"type":51,"value":324},"Best for: Frontends, backends, scripts. Handles routing optimization automatically.",{"type":46,"tag":54,"props":326,"children":327},{},[328,333,335],{"type":46,"tag":72,"props":329,"children":330},{},[331],{"type":51,"value":332},"Base URL",{"type":51,"value":334},": ",{"type":46,"tag":80,"props":336,"children":338},{"className":337},[],[339],{"type":51,"value":340},"https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1",{"type":46,"tag":54,"props":342,"children":343},{},[344,349,350,356],{"type":46,"tag":72,"props":345,"children":346},{},[347],{"type":51,"value":348},"Authentication",{"type":51,"value":334},{"type":46,"tag":80,"props":351,"children":353},{"className":352},[],[354],{"type":51,"value":355},"x-api-key: \u003Cyour-api-key>",{"type":51,"value":357}," header required",{"type":46,"tag":54,"props":359,"children":360},{},[361,366,368,376,378,384],{"type":46,"tag":72,"props":362,"children":363},{},[364],{"type":51,"value":365},"Getting an API Key",{"type":51,"value":367},": The Trading API requires an API key for authentication. Visit the ",{"type":46,"tag":300,"props":369,"children":373},{"href":370,"rel":371},"https:\u002F\u002Fdevelopers.uniswap.org\u002F",[372],"nofollow",[374],{"type":51,"value":375},"Uniswap Developer Portal",{"type":51,"value":377}," to register and obtain your API key. Keys are typically available for immediate use after registration. Include it as an ",{"type":46,"tag":80,"props":379,"children":381},{"className":380},[],[382],{"type":51,"value":383},"x-api-key",{"type":51,"value":385}," header in all API requests.",{"type":46,"tag":54,"props":387,"children":388},{},[389,394],{"type":46,"tag":72,"props":390,"children":391},{},[392],{"type":51,"value":393},"Required Headers",{"type":51,"value":395}," — Include these in ALL Trading API requests:",{"type":46,"tag":397,"props":398,"children":403},"pre",{"className":399,"code":401,"language":51,"meta":402},[400],"language-text","Content-Type: application\u002Fjson\nx-api-key: \u003Cyour-api-key>\nx-universal-router-version: 2.0\n","",[404],{"type":46,"tag":80,"props":405,"children":406},{"__ignoreMap":402},[407],{"type":51,"value":401},{"type":46,"tag":54,"props":409,"children":410},{},[411,416],{"type":46,"tag":72,"props":412,"children":413},{},[414],{"type":51,"value":415},"3-Step Flow",{"type":51,"value":417},":",{"type":46,"tag":397,"props":419,"children":422},{"className":420,"code":421,"language":51,"meta":402},[400],"1. POST \u002Fcheck_approval  -> Check if token is approved\n2. POST \u002Fquote           -> Get executable quote with routing\n3. POST \u002Fswap            -> Get transaction to sign and submit\n",[423],{"type":46,"tag":80,"props":424,"children":425},{"__ignoreMap":402},[426],{"type":51,"value":421},{"type":46,"tag":54,"props":428,"children":429},{},[430,432,438],{"type":51,"value":431},"See the ",{"type":46,"tag":300,"props":433,"children":435},{"href":434},"#trading-api-reference",[436],{"type":51,"value":437},"Trading API Reference",{"type":51,"value":439}," section below for complete documentation.",{"type":46,"tag":172,"props":441,"children":443},{"id":442},"_2-universal-router-sdk",[444],{"type":51,"value":445},"2. Universal Router SDK",{"type":46,"tag":54,"props":447,"children":448},{},[449],{"type":51,"value":450},"Best for: Direct control over transaction construction.",{"type":46,"tag":54,"props":452,"children":453},{},[454,459],{"type":46,"tag":72,"props":455,"children":456},{},[457],{"type":51,"value":458},"Installation",{"type":51,"value":417},{"type":46,"tag":397,"props":461,"children":465},{"className":462,"code":463,"language":464,"meta":402,"style":402},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install @uniswap\u002Funiversal-router-sdk @uniswap\u002Fsdk-core @uniswap\u002Fv3-sdk\n","bash",[466],{"type":46,"tag":80,"props":467,"children":468},{"__ignoreMap":402},[469],{"type":46,"tag":470,"props":471,"children":474},"span",{"class":472,"line":473},"line",1,[475,481,487,492,497],{"type":46,"tag":470,"props":476,"children":478},{"style":477},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[479],{"type":51,"value":480},"npm",{"type":46,"tag":470,"props":482,"children":484},{"style":483},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[485],{"type":51,"value":486}," install",{"type":46,"tag":470,"props":488,"children":489},{"style":483},[490],{"type":51,"value":491}," @uniswap\u002Funiversal-router-sdk",{"type":46,"tag":470,"props":493,"children":494},{"style":483},[495],{"type":51,"value":496}," @uniswap\u002Fsdk-core",{"type":46,"tag":470,"props":498,"children":499},{"style":483},[500],{"type":51,"value":501}," @uniswap\u002Fv3-sdk\n",{"type":46,"tag":54,"props":503,"children":504},{},[505,510],{"type":46,"tag":72,"props":506,"children":507},{},[508],{"type":51,"value":509},"Key Pattern",{"type":51,"value":417},{"type":46,"tag":397,"props":512,"children":516},{"className":513,"code":514,"language":515,"meta":402,"style":402},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { SwapRouter } from '@uniswap\u002Funiversal-router-sdk';\n\nconst { calldata, value } = SwapRouter.swapCallParameters(trade, options);\n","typescript",[517],{"type":46,"tag":80,"props":518,"children":519},{"__ignoreMap":402},[520,571,581],{"type":46,"tag":470,"props":521,"children":522},{"class":472,"line":473},[523,529,535,541,546,551,556,561,566],{"type":46,"tag":470,"props":524,"children":526},{"style":525},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[527],{"type":51,"value":528},"import",{"type":46,"tag":470,"props":530,"children":532},{"style":531},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[533],{"type":51,"value":534}," {",{"type":46,"tag":470,"props":536,"children":538},{"style":537},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[539],{"type":51,"value":540}," SwapRouter",{"type":46,"tag":470,"props":542,"children":543},{"style":531},[544],{"type":51,"value":545}," }",{"type":46,"tag":470,"props":547,"children":548},{"style":525},[549],{"type":51,"value":550}," from",{"type":46,"tag":470,"props":552,"children":553},{"style":531},[554],{"type":51,"value":555}," '",{"type":46,"tag":470,"props":557,"children":558},{"style":483},[559],{"type":51,"value":560},"@uniswap\u002Funiversal-router-sdk",{"type":46,"tag":470,"props":562,"children":563},{"style":531},[564],{"type":51,"value":565},"'",{"type":46,"tag":470,"props":567,"children":568},{"style":531},[569],{"type":51,"value":570},";\n",{"type":46,"tag":470,"props":572,"children":574},{"class":472,"line":573},2,[575],{"type":46,"tag":470,"props":576,"children":578},{"emptyLinePlaceholder":577},true,[579],{"type":51,"value":580},"\n",{"type":46,"tag":470,"props":582,"children":584},{"class":472,"line":583},3,[585,591,595,600,605,610,615,620,624,629,635,640,644,649],{"type":46,"tag":470,"props":586,"children":588},{"style":587},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[589],{"type":51,"value":590},"const",{"type":46,"tag":470,"props":592,"children":593},{"style":531},[594],{"type":51,"value":534},{"type":46,"tag":470,"props":596,"children":597},{"style":537},[598],{"type":51,"value":599}," calldata",{"type":46,"tag":470,"props":601,"children":602},{"style":531},[603],{"type":51,"value":604},",",{"type":46,"tag":470,"props":606,"children":607},{"style":537},[608],{"type":51,"value":609}," value ",{"type":46,"tag":470,"props":611,"children":612},{"style":531},[613],{"type":51,"value":614},"}",{"type":46,"tag":470,"props":616,"children":617},{"style":531},[618],{"type":51,"value":619}," =",{"type":46,"tag":470,"props":621,"children":622},{"style":537},[623],{"type":51,"value":540},{"type":46,"tag":470,"props":625,"children":626},{"style":531},[627],{"type":51,"value":628},".",{"type":46,"tag":470,"props":630,"children":632},{"style":631},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[633],{"type":51,"value":634},"swapCallParameters",{"type":46,"tag":470,"props":636,"children":637},{"style":537},[638],{"type":51,"value":639},"(trade",{"type":46,"tag":470,"props":641,"children":642},{"style":531},[643],{"type":51,"value":604},{"type":46,"tag":470,"props":645,"children":646},{"style":537},[647],{"type":51,"value":648}," options)",{"type":46,"tag":470,"props":650,"children":651},{"style":531},[652],{"type":51,"value":570},{"type":46,"tag":54,"props":654,"children":655},{},[656,657,663],{"type":51,"value":431},{"type":46,"tag":300,"props":658,"children":660},{"href":659},"#universal-router-reference",[661],{"type":51,"value":662},"Universal Router Reference",{"type":51,"value":439},{"type":46,"tag":172,"props":665,"children":667},{"id":666},"_3-smart-contract-integration",[668],{"type":51,"value":669},"3. Smart Contract Integration",{"type":46,"tag":54,"props":671,"children":672},{},[673],{"type":51,"value":674},"Best for: On-chain integrations, DeFi composability.",{"type":46,"tag":54,"props":676,"children":677},{},[678,683,685,691],{"type":46,"tag":72,"props":679,"children":680},{},[681],{"type":51,"value":682},"Interface",{"type":51,"value":684},": Call ",{"type":46,"tag":80,"props":686,"children":688},{"className":687},[],[689],{"type":51,"value":690},"execute()",{"type":51,"value":692}," on Universal Router with encoded commands.",{"type":46,"tag":54,"props":694,"children":695},{},[696,697,701],{"type":51,"value":431},{"type":46,"tag":300,"props":698,"children":699},{"href":659},[700],{"type":51,"value":662},{"type":51,"value":702}," section below for command encoding.",{"type":46,"tag":704,"props":705,"children":706},"hr",{},[],{"type":46,"tag":60,"props":708,"children":710},{"id":709},"input-validation-rules",[711],{"type":51,"value":712},"Input Validation Rules",{"type":46,"tag":54,"props":714,"children":715},{},[716],{"type":51,"value":717},"Before interpolating ANY user-provided value into generated code, API calls, or commands:",{"type":46,"tag":719,"props":720,"children":721},"ul",{},[722,741,758,774,784],{"type":46,"tag":723,"props":724,"children":725},"li",{},[726,731,733,739],{"type":46,"tag":72,"props":727,"children":728},{},[729],{"type":51,"value":730},"Ethereum addresses",{"type":51,"value":732},": MUST match ",{"type":46,"tag":80,"props":734,"children":736},{"className":735},[],[737],{"type":51,"value":738},"^0x[a-fA-F0-9]{40}$",{"type":51,"value":740}," — reject otherwise",{"type":46,"tag":723,"props":742,"children":743},{},[744,749,751],{"type":46,"tag":72,"props":745,"children":746},{},[747],{"type":51,"value":748},"Chain IDs",{"type":51,"value":750},": MUST be from the ",{"type":46,"tag":300,"props":752,"children":755},{"href":753,"rel":754},"https:\u002F\u002Fapi-docs.uniswap.org\u002Fguides\u002Fsupported_chains#supported-chains-for-swapping",[372],[756],{"type":51,"value":757},"official supported chains list",{"type":46,"tag":723,"props":759,"children":760},{},[761,766,768],{"type":46,"tag":72,"props":762,"children":763},{},[764],{"type":51,"value":765},"Token amounts",{"type":51,"value":767},": MUST be non-negative numeric values matching ",{"type":46,"tag":80,"props":769,"children":771},{"className":770},[],[772],{"type":51,"value":773},"^[0-9]+\\.?[0-9]*$",{"type":46,"tag":723,"props":775,"children":776},{},[777,782],{"type":46,"tag":72,"props":778,"children":779},{},[780],{"type":51,"value":781},"API keys",{"type":51,"value":783},": MUST NOT be hardcoded in generated code — always use environment variables",{"type":46,"tag":723,"props":785,"children":786},{},[787,792,794,800,802,808,809,815,816,822,823,829,830,836,837,843,844,850,851,857,858,864,865,870,871,877],{"type":46,"tag":72,"props":788,"children":789},{},[790],{"type":51,"value":791},"REJECT",{"type":51,"value":793}," any input containing shell metacharacters: ",{"type":46,"tag":80,"props":795,"children":797},{"className":796},[],[798],{"type":51,"value":799},";",{"type":51,"value":801},", ",{"type":46,"tag":80,"props":803,"children":805},{"className":804},[],[806],{"type":51,"value":807},"|",{"type":51,"value":801},{"type":46,"tag":80,"props":810,"children":812},{"className":811},[],[813],{"type":51,"value":814},"&",{"type":51,"value":801},{"type":46,"tag":80,"props":817,"children":819},{"className":818},[],[820],{"type":51,"value":821},"$",{"type":51,"value":801},{"type":46,"tag":80,"props":824,"children":826},{"className":825},[],[827],{"type":51,"value":828},"`",{"type":51,"value":801},{"type":46,"tag":80,"props":831,"children":833},{"className":832},[],[834],{"type":51,"value":835},"(",{"type":51,"value":801},{"type":46,"tag":80,"props":838,"children":840},{"className":839},[],[841],{"type":51,"value":842},")",{"type":51,"value":801},{"type":46,"tag":80,"props":845,"children":847},{"className":846},[],[848],{"type":51,"value":849},">",{"type":51,"value":801},{"type":46,"tag":80,"props":852,"children":854},{"className":853},[],[855],{"type":51,"value":856},"\u003C",{"type":51,"value":801},{"type":46,"tag":80,"props":859,"children":861},{"className":860},[],[862],{"type":51,"value":863},"\\",{"type":51,"value":801},{"type":46,"tag":80,"props":866,"children":868},{"className":867},[],[869],{"type":51,"value":565},{"type":51,"value":801},{"type":46,"tag":80,"props":872,"children":874},{"className":873},[],[875],{"type":51,"value":876},"\"",{"type":51,"value":878},", newlines",{"type":46,"tag":880,"props":881,"children":882},"blockquote",{},[883],{"type":46,"tag":54,"props":884,"children":885},{},[886,891,893,899,900,906],{"type":46,"tag":72,"props":887,"children":888},{},[889],{"type":51,"value":890},"REQUIRED:",{"type":51,"value":892}," Before executing ANY transaction that spends gas or transfers tokens (including ",{"type":46,"tag":80,"props":894,"children":896},{"className":895},[],[897],{"type":51,"value":898},"sendTransaction",{"type":51,"value":801},{"type":46,"tag":80,"props":901,"children":903},{"className":902},[],[904],{"type":51,"value":905},"writeContract",{"type":51,"value":907},", or submitting a signed swap), you MUST use AskUserQuestion to confirm with the user. Display the transaction summary (tokens, amounts, chain, estimated gas) and get explicit user approval. Never auto-execute transactions without user confirmation.",{"type":46,"tag":704,"props":909,"children":910},{},[],{"type":46,"tag":60,"props":912,"children":914},{"id":913},"trading-api-reference",[915],{"type":51,"value":437},{"type":46,"tag":172,"props":917,"children":919},{"id":918},"step-1-check-token-approval",[920],{"type":51,"value":921},"Step 1: Check Token Approval",{"type":46,"tag":397,"props":923,"children":925},{"className":462,"code":924,"language":464,"meta":402,"style":402},"POST \u002Fcheck_approval\n",[926],{"type":46,"tag":80,"props":927,"children":928},{"__ignoreMap":402},[929],{"type":46,"tag":470,"props":930,"children":931},{"class":472,"line":473},[932,937],{"type":46,"tag":470,"props":933,"children":934},{"style":477},[935],{"type":51,"value":936},"POST",{"type":46,"tag":470,"props":938,"children":939},{"style":483},[940],{"type":51,"value":941}," \u002Fcheck_approval\n",{"type":46,"tag":54,"props":943,"children":944},{},[945,950],{"type":46,"tag":72,"props":946,"children":947},{},[948],{"type":51,"value":949},"Request",{"type":51,"value":417},{"type":46,"tag":397,"props":952,"children":956},{"className":953,"code":954,"language":955,"meta":402,"style":402},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"walletAddress\": \"0x...\",\n  \"token\": \"0x...\",\n  \"amount\": \"1000000000\",\n  \"chainId\": 1\n}\n","json",[957],{"type":46,"tag":80,"props":958,"children":959},{"__ignoreMap":402},[960,968,1008,1044,1082,1109],{"type":46,"tag":470,"props":961,"children":962},{"class":472,"line":473},[963],{"type":46,"tag":470,"props":964,"children":965},{"style":531},[966],{"type":51,"value":967},"{\n",{"type":46,"tag":470,"props":969,"children":970},{"class":472,"line":573},[971,976,981,985,989,994,999,1003],{"type":46,"tag":470,"props":972,"children":973},{"style":531},[974],{"type":51,"value":975},"  \"",{"type":46,"tag":470,"props":977,"children":978},{"style":587},[979],{"type":51,"value":980},"walletAddress",{"type":46,"tag":470,"props":982,"children":983},{"style":531},[984],{"type":51,"value":876},{"type":46,"tag":470,"props":986,"children":987},{"style":531},[988],{"type":51,"value":417},{"type":46,"tag":470,"props":990,"children":991},{"style":531},[992],{"type":51,"value":993}," \"",{"type":46,"tag":470,"props":995,"children":996},{"style":483},[997],{"type":51,"value":998},"0x...",{"type":46,"tag":470,"props":1000,"children":1001},{"style":531},[1002],{"type":51,"value":876},{"type":46,"tag":470,"props":1004,"children":1005},{"style":531},[1006],{"type":51,"value":1007},",\n",{"type":46,"tag":470,"props":1009,"children":1010},{"class":472,"line":583},[1011,1015,1020,1024,1028,1032,1036,1040],{"type":46,"tag":470,"props":1012,"children":1013},{"style":531},[1014],{"type":51,"value":975},{"type":46,"tag":470,"props":1016,"children":1017},{"style":587},[1018],{"type":51,"value":1019},"token",{"type":46,"tag":470,"props":1021,"children":1022},{"style":531},[1023],{"type":51,"value":876},{"type":46,"tag":470,"props":1025,"children":1026},{"style":531},[1027],{"type":51,"value":417},{"type":46,"tag":470,"props":1029,"children":1030},{"style":531},[1031],{"type":51,"value":993},{"type":46,"tag":470,"props":1033,"children":1034},{"style":483},[1035],{"type":51,"value":998},{"type":46,"tag":470,"props":1037,"children":1038},{"style":531},[1039],{"type":51,"value":876},{"type":46,"tag":470,"props":1041,"children":1042},{"style":531},[1043],{"type":51,"value":1007},{"type":46,"tag":470,"props":1045,"children":1047},{"class":472,"line":1046},4,[1048,1052,1057,1061,1065,1069,1074,1078],{"type":46,"tag":470,"props":1049,"children":1050},{"style":531},[1051],{"type":51,"value":975},{"type":46,"tag":470,"props":1053,"children":1054},{"style":587},[1055],{"type":51,"value":1056},"amount",{"type":46,"tag":470,"props":1058,"children":1059},{"style":531},[1060],{"type":51,"value":876},{"type":46,"tag":470,"props":1062,"children":1063},{"style":531},[1064],{"type":51,"value":417},{"type":46,"tag":470,"props":1066,"children":1067},{"style":531},[1068],{"type":51,"value":993},{"type":46,"tag":470,"props":1070,"children":1071},{"style":483},[1072],{"type":51,"value":1073},"1000000000",{"type":46,"tag":470,"props":1075,"children":1076},{"style":531},[1077],{"type":51,"value":876},{"type":46,"tag":470,"props":1079,"children":1080},{"style":531},[1081],{"type":51,"value":1007},{"type":46,"tag":470,"props":1083,"children":1085},{"class":472,"line":1084},5,[1086,1090,1095,1099,1103],{"type":46,"tag":470,"props":1087,"children":1088},{"style":531},[1089],{"type":51,"value":975},{"type":46,"tag":470,"props":1091,"children":1092},{"style":587},[1093],{"type":51,"value":1094},"chainId",{"type":46,"tag":470,"props":1096,"children":1097},{"style":531},[1098],{"type":51,"value":876},{"type":46,"tag":470,"props":1100,"children":1101},{"style":531},[1102],{"type":51,"value":417},{"type":46,"tag":470,"props":1104,"children":1106},{"style":1105},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1107],{"type":51,"value":1108}," 1\n",{"type":46,"tag":470,"props":1110,"children":1112},{"class":472,"line":1111},6,[1113],{"type":46,"tag":470,"props":1114,"children":1115},{"style":531},[1116],{"type":51,"value":1117},"}\n",{"type":46,"tag":54,"props":1119,"children":1120},{},[1121,1126],{"type":46,"tag":72,"props":1122,"children":1123},{},[1124],{"type":51,"value":1125},"Response",{"type":51,"value":417},{"type":46,"tag":397,"props":1128,"children":1130},{"className":953,"code":1129,"language":955,"meta":402,"style":402},"{\n  \"approval\": {\n    \"to\": \"0x...\",\n    \"from\": \"0x...\",\n    \"data\": \"0x...\",\n    \"value\": \"0\",\n    \"chainId\": 1\n  }\n}\n",[1131],{"type":46,"tag":80,"props":1132,"children":1133},{"__ignoreMap":402},[1134,1141,1166,1203,1239,1275,1312,1336,1345],{"type":46,"tag":470,"props":1135,"children":1136},{"class":472,"line":473},[1137],{"type":46,"tag":470,"props":1138,"children":1139},{"style":531},[1140],{"type":51,"value":967},{"type":46,"tag":470,"props":1142,"children":1143},{"class":472,"line":573},[1144,1148,1153,1157,1161],{"type":46,"tag":470,"props":1145,"children":1146},{"style":531},[1147],{"type":51,"value":975},{"type":46,"tag":470,"props":1149,"children":1150},{"style":587},[1151],{"type":51,"value":1152},"approval",{"type":46,"tag":470,"props":1154,"children":1155},{"style":531},[1156],{"type":51,"value":876},{"type":46,"tag":470,"props":1158,"children":1159},{"style":531},[1160],{"type":51,"value":417},{"type":46,"tag":470,"props":1162,"children":1163},{"style":531},[1164],{"type":51,"value":1165}," {\n",{"type":46,"tag":470,"props":1167,"children":1168},{"class":472,"line":583},[1169,1174,1179,1183,1187,1191,1195,1199],{"type":46,"tag":470,"props":1170,"children":1171},{"style":531},[1172],{"type":51,"value":1173},"    \"",{"type":46,"tag":470,"props":1175,"children":1176},{"style":477},[1177],{"type":51,"value":1178},"to",{"type":46,"tag":470,"props":1180,"children":1181},{"style":531},[1182],{"type":51,"value":876},{"type":46,"tag":470,"props":1184,"children":1185},{"style":531},[1186],{"type":51,"value":417},{"type":46,"tag":470,"props":1188,"children":1189},{"style":531},[1190],{"type":51,"value":993},{"type":46,"tag":470,"props":1192,"children":1193},{"style":483},[1194],{"type":51,"value":998},{"type":46,"tag":470,"props":1196,"children":1197},{"style":531},[1198],{"type":51,"value":876},{"type":46,"tag":470,"props":1200,"children":1201},{"style":531},[1202],{"type":51,"value":1007},{"type":46,"tag":470,"props":1204,"children":1205},{"class":472,"line":1046},[1206,1210,1215,1219,1223,1227,1231,1235],{"type":46,"tag":470,"props":1207,"children":1208},{"style":531},[1209],{"type":51,"value":1173},{"type":46,"tag":470,"props":1211,"children":1212},{"style":477},[1213],{"type":51,"value":1214},"from",{"type":46,"tag":470,"props":1216,"children":1217},{"style":531},[1218],{"type":51,"value":876},{"type":46,"tag":470,"props":1220,"children":1221},{"style":531},[1222],{"type":51,"value":417},{"type":46,"tag":470,"props":1224,"children":1225},{"style":531},[1226],{"type":51,"value":993},{"type":46,"tag":470,"props":1228,"children":1229},{"style":483},[1230],{"type":51,"value":998},{"type":46,"tag":470,"props":1232,"children":1233},{"style":531},[1234],{"type":51,"value":876},{"type":46,"tag":470,"props":1236,"children":1237},{"style":531},[1238],{"type":51,"value":1007},{"type":46,"tag":470,"props":1240,"children":1241},{"class":472,"line":1084},[1242,1246,1251,1255,1259,1263,1267,1271],{"type":46,"tag":470,"props":1243,"children":1244},{"style":531},[1245],{"type":51,"value":1173},{"type":46,"tag":470,"props":1247,"children":1248},{"style":477},[1249],{"type":51,"value":1250},"data",{"type":46,"tag":470,"props":1252,"children":1253},{"style":531},[1254],{"type":51,"value":876},{"type":46,"tag":470,"props":1256,"children":1257},{"style":531},[1258],{"type":51,"value":417},{"type":46,"tag":470,"props":1260,"children":1261},{"style":531},[1262],{"type":51,"value":993},{"type":46,"tag":470,"props":1264,"children":1265},{"style":483},[1266],{"type":51,"value":998},{"type":46,"tag":470,"props":1268,"children":1269},{"style":531},[1270],{"type":51,"value":876},{"type":46,"tag":470,"props":1272,"children":1273},{"style":531},[1274],{"type":51,"value":1007},{"type":46,"tag":470,"props":1276,"children":1277},{"class":472,"line":1111},[1278,1282,1287,1291,1295,1299,1304,1308],{"type":46,"tag":470,"props":1279,"children":1280},{"style":531},[1281],{"type":51,"value":1173},{"type":46,"tag":470,"props":1283,"children":1284},{"style":477},[1285],{"type":51,"value":1286},"value",{"type":46,"tag":470,"props":1288,"children":1289},{"style":531},[1290],{"type":51,"value":876},{"type":46,"tag":470,"props":1292,"children":1293},{"style":531},[1294],{"type":51,"value":417},{"type":46,"tag":470,"props":1296,"children":1297},{"style":531},[1298],{"type":51,"value":993},{"type":46,"tag":470,"props":1300,"children":1301},{"style":483},[1302],{"type":51,"value":1303},"0",{"type":46,"tag":470,"props":1305,"children":1306},{"style":531},[1307],{"type":51,"value":876},{"type":46,"tag":470,"props":1309,"children":1310},{"style":531},[1311],{"type":51,"value":1007},{"type":46,"tag":470,"props":1313,"children":1315},{"class":472,"line":1314},7,[1316,1320,1324,1328,1332],{"type":46,"tag":470,"props":1317,"children":1318},{"style":531},[1319],{"type":51,"value":1173},{"type":46,"tag":470,"props":1321,"children":1322},{"style":477},[1323],{"type":51,"value":1094},{"type":46,"tag":470,"props":1325,"children":1326},{"style":531},[1327],{"type":51,"value":876},{"type":46,"tag":470,"props":1329,"children":1330},{"style":531},[1331],{"type":51,"value":417},{"type":46,"tag":470,"props":1333,"children":1334},{"style":1105},[1335],{"type":51,"value":1108},{"type":46,"tag":470,"props":1337,"children":1339},{"class":472,"line":1338},8,[1340],{"type":46,"tag":470,"props":1341,"children":1342},{"style":531},[1343],{"type":51,"value":1344},"  }\n",{"type":46,"tag":470,"props":1346,"children":1348},{"class":472,"line":1347},9,[1349],{"type":46,"tag":470,"props":1350,"children":1351},{"style":531},[1352],{"type":51,"value":1117},{"type":46,"tag":54,"props":1354,"children":1355},{},[1356,1358,1363,1365,1371],{"type":51,"value":1357},"If ",{"type":46,"tag":80,"props":1359,"children":1361},{"className":1360},[],[1362],{"type":51,"value":1152},{"type":51,"value":1364}," is ",{"type":46,"tag":80,"props":1366,"children":1368},{"className":1367},[],[1369],{"type":51,"value":1370},"null",{"type":51,"value":1372},", token is already approved.",{"type":46,"tag":172,"props":1374,"children":1376},{"id":1375},"step-2-get-quote",[1377],{"type":51,"value":1378},"Step 2: Get Quote",{"type":46,"tag":397,"props":1380,"children":1382},{"className":462,"code":1381,"language":464,"meta":402,"style":402},"POST \u002Fquote\n",[1383],{"type":46,"tag":80,"props":1384,"children":1385},{"__ignoreMap":402},[1386],{"type":46,"tag":470,"props":1387,"children":1388},{"class":472,"line":473},[1389,1393],{"type":46,"tag":470,"props":1390,"children":1391},{"style":477},[1392],{"type":51,"value":936},{"type":46,"tag":470,"props":1394,"children":1395},{"style":483},[1396],{"type":51,"value":1397}," \u002Fquote\n",{"type":46,"tag":54,"props":1399,"children":1400},{},[1401,1405],{"type":46,"tag":72,"props":1402,"children":1403},{},[1404],{"type":51,"value":949},{"type":51,"value":417},{"type":46,"tag":397,"props":1407,"children":1409},{"className":953,"code":1408,"language":955,"meta":402,"style":402},"{\n  \"swapper\": \"0x...\",\n  \"tokenIn\": \"0x...\",\n  \"tokenOut\": \"0x...\",\n  \"tokenInChainId\": \"1\",\n  \"tokenOutChainId\": \"1\",\n  \"amount\": \"1000000000000000000\",\n  \"type\": \"EXACT_INPUT\",\n  \"slippageTolerance\": 0.5,\n  \"routingPreference\": \"BEST_PRICE\"\n}\n",[1410],{"type":46,"tag":80,"props":1411,"children":1412},{"__ignoreMap":402},[1413,1420,1456,1492,1528,1565,1601,1637,1674,1703,1738],{"type":46,"tag":470,"props":1414,"children":1415},{"class":472,"line":473},[1416],{"type":46,"tag":470,"props":1417,"children":1418},{"style":531},[1419],{"type":51,"value":967},{"type":46,"tag":470,"props":1421,"children":1422},{"class":472,"line":573},[1423,1427,1432,1436,1440,1444,1448,1452],{"type":46,"tag":470,"props":1424,"children":1425},{"style":531},[1426],{"type":51,"value":975},{"type":46,"tag":470,"props":1428,"children":1429},{"style":587},[1430],{"type":51,"value":1431},"swapper",{"type":46,"tag":470,"props":1433,"children":1434},{"style":531},[1435],{"type":51,"value":876},{"type":46,"tag":470,"props":1437,"children":1438},{"style":531},[1439],{"type":51,"value":417},{"type":46,"tag":470,"props":1441,"children":1442},{"style":531},[1443],{"type":51,"value":993},{"type":46,"tag":470,"props":1445,"children":1446},{"style":483},[1447],{"type":51,"value":998},{"type":46,"tag":470,"props":1449,"children":1450},{"style":531},[1451],{"type":51,"value":876},{"type":46,"tag":470,"props":1453,"children":1454},{"style":531},[1455],{"type":51,"value":1007},{"type":46,"tag":470,"props":1457,"children":1458},{"class":472,"line":583},[1459,1463,1468,1472,1476,1480,1484,1488],{"type":46,"tag":470,"props":1460,"children":1461},{"style":531},[1462],{"type":51,"value":975},{"type":46,"tag":470,"props":1464,"children":1465},{"style":587},[1466],{"type":51,"value":1467},"tokenIn",{"type":46,"tag":470,"props":1469,"children":1470},{"style":531},[1471],{"type":51,"value":876},{"type":46,"tag":470,"props":1473,"children":1474},{"style":531},[1475],{"type":51,"value":417},{"type":46,"tag":470,"props":1477,"children":1478},{"style":531},[1479],{"type":51,"value":993},{"type":46,"tag":470,"props":1481,"children":1482},{"style":483},[1483],{"type":51,"value":998},{"type":46,"tag":470,"props":1485,"children":1486},{"style":531},[1487],{"type":51,"value":876},{"type":46,"tag":470,"props":1489,"children":1490},{"style":531},[1491],{"type":51,"value":1007},{"type":46,"tag":470,"props":1493,"children":1494},{"class":472,"line":1046},[1495,1499,1504,1508,1512,1516,1520,1524],{"type":46,"tag":470,"props":1496,"children":1497},{"style":531},[1498],{"type":51,"value":975},{"type":46,"tag":470,"props":1500,"children":1501},{"style":587},[1502],{"type":51,"value":1503},"tokenOut",{"type":46,"tag":470,"props":1505,"children":1506},{"style":531},[1507],{"type":51,"value":876},{"type":46,"tag":470,"props":1509,"children":1510},{"style":531},[1511],{"type":51,"value":417},{"type":46,"tag":470,"props":1513,"children":1514},{"style":531},[1515],{"type":51,"value":993},{"type":46,"tag":470,"props":1517,"children":1518},{"style":483},[1519],{"type":51,"value":998},{"type":46,"tag":470,"props":1521,"children":1522},{"style":531},[1523],{"type":51,"value":876},{"type":46,"tag":470,"props":1525,"children":1526},{"style":531},[1527],{"type":51,"value":1007},{"type":46,"tag":470,"props":1529,"children":1530},{"class":472,"line":1084},[1531,1535,1540,1544,1548,1552,1557,1561],{"type":46,"tag":470,"props":1532,"children":1533},{"style":531},[1534],{"type":51,"value":975},{"type":46,"tag":470,"props":1536,"children":1537},{"style":587},[1538],{"type":51,"value":1539},"tokenInChainId",{"type":46,"tag":470,"props":1541,"children":1542},{"style":531},[1543],{"type":51,"value":876},{"type":46,"tag":470,"props":1545,"children":1546},{"style":531},[1547],{"type":51,"value":417},{"type":46,"tag":470,"props":1549,"children":1550},{"style":531},[1551],{"type":51,"value":993},{"type":46,"tag":470,"props":1553,"children":1554},{"style":483},[1555],{"type":51,"value":1556},"1",{"type":46,"tag":470,"props":1558,"children":1559},{"style":531},[1560],{"type":51,"value":876},{"type":46,"tag":470,"props":1562,"children":1563},{"style":531},[1564],{"type":51,"value":1007},{"type":46,"tag":470,"props":1566,"children":1567},{"class":472,"line":1111},[1568,1572,1577,1581,1585,1589,1593,1597],{"type":46,"tag":470,"props":1569,"children":1570},{"style":531},[1571],{"type":51,"value":975},{"type":46,"tag":470,"props":1573,"children":1574},{"style":587},[1575],{"type":51,"value":1576},"tokenOutChainId",{"type":46,"tag":470,"props":1578,"children":1579},{"style":531},[1580],{"type":51,"value":876},{"type":46,"tag":470,"props":1582,"children":1583},{"style":531},[1584],{"type":51,"value":417},{"type":46,"tag":470,"props":1586,"children":1587},{"style":531},[1588],{"type":51,"value":993},{"type":46,"tag":470,"props":1590,"children":1591},{"style":483},[1592],{"type":51,"value":1556},{"type":46,"tag":470,"props":1594,"children":1595},{"style":531},[1596],{"type":51,"value":876},{"type":46,"tag":470,"props":1598,"children":1599},{"style":531},[1600],{"type":51,"value":1007},{"type":46,"tag":470,"props":1602,"children":1603},{"class":472,"line":1314},[1604,1608,1612,1616,1620,1624,1629,1633],{"type":46,"tag":470,"props":1605,"children":1606},{"style":531},[1607],{"type":51,"value":975},{"type":46,"tag":470,"props":1609,"children":1610},{"style":587},[1611],{"type":51,"value":1056},{"type":46,"tag":470,"props":1613,"children":1614},{"style":531},[1615],{"type":51,"value":876},{"type":46,"tag":470,"props":1617,"children":1618},{"style":531},[1619],{"type":51,"value":417},{"type":46,"tag":470,"props":1621,"children":1622},{"style":531},[1623],{"type":51,"value":993},{"type":46,"tag":470,"props":1625,"children":1626},{"style":483},[1627],{"type":51,"value":1628},"1000000000000000000",{"type":46,"tag":470,"props":1630,"children":1631},{"style":531},[1632],{"type":51,"value":876},{"type":46,"tag":470,"props":1634,"children":1635},{"style":531},[1636],{"type":51,"value":1007},{"type":46,"tag":470,"props":1638,"children":1639},{"class":472,"line":1338},[1640,1644,1649,1653,1657,1661,1666,1670],{"type":46,"tag":470,"props":1641,"children":1642},{"style":531},[1643],{"type":51,"value":975},{"type":46,"tag":470,"props":1645,"children":1646},{"style":587},[1647],{"type":51,"value":1648},"type",{"type":46,"tag":470,"props":1650,"children":1651},{"style":531},[1652],{"type":51,"value":876},{"type":46,"tag":470,"props":1654,"children":1655},{"style":531},[1656],{"type":51,"value":417},{"type":46,"tag":470,"props":1658,"children":1659},{"style":531},[1660],{"type":51,"value":993},{"type":46,"tag":470,"props":1662,"children":1663},{"style":483},[1664],{"type":51,"value":1665},"EXACT_INPUT",{"type":46,"tag":470,"props":1667,"children":1668},{"style":531},[1669],{"type":51,"value":876},{"type":46,"tag":470,"props":1671,"children":1672},{"style":531},[1673],{"type":51,"value":1007},{"type":46,"tag":470,"props":1675,"children":1676},{"class":472,"line":1347},[1677,1681,1686,1690,1694,1699],{"type":46,"tag":470,"props":1678,"children":1679},{"style":531},[1680],{"type":51,"value":975},{"type":46,"tag":470,"props":1682,"children":1683},{"style":587},[1684],{"type":51,"value":1685},"slippageTolerance",{"type":46,"tag":470,"props":1687,"children":1688},{"style":531},[1689],{"type":51,"value":876},{"type":46,"tag":470,"props":1691,"children":1692},{"style":531},[1693],{"type":51,"value":417},{"type":46,"tag":470,"props":1695,"children":1696},{"style":1105},[1697],{"type":51,"value":1698}," 0.5",{"type":46,"tag":470,"props":1700,"children":1701},{"style":531},[1702],{"type":51,"value":1007},{"type":46,"tag":470,"props":1704,"children":1706},{"class":472,"line":1705},10,[1707,1711,1716,1720,1724,1728,1733],{"type":46,"tag":470,"props":1708,"children":1709},{"style":531},[1710],{"type":51,"value":975},{"type":46,"tag":470,"props":1712,"children":1713},{"style":587},[1714],{"type":51,"value":1715},"routingPreference",{"type":46,"tag":470,"props":1717,"children":1718},{"style":531},[1719],{"type":51,"value":876},{"type":46,"tag":470,"props":1721,"children":1722},{"style":531},[1723],{"type":51,"value":417},{"type":46,"tag":470,"props":1725,"children":1726},{"style":531},[1727],{"type":51,"value":993},{"type":46,"tag":470,"props":1729,"children":1730},{"style":483},[1731],{"type":51,"value":1732},"BEST_PRICE",{"type":46,"tag":470,"props":1734,"children":1735},{"style":531},[1736],{"type":51,"value":1737},"\"\n",{"type":46,"tag":470,"props":1739,"children":1741},{"class":472,"line":1740},11,[1742],{"type":46,"tag":470,"props":1743,"children":1744},{"style":531},[1745],{"type":51,"value":1117},{"type":46,"tag":880,"props":1747,"children":1748},{},[1749],{"type":46,"tag":54,"props":1750,"children":1751},{},[1752,1757,1758,1763,1765,1770,1772,1777,1779,1785],{"type":46,"tag":72,"props":1753,"children":1754},{},[1755],{"type":51,"value":1756},"Note",{"type":51,"value":334},{"type":46,"tag":80,"props":1759,"children":1761},{"className":1760},[],[1762],{"type":51,"value":1539},{"type":51,"value":1764}," and ",{"type":46,"tag":80,"props":1766,"children":1768},{"className":1767},[],[1769],{"type":51,"value":1576},{"type":51,"value":1771}," must be ",{"type":46,"tag":72,"props":1773,"children":1774},{},[1775],{"type":51,"value":1776},"strings",{"type":51,"value":1778}," (e.g., ",{"type":46,"tag":80,"props":1780,"children":1782},{"className":1781},[],[1783],{"type":51,"value":1784},"\"1\"",{"type":51,"value":1786},"), not numbers.",{"type":46,"tag":54,"props":1788,"children":1789},{},[1790,1795],{"type":46,"tag":72,"props":1791,"children":1792},{},[1793],{"type":51,"value":1794},"Key Parameters",{"type":51,"value":417},{"type":46,"tag":93,"props":1797,"children":1798},{},[1799,1814],{"type":46,"tag":97,"props":1800,"children":1801},{},[1802],{"type":46,"tag":101,"props":1803,"children":1804},{},[1805,1810],{"type":46,"tag":105,"props":1806,"children":1807},{},[1808],{"type":51,"value":1809},"Parameter",{"type":46,"tag":105,"props":1811,"children":1812},{},[1813],{"type":51,"value":196},{"type":46,"tag":116,"props":1815,"children":1816},{},[1817,1844,1860,1883,1915,1944],{"type":46,"tag":101,"props":1818,"children":1819},{},[1820,1828],{"type":46,"tag":123,"props":1821,"children":1822},{},[1823],{"type":46,"tag":80,"props":1824,"children":1826},{"className":1825},[],[1827],{"type":51,"value":1648},{"type":46,"tag":123,"props":1829,"children":1830},{},[1831,1836,1838],{"type":46,"tag":80,"props":1832,"children":1834},{"className":1833},[],[1835],{"type":51,"value":1665},{"type":51,"value":1837}," or ",{"type":46,"tag":80,"props":1839,"children":1841},{"className":1840},[],[1842],{"type":51,"value":1843},"EXACT_OUTPUT",{"type":46,"tag":101,"props":1845,"children":1846},{},[1847,1855],{"type":46,"tag":123,"props":1848,"children":1849},{},[1850],{"type":46,"tag":80,"props":1851,"children":1853},{"className":1852},[],[1854],{"type":51,"value":1685},{"type":46,"tag":123,"props":1856,"children":1857},{},[1858],{"type":51,"value":1859},"0-100 percentage",{"type":46,"tag":101,"props":1861,"children":1862},{},[1863,1872],{"type":46,"tag":123,"props":1864,"children":1865},{},[1866],{"type":46,"tag":80,"props":1867,"children":1869},{"className":1868},[],[1870],{"type":51,"value":1871},"protocols",{"type":46,"tag":123,"props":1873,"children":1874},{},[1875,1877],{"type":51,"value":1876},"Optional: ",{"type":46,"tag":80,"props":1878,"children":1880},{"className":1879},[],[1881],{"type":51,"value":1882},"[\"V2\", \"V3\", \"V4\"]",{"type":46,"tag":101,"props":1884,"children":1885},{},[1886,1894],{"type":46,"tag":123,"props":1887,"children":1888},{},[1889],{"type":46,"tag":80,"props":1890,"children":1892},{"className":1891},[],[1893],{"type":51,"value":1715},{"type":46,"tag":123,"props":1895,"children":1896},{},[1897,1902,1903,1909,1910],{"type":46,"tag":80,"props":1898,"children":1900},{"className":1899},[],[1901],{"type":51,"value":1732},{"type":51,"value":801},{"type":46,"tag":80,"props":1904,"children":1906},{"className":1905},[],[1907],{"type":51,"value":1908},"FASTEST",{"type":51,"value":801},{"type":46,"tag":80,"props":1911,"children":1913},{"className":1912},[],[1914],{"type":51,"value":212},{"type":46,"tag":101,"props":1916,"children":1917},{},[1918,1927],{"type":46,"tag":123,"props":1919,"children":1920},{},[1921],{"type":46,"tag":80,"props":1922,"children":1924},{"className":1923},[],[1925],{"type":51,"value":1926},"autoSlippage",{"type":46,"tag":123,"props":1928,"children":1929},{},[1930,1936,1938,1943],{"type":46,"tag":80,"props":1931,"children":1933},{"className":1932},[],[1934],{"type":51,"value":1935},"true",{"type":51,"value":1937}," to auto-calculate slippage (overrides ",{"type":46,"tag":80,"props":1939,"children":1941},{"className":1940},[],[1942],{"type":51,"value":1685},{"type":51,"value":842},{"type":46,"tag":101,"props":1945,"children":1946},{},[1947,1956],{"type":46,"tag":123,"props":1948,"children":1949},{},[1950],{"type":46,"tag":80,"props":1951,"children":1953},{"className":1952},[],[1954],{"type":51,"value":1955},"urgency",{"type":46,"tag":123,"props":1957,"children":1958},{},[1959,1965,1966,1972],{"type":46,"tag":80,"props":1960,"children":1962},{"className":1961},[],[1963],{"type":51,"value":1964},"normal",{"type":51,"value":1837},{"type":46,"tag":80,"props":1967,"children":1969},{"className":1968},[],[1970],{"type":51,"value":1971},"fast",{"type":51,"value":1973}," — affects UniswapX auction timing",{"type":46,"tag":54,"props":1975,"children":1976},{},[1977,1981,1983,1988],{"type":46,"tag":72,"props":1978,"children":1979},{},[1980],{"type":51,"value":1125},{"type":51,"value":1982}," — the shape differs by routing type. ",{"type":46,"tag":80,"props":1984,"children":1986},{"className":1985},[],[1987],{"type":51,"value":1732},{"type":51,"value":1989}," routing on Ethereum mainnet typically returns UniswapX (DUTCH_V2), not CLASSIC.",{"type":46,"tag":54,"props":1991,"children":1992},{},[1993,1998],{"type":46,"tag":72,"props":1994,"children":1995},{},[1996],{"type":51,"value":1997},"CLASSIC response",{"type":51,"value":417},{"type":46,"tag":397,"props":2000,"children":2002},{"className":953,"code":2001,"language":955,"meta":402,"style":402},"{\n  \"routing\": \"CLASSIC\",\n  \"quote\": {\n    \"input\": { \"token\": \"0x...\", \"amount\": \"1000000000000000000\" },\n    \"output\": { \"token\": \"0x...\", \"amount\": \"999000000\" },\n    \"slippage\": 0.5,\n    \"route\": [],\n    \"gasFee\": \"5000000000000000\",\n    \"gasFeeUSD\": \"0.01\",\n    \"gasUseEstimate\": \"150000\"\n  },\n  \"permitData\": null\n}\n",[2003],{"type":46,"tag":80,"props":2004,"children":2005},{"__ignoreMap":402},[2006,2013,2049,2073,2162,2251,2279,2304,2341,2378,2411,2419,2445],{"type":46,"tag":470,"props":2007,"children":2008},{"class":472,"line":473},[2009],{"type":46,"tag":470,"props":2010,"children":2011},{"style":531},[2012],{"type":51,"value":967},{"type":46,"tag":470,"props":2014,"children":2015},{"class":472,"line":573},[2016,2020,2025,2029,2033,2037,2041,2045],{"type":46,"tag":470,"props":2017,"children":2018},{"style":531},[2019],{"type":51,"value":975},{"type":46,"tag":470,"props":2021,"children":2022},{"style":587},[2023],{"type":51,"value":2024},"routing",{"type":46,"tag":470,"props":2026,"children":2027},{"style":531},[2028],{"type":51,"value":876},{"type":46,"tag":470,"props":2030,"children":2031},{"style":531},[2032],{"type":51,"value":417},{"type":46,"tag":470,"props":2034,"children":2035},{"style":531},[2036],{"type":51,"value":993},{"type":46,"tag":470,"props":2038,"children":2039},{"style":483},[2040],{"type":51,"value":212},{"type":46,"tag":470,"props":2042,"children":2043},{"style":531},[2044],{"type":51,"value":876},{"type":46,"tag":470,"props":2046,"children":2047},{"style":531},[2048],{"type":51,"value":1007},{"type":46,"tag":470,"props":2050,"children":2051},{"class":472,"line":583},[2052,2056,2061,2065,2069],{"type":46,"tag":470,"props":2053,"children":2054},{"style":531},[2055],{"type":51,"value":975},{"type":46,"tag":470,"props":2057,"children":2058},{"style":587},[2059],{"type":51,"value":2060},"quote",{"type":46,"tag":470,"props":2062,"children":2063},{"style":531},[2064],{"type":51,"value":876},{"type":46,"tag":470,"props":2066,"children":2067},{"style":531},[2068],{"type":51,"value":417},{"type":46,"tag":470,"props":2070,"children":2071},{"style":531},[2072],{"type":51,"value":1165},{"type":46,"tag":470,"props":2074,"children":2075},{"class":472,"line":1046},[2076,2080,2085,2089,2093,2097,2101,2105,2109,2113,2117,2121,2125,2129,2133,2137,2141,2145,2149,2153,2157],{"type":46,"tag":470,"props":2077,"children":2078},{"style":531},[2079],{"type":51,"value":1173},{"type":46,"tag":470,"props":2081,"children":2082},{"style":477},[2083],{"type":51,"value":2084},"input",{"type":46,"tag":470,"props":2086,"children":2087},{"style":531},[2088],{"type":51,"value":876},{"type":46,"tag":470,"props":2090,"children":2091},{"style":531},[2092],{"type":51,"value":417},{"type":46,"tag":470,"props":2094,"children":2095},{"style":531},[2096],{"type":51,"value":534},{"type":46,"tag":470,"props":2098,"children":2099},{"style":531},[2100],{"type":51,"value":993},{"type":46,"tag":470,"props":2102,"children":2103},{"style":1105},[2104],{"type":51,"value":1019},{"type":46,"tag":470,"props":2106,"children":2107},{"style":531},[2108],{"type":51,"value":876},{"type":46,"tag":470,"props":2110,"children":2111},{"style":531},[2112],{"type":51,"value":417},{"type":46,"tag":470,"props":2114,"children":2115},{"style":531},[2116],{"type":51,"value":993},{"type":46,"tag":470,"props":2118,"children":2119},{"style":483},[2120],{"type":51,"value":998},{"type":46,"tag":470,"props":2122,"children":2123},{"style":531},[2124],{"type":51,"value":876},{"type":46,"tag":470,"props":2126,"children":2127},{"style":531},[2128],{"type":51,"value":604},{"type":46,"tag":470,"props":2130,"children":2131},{"style":531},[2132],{"type":51,"value":993},{"type":46,"tag":470,"props":2134,"children":2135},{"style":1105},[2136],{"type":51,"value":1056},{"type":46,"tag":470,"props":2138,"children":2139},{"style":531},[2140],{"type":51,"value":876},{"type":46,"tag":470,"props":2142,"children":2143},{"style":531},[2144],{"type":51,"value":417},{"type":46,"tag":470,"props":2146,"children":2147},{"style":531},[2148],{"type":51,"value":993},{"type":46,"tag":470,"props":2150,"children":2151},{"style":483},[2152],{"type":51,"value":1628},{"type":46,"tag":470,"props":2154,"children":2155},{"style":531},[2156],{"type":51,"value":876},{"type":46,"tag":470,"props":2158,"children":2159},{"style":531},[2160],{"type":51,"value":2161}," },\n",{"type":46,"tag":470,"props":2163,"children":2164},{"class":472,"line":1084},[2165,2169,2174,2178,2182,2186,2190,2194,2198,2202,2206,2210,2214,2218,2222,2226,2230,2234,2238,2243,2247],{"type":46,"tag":470,"props":2166,"children":2167},{"style":531},[2168],{"type":51,"value":1173},{"type":46,"tag":470,"props":2170,"children":2171},{"style":477},[2172],{"type":51,"value":2173},"output",{"type":46,"tag":470,"props":2175,"children":2176},{"style":531},[2177],{"type":51,"value":876},{"type":46,"tag":470,"props":2179,"children":2180},{"style":531},[2181],{"type":51,"value":417},{"type":46,"tag":470,"props":2183,"children":2184},{"style":531},[2185],{"type":51,"value":534},{"type":46,"tag":470,"props":2187,"children":2188},{"style":531},[2189],{"type":51,"value":993},{"type":46,"tag":470,"props":2191,"children":2192},{"style":1105},[2193],{"type":51,"value":1019},{"type":46,"tag":470,"props":2195,"children":2196},{"style":531},[2197],{"type":51,"value":876},{"type":46,"tag":470,"props":2199,"children":2200},{"style":531},[2201],{"type":51,"value":417},{"type":46,"tag":470,"props":2203,"children":2204},{"style":531},[2205],{"type":51,"value":993},{"type":46,"tag":470,"props":2207,"children":2208},{"style":483},[2209],{"type":51,"value":998},{"type":46,"tag":470,"props":2211,"children":2212},{"style":531},[2213],{"type":51,"value":876},{"type":46,"tag":470,"props":2215,"children":2216},{"style":531},[2217],{"type":51,"value":604},{"type":46,"tag":470,"props":2219,"children":2220},{"style":531},[2221],{"type":51,"value":993},{"type":46,"tag":470,"props":2223,"children":2224},{"style":1105},[2225],{"type":51,"value":1056},{"type":46,"tag":470,"props":2227,"children":2228},{"style":531},[2229],{"type":51,"value":876},{"type":46,"tag":470,"props":2231,"children":2232},{"style":531},[2233],{"type":51,"value":417},{"type":46,"tag":470,"props":2235,"children":2236},{"style":531},[2237],{"type":51,"value":993},{"type":46,"tag":470,"props":2239,"children":2240},{"style":483},[2241],{"type":51,"value":2242},"999000000",{"type":46,"tag":470,"props":2244,"children":2245},{"style":531},[2246],{"type":51,"value":876},{"type":46,"tag":470,"props":2248,"children":2249},{"style":531},[2250],{"type":51,"value":2161},{"type":46,"tag":470,"props":2252,"children":2253},{"class":472,"line":1111},[2254,2258,2263,2267,2271,2275],{"type":46,"tag":470,"props":2255,"children":2256},{"style":531},[2257],{"type":51,"value":1173},{"type":46,"tag":470,"props":2259,"children":2260},{"style":477},[2261],{"type":51,"value":2262},"slippage",{"type":46,"tag":470,"props":2264,"children":2265},{"style":531},[2266],{"type":51,"value":876},{"type":46,"tag":470,"props":2268,"children":2269},{"style":531},[2270],{"type":51,"value":417},{"type":46,"tag":470,"props":2272,"children":2273},{"style":1105},[2274],{"type":51,"value":1698},{"type":46,"tag":470,"props":2276,"children":2277},{"style":531},[2278],{"type":51,"value":1007},{"type":46,"tag":470,"props":2280,"children":2281},{"class":472,"line":1314},[2282,2286,2291,2295,2299],{"type":46,"tag":470,"props":2283,"children":2284},{"style":531},[2285],{"type":51,"value":1173},{"type":46,"tag":470,"props":2287,"children":2288},{"style":477},[2289],{"type":51,"value":2290},"route",{"type":46,"tag":470,"props":2292,"children":2293},{"style":531},[2294],{"type":51,"value":876},{"type":46,"tag":470,"props":2296,"children":2297},{"style":531},[2298],{"type":51,"value":417},{"type":46,"tag":470,"props":2300,"children":2301},{"style":531},[2302],{"type":51,"value":2303}," [],\n",{"type":46,"tag":470,"props":2305,"children":2306},{"class":472,"line":1338},[2307,2311,2316,2320,2324,2328,2333,2337],{"type":46,"tag":470,"props":2308,"children":2309},{"style":531},[2310],{"type":51,"value":1173},{"type":46,"tag":470,"props":2312,"children":2313},{"style":477},[2314],{"type":51,"value":2315},"gasFee",{"type":46,"tag":470,"props":2317,"children":2318},{"style":531},[2319],{"type":51,"value":876},{"type":46,"tag":470,"props":2321,"children":2322},{"style":531},[2323],{"type":51,"value":417},{"type":46,"tag":470,"props":2325,"children":2326},{"style":531},[2327],{"type":51,"value":993},{"type":46,"tag":470,"props":2329,"children":2330},{"style":483},[2331],{"type":51,"value":2332},"5000000000000000",{"type":46,"tag":470,"props":2334,"children":2335},{"style":531},[2336],{"type":51,"value":876},{"type":46,"tag":470,"props":2338,"children":2339},{"style":531},[2340],{"type":51,"value":1007},{"type":46,"tag":470,"props":2342,"children":2343},{"class":472,"line":1347},[2344,2348,2353,2357,2361,2365,2370,2374],{"type":46,"tag":470,"props":2345,"children":2346},{"style":531},[2347],{"type":51,"value":1173},{"type":46,"tag":470,"props":2349,"children":2350},{"style":477},[2351],{"type":51,"value":2352},"gasFeeUSD",{"type":46,"tag":470,"props":2354,"children":2355},{"style":531},[2356],{"type":51,"value":876},{"type":46,"tag":470,"props":2358,"children":2359},{"style":531},[2360],{"type":51,"value":417},{"type":46,"tag":470,"props":2362,"children":2363},{"style":531},[2364],{"type":51,"value":993},{"type":46,"tag":470,"props":2366,"children":2367},{"style":483},[2368],{"type":51,"value":2369},"0.01",{"type":46,"tag":470,"props":2371,"children":2372},{"style":531},[2373],{"type":51,"value":876},{"type":46,"tag":470,"props":2375,"children":2376},{"style":531},[2377],{"type":51,"value":1007},{"type":46,"tag":470,"props":2379,"children":2380},{"class":472,"line":1705},[2381,2385,2390,2394,2398,2402,2407],{"type":46,"tag":470,"props":2382,"children":2383},{"style":531},[2384],{"type":51,"value":1173},{"type":46,"tag":470,"props":2386,"children":2387},{"style":477},[2388],{"type":51,"value":2389},"gasUseEstimate",{"type":46,"tag":470,"props":2391,"children":2392},{"style":531},[2393],{"type":51,"value":876},{"type":46,"tag":470,"props":2395,"children":2396},{"style":531},[2397],{"type":51,"value":417},{"type":46,"tag":470,"props":2399,"children":2400},{"style":531},[2401],{"type":51,"value":993},{"type":46,"tag":470,"props":2403,"children":2404},{"style":483},[2405],{"type":51,"value":2406},"150000",{"type":46,"tag":470,"props":2408,"children":2409},{"style":531},[2410],{"type":51,"value":1737},{"type":46,"tag":470,"props":2412,"children":2413},{"class":472,"line":1740},[2414],{"type":46,"tag":470,"props":2415,"children":2416},{"style":531},[2417],{"type":51,"value":2418},"  },\n",{"type":46,"tag":470,"props":2420,"children":2422},{"class":472,"line":2421},12,[2423,2427,2432,2436,2440],{"type":46,"tag":470,"props":2424,"children":2425},{"style":531},[2426],{"type":51,"value":975},{"type":46,"tag":470,"props":2428,"children":2429},{"style":587},[2430],{"type":51,"value":2431},"permitData",{"type":46,"tag":470,"props":2433,"children":2434},{"style":531},[2435],{"type":51,"value":876},{"type":46,"tag":470,"props":2437,"children":2438},{"style":531},[2439],{"type":51,"value":417},{"type":46,"tag":470,"props":2441,"children":2442},{"style":531},[2443],{"type":51,"value":2444}," null\n",{"type":46,"tag":470,"props":2446,"children":2448},{"class":472,"line":2447},13,[2449],{"type":46,"tag":470,"props":2450,"children":2451},{"style":531},[2452],{"type":51,"value":1117},{"type":46,"tag":54,"props":2454,"children":2455},{},[2456,2461,2463,2468,2470,2476],{"type":46,"tag":72,"props":2457,"children":2458},{},[2459],{"type":51,"value":2460},"UniswapX (DUTCH_V2\u002FV3\u002FPRIORITY) response",{"type":51,"value":2462}," — different ",{"type":46,"tag":80,"props":2464,"children":2466},{"className":2465},[],[2467],{"type":51,"value":2060},{"type":51,"value":2469}," shape, no ",{"type":46,"tag":80,"props":2471,"children":2473},{"className":2472},[],[2474],{"type":51,"value":2475},"quote.output",{"type":51,"value":417},{"type":46,"tag":397,"props":2478,"children":2480},{"className":953,"code":2479,"language":955,"meta":402,"style":402},"{\n  \"routing\": \"DUTCH_V2\",\n  \"quote\": {\n    \"orderInfo\": {\n      \"reactor\": \"0x...\",\n      \"swapper\": \"0x...\",\n      \"nonce\": \"...\",\n      \"deadline\": 1772031054,\n      \"cosigner\": \"0x...\",\n      \"input\": {\n        \"token\": \"0x...\",\n        \"startAmount\": \"1000000000000000000\",\n        \"endAmount\": \"1000000000000000000\"\n      },\n      \"outputs\": [\n        {\n          \"token\": \"0x...\",\n          \"startAmount\": \"999000000\",\n          \"endAmount\": \"994000000\",\n          \"recipient\": \"0x...\"\n        }\n      ],\n      \"chainId\": 1\n    },\n    \"encodedOrder\": \"0x...\",\n    \"orderHash\": \"0x...\"\n  },\n  \"permitData\": { \"domain\": {}, \"types\": {}, \"values\": {} }\n}\n",[2481],{"type":46,"tag":80,"props":2482,"children":2483},{"__ignoreMap":402},[2484,2491,2526,2549,2573,2610,2645,2682,2711,2747,2770,2807,2843,2875,2884,2910,2919,2956,2992,3029,3062,3071,3080,3104,3113,3150,3183,3191,3285],{"type":46,"tag":470,"props":2485,"children":2486},{"class":472,"line":473},[2487],{"type":46,"tag":470,"props":2488,"children":2489},{"style":531},[2490],{"type":51,"value":967},{"type":46,"tag":470,"props":2492,"children":2493},{"class":472,"line":573},[2494,2498,2502,2506,2510,2514,2518,2522],{"type":46,"tag":470,"props":2495,"children":2496},{"style":531},[2497],{"type":51,"value":975},{"type":46,"tag":470,"props":2499,"children":2500},{"style":587},[2501],{"type":51,"value":2024},{"type":46,"tag":470,"props":2503,"children":2504},{"style":531},[2505],{"type":51,"value":876},{"type":46,"tag":470,"props":2507,"children":2508},{"style":531},[2509],{"type":51,"value":417},{"type":46,"tag":470,"props":2511,"children":2512},{"style":531},[2513],{"type":51,"value":993},{"type":46,"tag":470,"props":2515,"children":2516},{"style":483},[2517],{"type":51,"value":230},{"type":46,"tag":470,"props":2519,"children":2520},{"style":531},[2521],{"type":51,"value":876},{"type":46,"tag":470,"props":2523,"children":2524},{"style":531},[2525],{"type":51,"value":1007},{"type":46,"tag":470,"props":2527,"children":2528},{"class":472,"line":583},[2529,2533,2537,2541,2545],{"type":46,"tag":470,"props":2530,"children":2531},{"style":531},[2532],{"type":51,"value":975},{"type":46,"tag":470,"props":2534,"children":2535},{"style":587},[2536],{"type":51,"value":2060},{"type":46,"tag":470,"props":2538,"children":2539},{"style":531},[2540],{"type":51,"value":876},{"type":46,"tag":470,"props":2542,"children":2543},{"style":531},[2544],{"type":51,"value":417},{"type":46,"tag":470,"props":2546,"children":2547},{"style":531},[2548],{"type":51,"value":1165},{"type":46,"tag":470,"props":2550,"children":2551},{"class":472,"line":1046},[2552,2556,2561,2565,2569],{"type":46,"tag":470,"props":2553,"children":2554},{"style":531},[2555],{"type":51,"value":1173},{"type":46,"tag":470,"props":2557,"children":2558},{"style":477},[2559],{"type":51,"value":2560},"orderInfo",{"type":46,"tag":470,"props":2562,"children":2563},{"style":531},[2564],{"type":51,"value":876},{"type":46,"tag":470,"props":2566,"children":2567},{"style":531},[2568],{"type":51,"value":417},{"type":46,"tag":470,"props":2570,"children":2571},{"style":531},[2572],{"type":51,"value":1165},{"type":46,"tag":470,"props":2574,"children":2575},{"class":472,"line":1084},[2576,2581,2586,2590,2594,2598,2602,2606],{"type":46,"tag":470,"props":2577,"children":2578},{"style":531},[2579],{"type":51,"value":2580},"      \"",{"type":46,"tag":470,"props":2582,"children":2583},{"style":1105},[2584],{"type":51,"value":2585},"reactor",{"type":46,"tag":470,"props":2587,"children":2588},{"style":531},[2589],{"type":51,"value":876},{"type":46,"tag":470,"props":2591,"children":2592},{"style":531},[2593],{"type":51,"value":417},{"type":46,"tag":470,"props":2595,"children":2596},{"style":531},[2597],{"type":51,"value":993},{"type":46,"tag":470,"props":2599,"children":2600},{"style":483},[2601],{"type":51,"value":998},{"type":46,"tag":470,"props":2603,"children":2604},{"style":531},[2605],{"type":51,"value":876},{"type":46,"tag":470,"props":2607,"children":2608},{"style":531},[2609],{"type":51,"value":1007},{"type":46,"tag":470,"props":2611,"children":2612},{"class":472,"line":1111},[2613,2617,2621,2625,2629,2633,2637,2641],{"type":46,"tag":470,"props":2614,"children":2615},{"style":531},[2616],{"type":51,"value":2580},{"type":46,"tag":470,"props":2618,"children":2619},{"style":1105},[2620],{"type":51,"value":1431},{"type":46,"tag":470,"props":2622,"children":2623},{"style":531},[2624],{"type":51,"value":876},{"type":46,"tag":470,"props":2626,"children":2627},{"style":531},[2628],{"type":51,"value":417},{"type":46,"tag":470,"props":2630,"children":2631},{"style":531},[2632],{"type":51,"value":993},{"type":46,"tag":470,"props":2634,"children":2635},{"style":483},[2636],{"type":51,"value":998},{"type":46,"tag":470,"props":2638,"children":2639},{"style":531},[2640],{"type":51,"value":876},{"type":46,"tag":470,"props":2642,"children":2643},{"style":531},[2644],{"type":51,"value":1007},{"type":46,"tag":470,"props":2646,"children":2647},{"class":472,"line":1314},[2648,2652,2657,2661,2665,2669,2674,2678],{"type":46,"tag":470,"props":2649,"children":2650},{"style":531},[2651],{"type":51,"value":2580},{"type":46,"tag":470,"props":2653,"children":2654},{"style":1105},[2655],{"type":51,"value":2656},"nonce",{"type":46,"tag":470,"props":2658,"children":2659},{"style":531},[2660],{"type":51,"value":876},{"type":46,"tag":470,"props":2662,"children":2663},{"style":531},[2664],{"type":51,"value":417},{"type":46,"tag":470,"props":2666,"children":2667},{"style":531},[2668],{"type":51,"value":993},{"type":46,"tag":470,"props":2670,"children":2671},{"style":483},[2672],{"type":51,"value":2673},"...",{"type":46,"tag":470,"props":2675,"children":2676},{"style":531},[2677],{"type":51,"value":876},{"type":46,"tag":470,"props":2679,"children":2680},{"style":531},[2681],{"type":51,"value":1007},{"type":46,"tag":470,"props":2683,"children":2684},{"class":472,"line":1338},[2685,2689,2694,2698,2702,2707],{"type":46,"tag":470,"props":2686,"children":2687},{"style":531},[2688],{"type":51,"value":2580},{"type":46,"tag":470,"props":2690,"children":2691},{"style":1105},[2692],{"type":51,"value":2693},"deadline",{"type":46,"tag":470,"props":2695,"children":2696},{"style":531},[2697],{"type":51,"value":876},{"type":46,"tag":470,"props":2699,"children":2700},{"style":531},[2701],{"type":51,"value":417},{"type":46,"tag":470,"props":2703,"children":2704},{"style":1105},[2705],{"type":51,"value":2706}," 1772031054",{"type":46,"tag":470,"props":2708,"children":2709},{"style":531},[2710],{"type":51,"value":1007},{"type":46,"tag":470,"props":2712,"children":2713},{"class":472,"line":1347},[2714,2718,2723,2727,2731,2735,2739,2743],{"type":46,"tag":470,"props":2715,"children":2716},{"style":531},[2717],{"type":51,"value":2580},{"type":46,"tag":470,"props":2719,"children":2720},{"style":1105},[2721],{"type":51,"value":2722},"cosigner",{"type":46,"tag":470,"props":2724,"children":2725},{"style":531},[2726],{"type":51,"value":876},{"type":46,"tag":470,"props":2728,"children":2729},{"style":531},[2730],{"type":51,"value":417},{"type":46,"tag":470,"props":2732,"children":2733},{"style":531},[2734],{"type":51,"value":993},{"type":46,"tag":470,"props":2736,"children":2737},{"style":483},[2738],{"type":51,"value":998},{"type":46,"tag":470,"props":2740,"children":2741},{"style":531},[2742],{"type":51,"value":876},{"type":46,"tag":470,"props":2744,"children":2745},{"style":531},[2746],{"type":51,"value":1007},{"type":46,"tag":470,"props":2748,"children":2749},{"class":472,"line":1705},[2750,2754,2758,2762,2766],{"type":46,"tag":470,"props":2751,"children":2752},{"style":531},[2753],{"type":51,"value":2580},{"type":46,"tag":470,"props":2755,"children":2756},{"style":1105},[2757],{"type":51,"value":2084},{"type":46,"tag":470,"props":2759,"children":2760},{"style":531},[2761],{"type":51,"value":876},{"type":46,"tag":470,"props":2763,"children":2764},{"style":531},[2765],{"type":51,"value":417},{"type":46,"tag":470,"props":2767,"children":2768},{"style":531},[2769],{"type":51,"value":1165},{"type":46,"tag":470,"props":2771,"children":2772},{"class":472,"line":1740},[2773,2778,2783,2787,2791,2795,2799,2803],{"type":46,"tag":470,"props":2774,"children":2775},{"style":531},[2776],{"type":51,"value":2777},"        \"",{"type":46,"tag":470,"props":2779,"children":2781},{"style":2780},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[2782],{"type":51,"value":1019},{"type":46,"tag":470,"props":2784,"children":2785},{"style":531},[2786],{"type":51,"value":876},{"type":46,"tag":470,"props":2788,"children":2789},{"style":531},[2790],{"type":51,"value":417},{"type":46,"tag":470,"props":2792,"children":2793},{"style":531},[2794],{"type":51,"value":993},{"type":46,"tag":470,"props":2796,"children":2797},{"style":483},[2798],{"type":51,"value":998},{"type":46,"tag":470,"props":2800,"children":2801},{"style":531},[2802],{"type":51,"value":876},{"type":46,"tag":470,"props":2804,"children":2805},{"style":531},[2806],{"type":51,"value":1007},{"type":46,"tag":470,"props":2808,"children":2809},{"class":472,"line":2421},[2810,2814,2819,2823,2827,2831,2835,2839],{"type":46,"tag":470,"props":2811,"children":2812},{"style":531},[2813],{"type":51,"value":2777},{"type":46,"tag":470,"props":2815,"children":2816},{"style":2780},[2817],{"type":51,"value":2818},"startAmount",{"type":46,"tag":470,"props":2820,"children":2821},{"style":531},[2822],{"type":51,"value":876},{"type":46,"tag":470,"props":2824,"children":2825},{"style":531},[2826],{"type":51,"value":417},{"type":46,"tag":470,"props":2828,"children":2829},{"style":531},[2830],{"type":51,"value":993},{"type":46,"tag":470,"props":2832,"children":2833},{"style":483},[2834],{"type":51,"value":1628},{"type":46,"tag":470,"props":2836,"children":2837},{"style":531},[2838],{"type":51,"value":876},{"type":46,"tag":470,"props":2840,"children":2841},{"style":531},[2842],{"type":51,"value":1007},{"type":46,"tag":470,"props":2844,"children":2845},{"class":472,"line":2447},[2846,2850,2855,2859,2863,2867,2871],{"type":46,"tag":470,"props":2847,"children":2848},{"style":531},[2849],{"type":51,"value":2777},{"type":46,"tag":470,"props":2851,"children":2852},{"style":2780},[2853],{"type":51,"value":2854},"endAmount",{"type":46,"tag":470,"props":2856,"children":2857},{"style":531},[2858],{"type":51,"value":876},{"type":46,"tag":470,"props":2860,"children":2861},{"style":531},[2862],{"type":51,"value":417},{"type":46,"tag":470,"props":2864,"children":2865},{"style":531},[2866],{"type":51,"value":993},{"type":46,"tag":470,"props":2868,"children":2869},{"style":483},[2870],{"type":51,"value":1628},{"type":46,"tag":470,"props":2872,"children":2873},{"style":531},[2874],{"type":51,"value":1737},{"type":46,"tag":470,"props":2876,"children":2878},{"class":472,"line":2877},14,[2879],{"type":46,"tag":470,"props":2880,"children":2881},{"style":531},[2882],{"type":51,"value":2883},"      },\n",{"type":46,"tag":470,"props":2885,"children":2887},{"class":472,"line":2886},15,[2888,2892,2897,2901,2905],{"type":46,"tag":470,"props":2889,"children":2890},{"style":531},[2891],{"type":51,"value":2580},{"type":46,"tag":470,"props":2893,"children":2894},{"style":1105},[2895],{"type":51,"value":2896},"outputs",{"type":46,"tag":470,"props":2898,"children":2899},{"style":531},[2900],{"type":51,"value":876},{"type":46,"tag":470,"props":2902,"children":2903},{"style":531},[2904],{"type":51,"value":417},{"type":46,"tag":470,"props":2906,"children":2907},{"style":531},[2908],{"type":51,"value":2909}," [\n",{"type":46,"tag":470,"props":2911,"children":2913},{"class":472,"line":2912},16,[2914],{"type":46,"tag":470,"props":2915,"children":2916},{"style":531},[2917],{"type":51,"value":2918},"        {\n",{"type":46,"tag":470,"props":2920,"children":2922},{"class":472,"line":2921},17,[2923,2928,2932,2936,2940,2944,2948,2952],{"type":46,"tag":470,"props":2924,"children":2925},{"style":531},[2926],{"type":51,"value":2927},"          \"",{"type":46,"tag":470,"props":2929,"children":2930},{"style":2780},[2931],{"type":51,"value":1019},{"type":46,"tag":470,"props":2933,"children":2934},{"style":531},[2935],{"type":51,"value":876},{"type":46,"tag":470,"props":2937,"children":2938},{"style":531},[2939],{"type":51,"value":417},{"type":46,"tag":470,"props":2941,"children":2942},{"style":531},[2943],{"type":51,"value":993},{"type":46,"tag":470,"props":2945,"children":2946},{"style":483},[2947],{"type":51,"value":998},{"type":46,"tag":470,"props":2949,"children":2950},{"style":531},[2951],{"type":51,"value":876},{"type":46,"tag":470,"props":2953,"children":2954},{"style":531},[2955],{"type":51,"value":1007},{"type":46,"tag":470,"props":2957,"children":2959},{"class":472,"line":2958},18,[2960,2964,2968,2972,2976,2980,2984,2988],{"type":46,"tag":470,"props":2961,"children":2962},{"style":531},[2963],{"type":51,"value":2927},{"type":46,"tag":470,"props":2965,"children":2966},{"style":2780},[2967],{"type":51,"value":2818},{"type":46,"tag":470,"props":2969,"children":2970},{"style":531},[2971],{"type":51,"value":876},{"type":46,"tag":470,"props":2973,"children":2974},{"style":531},[2975],{"type":51,"value":417},{"type":46,"tag":470,"props":2977,"children":2978},{"style":531},[2979],{"type":51,"value":993},{"type":46,"tag":470,"props":2981,"children":2982},{"style":483},[2983],{"type":51,"value":2242},{"type":46,"tag":470,"props":2985,"children":2986},{"style":531},[2987],{"type":51,"value":876},{"type":46,"tag":470,"props":2989,"children":2990},{"style":531},[2991],{"type":51,"value":1007},{"type":46,"tag":470,"props":2993,"children":2995},{"class":472,"line":2994},19,[2996,3000,3004,3008,3012,3016,3021,3025],{"type":46,"tag":470,"props":2997,"children":2998},{"style":531},[2999],{"type":51,"value":2927},{"type":46,"tag":470,"props":3001,"children":3002},{"style":2780},[3003],{"type":51,"value":2854},{"type":46,"tag":470,"props":3005,"children":3006},{"style":531},[3007],{"type":51,"value":876},{"type":46,"tag":470,"props":3009,"children":3010},{"style":531},[3011],{"type":51,"value":417},{"type":46,"tag":470,"props":3013,"children":3014},{"style":531},[3015],{"type":51,"value":993},{"type":46,"tag":470,"props":3017,"children":3018},{"style":483},[3019],{"type":51,"value":3020},"994000000",{"type":46,"tag":470,"props":3022,"children":3023},{"style":531},[3024],{"type":51,"value":876},{"type":46,"tag":470,"props":3026,"children":3027},{"style":531},[3028],{"type":51,"value":1007},{"type":46,"tag":470,"props":3030,"children":3032},{"class":472,"line":3031},20,[3033,3037,3042,3046,3050,3054,3058],{"type":46,"tag":470,"props":3034,"children":3035},{"style":531},[3036],{"type":51,"value":2927},{"type":46,"tag":470,"props":3038,"children":3039},{"style":2780},[3040],{"type":51,"value":3041},"recipient",{"type":46,"tag":470,"props":3043,"children":3044},{"style":531},[3045],{"type":51,"value":876},{"type":46,"tag":470,"props":3047,"children":3048},{"style":531},[3049],{"type":51,"value":417},{"type":46,"tag":470,"props":3051,"children":3052},{"style":531},[3053],{"type":51,"value":993},{"type":46,"tag":470,"props":3055,"children":3056},{"style":483},[3057],{"type":51,"value":998},{"type":46,"tag":470,"props":3059,"children":3060},{"style":531},[3061],{"type":51,"value":1737},{"type":46,"tag":470,"props":3063,"children":3065},{"class":472,"line":3064},21,[3066],{"type":46,"tag":470,"props":3067,"children":3068},{"style":531},[3069],{"type":51,"value":3070},"        }\n",{"type":46,"tag":470,"props":3072,"children":3074},{"class":472,"line":3073},22,[3075],{"type":46,"tag":470,"props":3076,"children":3077},{"style":531},[3078],{"type":51,"value":3079},"      ],\n",{"type":46,"tag":470,"props":3081,"children":3083},{"class":472,"line":3082},23,[3084,3088,3092,3096,3100],{"type":46,"tag":470,"props":3085,"children":3086},{"style":531},[3087],{"type":51,"value":2580},{"type":46,"tag":470,"props":3089,"children":3090},{"style":1105},[3091],{"type":51,"value":1094},{"type":46,"tag":470,"props":3093,"children":3094},{"style":531},[3095],{"type":51,"value":876},{"type":46,"tag":470,"props":3097,"children":3098},{"style":531},[3099],{"type":51,"value":417},{"type":46,"tag":470,"props":3101,"children":3102},{"style":1105},[3103],{"type":51,"value":1108},{"type":46,"tag":470,"props":3105,"children":3107},{"class":472,"line":3106},24,[3108],{"type":46,"tag":470,"props":3109,"children":3110},{"style":531},[3111],{"type":51,"value":3112},"    },\n",{"type":46,"tag":470,"props":3114,"children":3116},{"class":472,"line":3115},25,[3117,3121,3126,3130,3134,3138,3142,3146],{"type":46,"tag":470,"props":3118,"children":3119},{"style":531},[3120],{"type":51,"value":1173},{"type":46,"tag":470,"props":3122,"children":3123},{"style":477},[3124],{"type":51,"value":3125},"encodedOrder",{"type":46,"tag":470,"props":3127,"children":3128},{"style":531},[3129],{"type":51,"value":876},{"type":46,"tag":470,"props":3131,"children":3132},{"style":531},[3133],{"type":51,"value":417},{"type":46,"tag":470,"props":3135,"children":3136},{"style":531},[3137],{"type":51,"value":993},{"type":46,"tag":470,"props":3139,"children":3140},{"style":483},[3141],{"type":51,"value":998},{"type":46,"tag":470,"props":3143,"children":3144},{"style":531},[3145],{"type":51,"value":876},{"type":46,"tag":470,"props":3147,"children":3148},{"style":531},[3149],{"type":51,"value":1007},{"type":46,"tag":470,"props":3151,"children":3153},{"class":472,"line":3152},26,[3154,3158,3163,3167,3171,3175,3179],{"type":46,"tag":470,"props":3155,"children":3156},{"style":531},[3157],{"type":51,"value":1173},{"type":46,"tag":470,"props":3159,"children":3160},{"style":477},[3161],{"type":51,"value":3162},"orderHash",{"type":46,"tag":470,"props":3164,"children":3165},{"style":531},[3166],{"type":51,"value":876},{"type":46,"tag":470,"props":3168,"children":3169},{"style":531},[3170],{"type":51,"value":417},{"type":46,"tag":470,"props":3172,"children":3173},{"style":531},[3174],{"type":51,"value":993},{"type":46,"tag":470,"props":3176,"children":3177},{"style":483},[3178],{"type":51,"value":998},{"type":46,"tag":470,"props":3180,"children":3181},{"style":531},[3182],{"type":51,"value":1737},{"type":46,"tag":470,"props":3184,"children":3186},{"class":472,"line":3185},27,[3187],{"type":46,"tag":470,"props":3188,"children":3189},{"style":531},[3190],{"type":51,"value":2418},{"type":46,"tag":470,"props":3192,"children":3194},{"class":472,"line":3193},28,[3195,3199,3203,3207,3211,3215,3219,3224,3228,3232,3237,3241,3246,3250,3254,3258,3262,3267,3271,3275,3280],{"type":46,"tag":470,"props":3196,"children":3197},{"style":531},[3198],{"type":51,"value":975},{"type":46,"tag":470,"props":3200,"children":3201},{"style":587},[3202],{"type":51,"value":2431},{"type":46,"tag":470,"props":3204,"children":3205},{"style":531},[3206],{"type":51,"value":876},{"type":46,"tag":470,"props":3208,"children":3209},{"style":531},[3210],{"type":51,"value":417},{"type":46,"tag":470,"props":3212,"children":3213},{"style":531},[3214],{"type":51,"value":534},{"type":46,"tag":470,"props":3216,"children":3217},{"style":531},[3218],{"type":51,"value":993},{"type":46,"tag":470,"props":3220,"children":3221},{"style":477},[3222],{"type":51,"value":3223},"domain",{"type":46,"tag":470,"props":3225,"children":3226},{"style":531},[3227],{"type":51,"value":876},{"type":46,"tag":470,"props":3229,"children":3230},{"style":531},[3231],{"type":51,"value":417},{"type":46,"tag":470,"props":3233,"children":3234},{"style":531},[3235],{"type":51,"value":3236}," {},",{"type":46,"tag":470,"props":3238,"children":3239},{"style":531},[3240],{"type":51,"value":993},{"type":46,"tag":470,"props":3242,"children":3243},{"style":477},[3244],{"type":51,"value":3245},"types",{"type":46,"tag":470,"props":3247,"children":3248},{"style":531},[3249],{"type":51,"value":876},{"type":46,"tag":470,"props":3251,"children":3252},{"style":531},[3253],{"type":51,"value":417},{"type":46,"tag":470,"props":3255,"children":3256},{"style":531},[3257],{"type":51,"value":3236},{"type":46,"tag":470,"props":3259,"children":3260},{"style":531},[3261],{"type":51,"value":993},{"type":46,"tag":470,"props":3263,"children":3264},{"style":477},[3265],{"type":51,"value":3266},"values",{"type":46,"tag":470,"props":3268,"children":3269},{"style":531},[3270],{"type":51,"value":876},{"type":46,"tag":470,"props":3272,"children":3273},{"style":531},[3274],{"type":51,"value":417},{"type":46,"tag":470,"props":3276,"children":3277},{"style":531},[3278],{"type":51,"value":3279}," {}",{"type":46,"tag":470,"props":3281,"children":3282},{"style":531},[3283],{"type":51,"value":3284}," }\n",{"type":46,"tag":470,"props":3286,"children":3288},{"class":472,"line":3287},29,[3289],{"type":46,"tag":470,"props":3290,"children":3291},{"style":531},[3292],{"type":51,"value":1117},{"type":46,"tag":880,"props":3294,"children":3295},{},[3296,3329],{"type":46,"tag":54,"props":3297,"children":3298},{},[3299,3304,3306,3312,3314,3319,3321,3327],{"type":46,"tag":72,"props":3300,"children":3301},{},[3302],{"type":51,"value":3303},"UniswapX output amount",{"type":51,"value":3305},": Use ",{"type":46,"tag":80,"props":3307,"children":3309},{"className":3308},[],[3310],{"type":51,"value":3311},"quote.orderInfo.outputs[0].startAmount",{"type":51,"value":3313}," for the best-case fill amount. The ",{"type":46,"tag":80,"props":3315,"children":3317},{"className":3316},[],[3318],{"type":51,"value":2854},{"type":51,"value":3320}," is the floor after full auction decay. There is no ",{"type":46,"tag":80,"props":3322,"children":3324},{"className":3323},[],[3325],{"type":51,"value":3326},"quote.output.amount",{"type":51,"value":3328}," on UniswapX responses — accessing it will throw at runtime.",{"type":46,"tag":54,"props":3330,"children":3331},{},[3332,3337,3339,3344,3346,3351,3353,3358],{"type":46,"tag":72,"props":3333,"children":3334},{},[3335],{"type":51,"value":3336},"Display tip",{"type":51,"value":3338},": For CLASSIC routes, use ",{"type":46,"tag":80,"props":3340,"children":3342},{"className":3341},[],[3343],{"type":51,"value":2352},{"type":51,"value":3345}," (a string with the USD value) for gas cost display. Do ",{"type":46,"tag":72,"props":3347,"children":3348},{},[3349],{"type":51,"value":3350},"not",{"type":51,"value":3352}," manually convert ",{"type":46,"tag":80,"props":3354,"children":3356},{"className":3355},[],[3357],{"type":51,"value":2315},{"type":51,"value":3359}," (wei) using a hardcoded ETH price — this leads to wildly inaccurate estimates (e.g., ~$87 instead of ~$0.01). UniswapX routes are gasless for the swapper.",{"type":46,"tag":54,"props":3361,"children":3362},{},[3363,3364,3370],{"type":51,"value":298},{"type":46,"tag":300,"props":3365,"children":3367},{"href":3366},"#7-quoteresponse-typescript-types",[3368],{"type":51,"value":3369},"QuoteResponse TypeScript Types",{"type":51,"value":3371}," for compile-time type safety across routing types.",{"type":46,"tag":172,"props":3373,"children":3375},{"id":3374},"step-3-execute-swap",[3376],{"type":51,"value":3377},"Step 3: Execute Swap",{"type":46,"tag":397,"props":3379,"children":3381},{"className":462,"code":3380,"language":464,"meta":402,"style":402},"POST \u002Fswap\n",[3382],{"type":46,"tag":80,"props":3383,"children":3384},{"__ignoreMap":402},[3385],{"type":46,"tag":470,"props":3386,"children":3387},{"class":472,"line":473},[3388,3392],{"type":46,"tag":470,"props":3389,"children":3390},{"style":477},[3391],{"type":51,"value":936},{"type":46,"tag":470,"props":3393,"children":3394},{"style":483},[3395],{"type":51,"value":3396}," \u002Fswap\n",{"type":46,"tag":54,"props":3398,"children":3399},{},[3400,3404],{"type":46,"tag":72,"props":3401,"children":3402},{},[3403],{"type":51,"value":949},{"type":51,"value":3405}," - Spread the quote response directly into the body:",{"type":46,"tag":397,"props":3407,"children":3409},{"className":513,"code":3408,"language":515,"meta":402,"style":402},"\u002F\u002F CORRECT: Spread the quote response, strip null fields\nconst quoteResponse = await fetchQuote(params);\n\n\u002F\u002F Always strip permitData\u002FpermitTransaction — handle them explicitly by routing type\nconst { permitData, permitTransaction, ...cleanQuote } = quoteResponse;\nconst swapRequest: Record\u003Cstring, unknown> = { ...cleanQuote };\n\nconst isUniswapX =\n  quoteResponse.routing === 'DUTCH_V2' ||\n  quoteResponse.routing === 'DUTCH_V3' ||\n  quoteResponse.routing === 'PRIORITY';\n\nif (isUniswapX) {\n  \u002F\u002F UniswapX: signature only — permitData must NOT go to \u002Fswap\n  if (permit2Signature) swapRequest.signature = permit2Signature;\n} else {\n  \u002F\u002F CLASSIC: both signature and permitData, or neither\n  if (permit2Signature && permitData && typeof permitData === 'object') {\n    swapRequest.signature = permit2Signature;\n    swapRequest.permitData = permitData;\n  }\n}\n",[3410],{"type":46,"tag":80,"props":3411,"children":3412},{"__ignoreMap":402},[3413,3422,3458,3465,3473,3529,3593,3600,3617,3656,3692,3727,3734,3751,3759,3809,3825,3833,3896,3924,3951,3958],{"type":46,"tag":470,"props":3414,"children":3415},{"class":472,"line":473},[3416],{"type":46,"tag":470,"props":3417,"children":3419},{"style":3418},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[3420],{"type":51,"value":3421},"\u002F\u002F CORRECT: Spread the quote response, strip null fields\n",{"type":46,"tag":470,"props":3423,"children":3424},{"class":472,"line":573},[3425,3429,3434,3439,3444,3449,3454],{"type":46,"tag":470,"props":3426,"children":3427},{"style":587},[3428],{"type":51,"value":590},{"type":46,"tag":470,"props":3430,"children":3431},{"style":537},[3432],{"type":51,"value":3433}," quoteResponse ",{"type":46,"tag":470,"props":3435,"children":3436},{"style":531},[3437],{"type":51,"value":3438},"=",{"type":46,"tag":470,"props":3440,"children":3441},{"style":525},[3442],{"type":51,"value":3443}," await",{"type":46,"tag":470,"props":3445,"children":3446},{"style":631},[3447],{"type":51,"value":3448}," fetchQuote",{"type":46,"tag":470,"props":3450,"children":3451},{"style":537},[3452],{"type":51,"value":3453},"(params)",{"type":46,"tag":470,"props":3455,"children":3456},{"style":531},[3457],{"type":51,"value":570},{"type":46,"tag":470,"props":3459,"children":3460},{"class":472,"line":583},[3461],{"type":46,"tag":470,"props":3462,"children":3463},{"emptyLinePlaceholder":577},[3464],{"type":51,"value":580},{"type":46,"tag":470,"props":3466,"children":3467},{"class":472,"line":1046},[3468],{"type":46,"tag":470,"props":3469,"children":3470},{"style":3418},[3471],{"type":51,"value":3472},"\u002F\u002F Always strip permitData\u002FpermitTransaction — handle them explicitly by routing type\n",{"type":46,"tag":470,"props":3474,"children":3475},{"class":472,"line":1084},[3476,3480,3484,3489,3493,3498,3502,3507,3512,3516,3520,3525],{"type":46,"tag":470,"props":3477,"children":3478},{"style":587},[3479],{"type":51,"value":590},{"type":46,"tag":470,"props":3481,"children":3482},{"style":531},[3483],{"type":51,"value":534},{"type":46,"tag":470,"props":3485,"children":3486},{"style":537},[3487],{"type":51,"value":3488}," permitData",{"type":46,"tag":470,"props":3490,"children":3491},{"style":531},[3492],{"type":51,"value":604},{"type":46,"tag":470,"props":3494,"children":3495},{"style":537},[3496],{"type":51,"value":3497}," permitTransaction",{"type":46,"tag":470,"props":3499,"children":3500},{"style":531},[3501],{"type":51,"value":604},{"type":46,"tag":470,"props":3503,"children":3504},{"style":531},[3505],{"type":51,"value":3506}," ...",{"type":46,"tag":470,"props":3508,"children":3509},{"style":537},[3510],{"type":51,"value":3511},"cleanQuote ",{"type":46,"tag":470,"props":3513,"children":3514},{"style":531},[3515],{"type":51,"value":614},{"type":46,"tag":470,"props":3517,"children":3518},{"style":531},[3519],{"type":51,"value":619},{"type":46,"tag":470,"props":3521,"children":3522},{"style":537},[3523],{"type":51,"value":3524}," quoteResponse",{"type":46,"tag":470,"props":3526,"children":3527},{"style":531},[3528],{"type":51,"value":570},{"type":46,"tag":470,"props":3530,"children":3531},{"class":472,"line":1111},[3532,3536,3541,3545,3550,3554,3559,3563,3568,3572,3576,3580,3584,3588],{"type":46,"tag":470,"props":3533,"children":3534},{"style":587},[3535],{"type":51,"value":590},{"type":46,"tag":470,"props":3537,"children":3538},{"style":537},[3539],{"type":51,"value":3540}," swapRequest",{"type":46,"tag":470,"props":3542,"children":3543},{"style":531},[3544],{"type":51,"value":417},{"type":46,"tag":470,"props":3546,"children":3547},{"style":477},[3548],{"type":51,"value":3549}," Record",{"type":46,"tag":470,"props":3551,"children":3552},{"style":531},[3553],{"type":51,"value":856},{"type":46,"tag":470,"props":3555,"children":3556},{"style":477},[3557],{"type":51,"value":3558},"string",{"type":46,"tag":470,"props":3560,"children":3561},{"style":531},[3562],{"type":51,"value":604},{"type":46,"tag":470,"props":3564,"children":3565},{"style":477},[3566],{"type":51,"value":3567}," unknown",{"type":46,"tag":470,"props":3569,"children":3570},{"style":531},[3571],{"type":51,"value":849},{"type":46,"tag":470,"props":3573,"children":3574},{"style":531},[3575],{"type":51,"value":619},{"type":46,"tag":470,"props":3577,"children":3578},{"style":531},[3579],{"type":51,"value":534},{"type":46,"tag":470,"props":3581,"children":3582},{"style":531},[3583],{"type":51,"value":3506},{"type":46,"tag":470,"props":3585,"children":3586},{"style":537},[3587],{"type":51,"value":3511},{"type":46,"tag":470,"props":3589,"children":3590},{"style":531},[3591],{"type":51,"value":3592},"};\n",{"type":46,"tag":470,"props":3594,"children":3595},{"class":472,"line":1314},[3596],{"type":46,"tag":470,"props":3597,"children":3598},{"emptyLinePlaceholder":577},[3599],{"type":51,"value":580},{"type":46,"tag":470,"props":3601,"children":3602},{"class":472,"line":1338},[3603,3607,3612],{"type":46,"tag":470,"props":3604,"children":3605},{"style":587},[3606],{"type":51,"value":590},{"type":46,"tag":470,"props":3608,"children":3609},{"style":537},[3610],{"type":51,"value":3611}," isUniswapX ",{"type":46,"tag":470,"props":3613,"children":3614},{"style":531},[3615],{"type":51,"value":3616},"=\n",{"type":46,"tag":470,"props":3618,"children":3619},{"class":472,"line":1347},[3620,3625,3629,3634,3639,3643,3647,3651],{"type":46,"tag":470,"props":3621,"children":3622},{"style":537},[3623],{"type":51,"value":3624},"  quoteResponse",{"type":46,"tag":470,"props":3626,"children":3627},{"style":531},[3628],{"type":51,"value":628},{"type":46,"tag":470,"props":3630,"children":3631},{"style":537},[3632],{"type":51,"value":3633},"routing ",{"type":46,"tag":470,"props":3635,"children":3636},{"style":531},[3637],{"type":51,"value":3638},"===",{"type":46,"tag":470,"props":3640,"children":3641},{"style":531},[3642],{"type":51,"value":555},{"type":46,"tag":470,"props":3644,"children":3645},{"style":483},[3646],{"type":51,"value":230},{"type":46,"tag":470,"props":3648,"children":3649},{"style":531},[3650],{"type":51,"value":565},{"type":46,"tag":470,"props":3652,"children":3653},{"style":531},[3654],{"type":51,"value":3655}," ||\n",{"type":46,"tag":470,"props":3657,"children":3658},{"class":472,"line":1705},[3659,3663,3667,3671,3675,3679,3684,3688],{"type":46,"tag":470,"props":3660,"children":3661},{"style":537},[3662],{"type":51,"value":3624},{"type":46,"tag":470,"props":3664,"children":3665},{"style":531},[3666],{"type":51,"value":628},{"type":46,"tag":470,"props":3668,"children":3669},{"style":537},[3670],{"type":51,"value":3633},{"type":46,"tag":470,"props":3672,"children":3673},{"style":531},[3674],{"type":51,"value":3638},{"type":46,"tag":470,"props":3676,"children":3677},{"style":531},[3678],{"type":51,"value":555},{"type":46,"tag":470,"props":3680,"children":3681},{"style":483},[3682],{"type":51,"value":3683},"DUTCH_V3",{"type":46,"tag":470,"props":3685,"children":3686},{"style":531},[3687],{"type":51,"value":565},{"type":46,"tag":470,"props":3689,"children":3690},{"style":531},[3691],{"type":51,"value":3655},{"type":46,"tag":470,"props":3693,"children":3694},{"class":472,"line":1740},[3695,3699,3703,3707,3711,3715,3719,3723],{"type":46,"tag":470,"props":3696,"children":3697},{"style":537},[3698],{"type":51,"value":3624},{"type":46,"tag":470,"props":3700,"children":3701},{"style":531},[3702],{"type":51,"value":628},{"type":46,"tag":470,"props":3704,"children":3705},{"style":537},[3706],{"type":51,"value":3633},{"type":46,"tag":470,"props":3708,"children":3709},{"style":531},[3710],{"type":51,"value":3638},{"type":46,"tag":470,"props":3712,"children":3713},{"style":531},[3714],{"type":51,"value":555},{"type":46,"tag":470,"props":3716,"children":3717},{"style":483},[3718],{"type":51,"value":248},{"type":46,"tag":470,"props":3720,"children":3721},{"style":531},[3722],{"type":51,"value":565},{"type":46,"tag":470,"props":3724,"children":3725},{"style":531},[3726],{"type":51,"value":570},{"type":46,"tag":470,"props":3728,"children":3729},{"class":472,"line":2421},[3730],{"type":46,"tag":470,"props":3731,"children":3732},{"emptyLinePlaceholder":577},[3733],{"type":51,"value":580},{"type":46,"tag":470,"props":3735,"children":3736},{"class":472,"line":2447},[3737,3742,3747],{"type":46,"tag":470,"props":3738,"children":3739},{"style":525},[3740],{"type":51,"value":3741},"if",{"type":46,"tag":470,"props":3743,"children":3744},{"style":537},[3745],{"type":51,"value":3746}," (isUniswapX) ",{"type":46,"tag":470,"props":3748,"children":3749},{"style":531},[3750],{"type":51,"value":967},{"type":46,"tag":470,"props":3752,"children":3753},{"class":472,"line":2877},[3754],{"type":46,"tag":470,"props":3755,"children":3756},{"style":3418},[3757],{"type":51,"value":3758},"  \u002F\u002F UniswapX: signature only — permitData must NOT go to \u002Fswap\n",{"type":46,"tag":470,"props":3760,"children":3761},{"class":472,"line":2886},[3762,3767,3772,3777,3782,3787,3791,3796,3800,3805],{"type":46,"tag":470,"props":3763,"children":3764},{"style":525},[3765],{"type":51,"value":3766},"  if",{"type":46,"tag":470,"props":3768,"children":3769},{"style":2780},[3770],{"type":51,"value":3771}," (",{"type":46,"tag":470,"props":3773,"children":3774},{"style":537},[3775],{"type":51,"value":3776},"permit2Signature",{"type":46,"tag":470,"props":3778,"children":3779},{"style":2780},[3780],{"type":51,"value":3781},") ",{"type":46,"tag":470,"props":3783,"children":3784},{"style":537},[3785],{"type":51,"value":3786},"swapRequest",{"type":46,"tag":470,"props":3788,"children":3789},{"style":531},[3790],{"type":51,"value":628},{"type":46,"tag":470,"props":3792,"children":3793},{"style":537},[3794],{"type":51,"value":3795},"signature",{"type":46,"tag":470,"props":3797,"children":3798},{"style":531},[3799],{"type":51,"value":619},{"type":46,"tag":470,"props":3801,"children":3802},{"style":537},[3803],{"type":51,"value":3804}," permit2Signature",{"type":46,"tag":470,"props":3806,"children":3807},{"style":531},[3808],{"type":51,"value":570},{"type":46,"tag":470,"props":3810,"children":3811},{"class":472,"line":2912},[3812,3816,3821],{"type":46,"tag":470,"props":3813,"children":3814},{"style":531},[3815],{"type":51,"value":614},{"type":46,"tag":470,"props":3817,"children":3818},{"style":525},[3819],{"type":51,"value":3820}," else",{"type":46,"tag":470,"props":3822,"children":3823},{"style":531},[3824],{"type":51,"value":1165},{"type":46,"tag":470,"props":3826,"children":3827},{"class":472,"line":2921},[3828],{"type":46,"tag":470,"props":3829,"children":3830},{"style":3418},[3831],{"type":51,"value":3832},"  \u002F\u002F CLASSIC: both signature and permitData, or neither\n",{"type":46,"tag":470,"props":3834,"children":3835},{"class":472,"line":2958},[3836,3840,3844,3848,3853,3857,3861,3866,3870,3875,3879,3884,3888,3892],{"type":46,"tag":470,"props":3837,"children":3838},{"style":525},[3839],{"type":51,"value":3766},{"type":46,"tag":470,"props":3841,"children":3842},{"style":2780},[3843],{"type":51,"value":3771},{"type":46,"tag":470,"props":3845,"children":3846},{"style":537},[3847],{"type":51,"value":3776},{"type":46,"tag":470,"props":3849,"children":3850},{"style":531},[3851],{"type":51,"value":3852}," &&",{"type":46,"tag":470,"props":3854,"children":3855},{"style":537},[3856],{"type":51,"value":3488},{"type":46,"tag":470,"props":3858,"children":3859},{"style":531},[3860],{"type":51,"value":3852},{"type":46,"tag":470,"props":3862,"children":3863},{"style":531},[3864],{"type":51,"value":3865}," typeof",{"type":46,"tag":470,"props":3867,"children":3868},{"style":537},[3869],{"type":51,"value":3488},{"type":46,"tag":470,"props":3871,"children":3872},{"style":531},[3873],{"type":51,"value":3874}," ===",{"type":46,"tag":470,"props":3876,"children":3877},{"style":531},[3878],{"type":51,"value":555},{"type":46,"tag":470,"props":3880,"children":3881},{"style":483},[3882],{"type":51,"value":3883},"object",{"type":46,"tag":470,"props":3885,"children":3886},{"style":531},[3887],{"type":51,"value":565},{"type":46,"tag":470,"props":3889,"children":3890},{"style":2780},[3891],{"type":51,"value":3781},{"type":46,"tag":470,"props":3893,"children":3894},{"style":531},[3895],{"type":51,"value":967},{"type":46,"tag":470,"props":3897,"children":3898},{"class":472,"line":2994},[3899,3904,3908,3912,3916,3920],{"type":46,"tag":470,"props":3900,"children":3901},{"style":537},[3902],{"type":51,"value":3903},"    swapRequest",{"type":46,"tag":470,"props":3905,"children":3906},{"style":531},[3907],{"type":51,"value":628},{"type":46,"tag":470,"props":3909,"children":3910},{"style":537},[3911],{"type":51,"value":3795},{"type":46,"tag":470,"props":3913,"children":3914},{"style":531},[3915],{"type":51,"value":619},{"type":46,"tag":470,"props":3917,"children":3918},{"style":537},[3919],{"type":51,"value":3804},{"type":46,"tag":470,"props":3921,"children":3922},{"style":531},[3923],{"type":51,"value":570},{"type":46,"tag":470,"props":3925,"children":3926},{"class":472,"line":3031},[3927,3931,3935,3939,3943,3947],{"type":46,"tag":470,"props":3928,"children":3929},{"style":537},[3930],{"type":51,"value":3903},{"type":46,"tag":470,"props":3932,"children":3933},{"style":531},[3934],{"type":51,"value":628},{"type":46,"tag":470,"props":3936,"children":3937},{"style":537},[3938],{"type":51,"value":2431},{"type":46,"tag":470,"props":3940,"children":3941},{"style":531},[3942],{"type":51,"value":619},{"type":46,"tag":470,"props":3944,"children":3945},{"style":537},[3946],{"type":51,"value":3488},{"type":46,"tag":470,"props":3948,"children":3949},{"style":531},[3950],{"type":51,"value":570},{"type":46,"tag":470,"props":3952,"children":3953},{"class":472,"line":3064},[3954],{"type":46,"tag":470,"props":3955,"children":3956},{"style":531},[3957],{"type":51,"value":1344},{"type":46,"tag":470,"props":3959,"children":3960},{"class":472,"line":3073},[3961],{"type":46,"tag":470,"props":3962,"children":3963},{"style":531},[3964],{"type":51,"value":1117},{"type":46,"tag":54,"props":3966,"children":3967},{},[3968,3973,3975,3981],{"type":46,"tag":72,"props":3969,"children":3970},{},[3971],{"type":51,"value":3972},"Critical",{"type":51,"value":3974},": Do NOT wrap the quote in ",{"type":46,"tag":80,"props":3976,"children":3978},{"className":3977},[],[3979],{"type":51,"value":3980},"{quote: quoteResponse}",{"type":51,"value":3982},". The API expects the quote response fields spread into the request body.",{"type":46,"tag":54,"props":3984,"children":3985},{},[3986,3991],{"type":46,"tag":72,"props":3987,"children":3988},{},[3989],{"type":51,"value":3990},"Permit2 Rules",{"type":51,"value":3992}," (CLASSIC routes):",{"type":46,"tag":719,"props":3994,"children":3995},{},[3996,4012,4025],{"type":46,"tag":723,"props":3997,"children":3998},{},[3999,4004,4005,4010],{"type":46,"tag":80,"props":4000,"children":4002},{"className":4001},[],[4003],{"type":51,"value":3795},{"type":51,"value":1764},{"type":46,"tag":80,"props":4006,"children":4008},{"className":4007},[],[4009],{"type":51,"value":2431},{"type":51,"value":4011}," must BOTH be present, or BOTH be absent",{"type":46,"tag":723,"props":4013,"children":4014},{},[4015,4017,4023],{"type":51,"value":4016},"Never set ",{"type":46,"tag":80,"props":4018,"children":4020},{"className":4019},[],[4021],{"type":51,"value":4022},"permitData: null",{"type":51,"value":4024}," — omit the field entirely",{"type":46,"tag":723,"props":4026,"children":4027},{},[4028,4030,4035],{"type":51,"value":4029},"The quote response often includes ",{"type":46,"tag":80,"props":4031,"children":4033},{"className":4032},[],[4034],{"type":51,"value":4022},{"type":51,"value":4036}," — strip this before sending",{"type":46,"tag":54,"props":4038,"children":4039},{},[4040,4045,4047,4052,4054,4059,4061,4067,4069,4075],{"type":46,"tag":72,"props":4041,"children":4042},{},[4043],{"type":51,"value":4044},"UniswapX Routes",{"type":51,"value":4046}," (DUTCH_V2\u002FV3\u002FPRIORITY): ",{"type":46,"tag":80,"props":4048,"children":4050},{"className":4049},[],[4051],{"type":51,"value":2431},{"type":51,"value":4053}," is used locally to sign the order but must be ",{"type":46,"tag":72,"props":4055,"children":4056},{},[4057],{"type":51,"value":4058},"excluded",{"type":51,"value":4060}," from the ",{"type":46,"tag":80,"props":4062,"children":4064},{"className":4063},[],[4065],{"type":51,"value":4066},"\u002Fswap",{"type":51,"value":4068}," body. See ",{"type":46,"tag":300,"props":4070,"children":4072},{"href":4071},"#uniswapx-signing-vs-submission-flow",[4073],{"type":51,"value":4074},"Signing vs. Submission Flow",{"type":51,"value":628},{"type":46,"tag":54,"props":4077,"children":4078},{},[4079,4083],{"type":46,"tag":72,"props":4080,"children":4081},{},[4082],{"type":51,"value":1125},{"type":51,"value":4084}," (ready-to-sign transaction):",{"type":46,"tag":397,"props":4086,"children":4088},{"className":953,"code":4087,"language":955,"meta":402,"style":402},"{\n  \"swap\": {\n    \"to\": \"0x...\",\n    \"from\": \"0x...\",\n    \"data\": \"0x...\",\n    \"value\": \"0\",\n    \"chainId\": 1,\n    \"gasLimit\": \"250000\"\n  }\n}\n",[4089],{"type":46,"tag":80,"props":4090,"children":4091},{"__ignoreMap":402},[4092,4099,4123,4158,4193,4228,4263,4291,4324,4331],{"type":46,"tag":470,"props":4093,"children":4094},{"class":472,"line":473},[4095],{"type":46,"tag":470,"props":4096,"children":4097},{"style":531},[4098],{"type":51,"value":967},{"type":46,"tag":470,"props":4100,"children":4101},{"class":472,"line":573},[4102,4106,4111,4115,4119],{"type":46,"tag":470,"props":4103,"children":4104},{"style":531},[4105],{"type":51,"value":975},{"type":46,"tag":470,"props":4107,"children":4108},{"style":587},[4109],{"type":51,"value":4110},"swap",{"type":46,"tag":470,"props":4112,"children":4113},{"style":531},[4114],{"type":51,"value":876},{"type":46,"tag":470,"props":4116,"children":4117},{"style":531},[4118],{"type":51,"value":417},{"type":46,"tag":470,"props":4120,"children":4121},{"style":531},[4122],{"type":51,"value":1165},{"type":46,"tag":470,"props":4124,"children":4125},{"class":472,"line":583},[4126,4130,4134,4138,4142,4146,4150,4154],{"type":46,"tag":470,"props":4127,"children":4128},{"style":531},[4129],{"type":51,"value":1173},{"type":46,"tag":470,"props":4131,"children":4132},{"style":477},[4133],{"type":51,"value":1178},{"type":46,"tag":470,"props":4135,"children":4136},{"style":531},[4137],{"type":51,"value":876},{"type":46,"tag":470,"props":4139,"children":4140},{"style":531},[4141],{"type":51,"value":417},{"type":46,"tag":470,"props":4143,"children":4144},{"style":531},[4145],{"type":51,"value":993},{"type":46,"tag":470,"props":4147,"children":4148},{"style":483},[4149],{"type":51,"value":998},{"type":46,"tag":470,"props":4151,"children":4152},{"style":531},[4153],{"type":51,"value":876},{"type":46,"tag":470,"props":4155,"children":4156},{"style":531},[4157],{"type":51,"value":1007},{"type":46,"tag":470,"props":4159,"children":4160},{"class":472,"line":1046},[4161,4165,4169,4173,4177,4181,4185,4189],{"type":46,"tag":470,"props":4162,"children":4163},{"style":531},[4164],{"type":51,"value":1173},{"type":46,"tag":470,"props":4166,"children":4167},{"style":477},[4168],{"type":51,"value":1214},{"type":46,"tag":470,"props":4170,"children":4171},{"style":531},[4172],{"type":51,"value":876},{"type":46,"tag":470,"props":4174,"children":4175},{"style":531},[4176],{"type":51,"value":417},{"type":46,"tag":470,"props":4178,"children":4179},{"style":531},[4180],{"type":51,"value":993},{"type":46,"tag":470,"props":4182,"children":4183},{"style":483},[4184],{"type":51,"value":998},{"type":46,"tag":470,"props":4186,"children":4187},{"style":531},[4188],{"type":51,"value":876},{"type":46,"tag":470,"props":4190,"children":4191},{"style":531},[4192],{"type":51,"value":1007},{"type":46,"tag":470,"props":4194,"children":4195},{"class":472,"line":1084},[4196,4200,4204,4208,4212,4216,4220,4224],{"type":46,"tag":470,"props":4197,"children":4198},{"style":531},[4199],{"type":51,"value":1173},{"type":46,"tag":470,"props":4201,"children":4202},{"style":477},[4203],{"type":51,"value":1250},{"type":46,"tag":470,"props":4205,"children":4206},{"style":531},[4207],{"type":51,"value":876},{"type":46,"tag":470,"props":4209,"children":4210},{"style":531},[4211],{"type":51,"value":417},{"type":46,"tag":470,"props":4213,"children":4214},{"style":531},[4215],{"type":51,"value":993},{"type":46,"tag":470,"props":4217,"children":4218},{"style":483},[4219],{"type":51,"value":998},{"type":46,"tag":470,"props":4221,"children":4222},{"style":531},[4223],{"type":51,"value":876},{"type":46,"tag":470,"props":4225,"children":4226},{"style":531},[4227],{"type":51,"value":1007},{"type":46,"tag":470,"props":4229,"children":4230},{"class":472,"line":1111},[4231,4235,4239,4243,4247,4251,4255,4259],{"type":46,"tag":470,"props":4232,"children":4233},{"style":531},[4234],{"type":51,"value":1173},{"type":46,"tag":470,"props":4236,"children":4237},{"style":477},[4238],{"type":51,"value":1286},{"type":46,"tag":470,"props":4240,"children":4241},{"style":531},[4242],{"type":51,"value":876},{"type":46,"tag":470,"props":4244,"children":4245},{"style":531},[4246],{"type":51,"value":417},{"type":46,"tag":470,"props":4248,"children":4249},{"style":531},[4250],{"type":51,"value":993},{"type":46,"tag":470,"props":4252,"children":4253},{"style":483},[4254],{"type":51,"value":1303},{"type":46,"tag":470,"props":4256,"children":4257},{"style":531},[4258],{"type":51,"value":876},{"type":46,"tag":470,"props":4260,"children":4261},{"style":531},[4262],{"type":51,"value":1007},{"type":46,"tag":470,"props":4264,"children":4265},{"class":472,"line":1314},[4266,4270,4274,4278,4282,4287],{"type":46,"tag":470,"props":4267,"children":4268},{"style":531},[4269],{"type":51,"value":1173},{"type":46,"tag":470,"props":4271,"children":4272},{"style":477},[4273],{"type":51,"value":1094},{"type":46,"tag":470,"props":4275,"children":4276},{"style":531},[4277],{"type":51,"value":876},{"type":46,"tag":470,"props":4279,"children":4280},{"style":531},[4281],{"type":51,"value":417},{"type":46,"tag":470,"props":4283,"children":4284},{"style":1105},[4285],{"type":51,"value":4286}," 1",{"type":46,"tag":470,"props":4288,"children":4289},{"style":531},[4290],{"type":51,"value":1007},{"type":46,"tag":470,"props":4292,"children":4293},{"class":472,"line":1338},[4294,4298,4303,4307,4311,4315,4320],{"type":46,"tag":470,"props":4295,"children":4296},{"style":531},[4297],{"type":51,"value":1173},{"type":46,"tag":470,"props":4299,"children":4300},{"style":477},[4301],{"type":51,"value":4302},"gasLimit",{"type":46,"tag":470,"props":4304,"children":4305},{"style":531},[4306],{"type":51,"value":876},{"type":46,"tag":470,"props":4308,"children":4309},{"style":531},[4310],{"type":51,"value":417},{"type":46,"tag":470,"props":4312,"children":4313},{"style":531},[4314],{"type":51,"value":993},{"type":46,"tag":470,"props":4316,"children":4317},{"style":483},[4318],{"type":51,"value":4319},"250000",{"type":46,"tag":470,"props":4321,"children":4322},{"style":531},[4323],{"type":51,"value":1737},{"type":46,"tag":470,"props":4325,"children":4326},{"class":472,"line":1347},[4327],{"type":46,"tag":470,"props":4328,"children":4329},{"style":531},[4330],{"type":51,"value":1344},{"type":46,"tag":470,"props":4332,"children":4333},{"class":472,"line":1705},[4334],{"type":46,"tag":470,"props":4335,"children":4336},{"style":531},[4337],{"type":51,"value":1117},{"type":46,"tag":54,"props":4339,"children":4340},{},[4341,4346],{"type":46,"tag":72,"props":4342,"children":4343},{},[4344],{"type":51,"value":4345},"Response Validation",{"type":51,"value":4347}," - Always validate before broadcasting:",{"type":46,"tag":397,"props":4349,"children":4351},{"className":513,"code":4350,"language":515,"meta":402,"style":402},"function validateSwapResponse(response: SwapResponse): void {\n  if (!response.swap?.data || response.swap.data === '' || response.swap.data === '0x') {\n    throw new Error('swap.data is empty - quote may have expired');\n  }\n  if (!isAddress(response.swap.to) || !isAddress(response.swap.from)) {\n    throw new Error('Invalid address in swap response');\n  }\n}\n",[4352],{"type":46,"tag":80,"props":4353,"children":4354},{"__ignoreMap":402},[4355,4401,4522,4565,4572,4667,4707,4714],{"type":46,"tag":470,"props":4356,"children":4357},{"class":472,"line":473},[4358,4363,4368,4372,4378,4382,4387,4392,4397],{"type":46,"tag":470,"props":4359,"children":4360},{"style":587},[4361],{"type":51,"value":4362},"function",{"type":46,"tag":470,"props":4364,"children":4365},{"style":631},[4366],{"type":51,"value":4367}," validateSwapResponse",{"type":46,"tag":470,"props":4369,"children":4370},{"style":531},[4371],{"type":51,"value":835},{"type":46,"tag":470,"props":4373,"children":4375},{"style":4374},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[4376],{"type":51,"value":4377},"response",{"type":46,"tag":470,"props":4379,"children":4380},{"style":531},[4381],{"type":51,"value":417},{"type":46,"tag":470,"props":4383,"children":4384},{"style":477},[4385],{"type":51,"value":4386}," SwapResponse",{"type":46,"tag":470,"props":4388,"children":4389},{"style":531},[4390],{"type":51,"value":4391},"):",{"type":46,"tag":470,"props":4393,"children":4394},{"style":477},[4395],{"type":51,"value":4396}," void",{"type":46,"tag":470,"props":4398,"children":4399},{"style":531},[4400],{"type":51,"value":1165},{"type":46,"tag":470,"props":4402,"children":4403},{"class":472,"line":573},[4404,4408,4412,4417,4421,4425,4429,4434,4438,4443,4448,4452,4456,4460,4464,4468,4473,4477,4481,4485,4489,4493,4497,4501,4505,4510,4514,4518],{"type":46,"tag":470,"props":4405,"children":4406},{"style":525},[4407],{"type":51,"value":3766},{"type":46,"tag":470,"props":4409,"children":4410},{"style":2780},[4411],{"type":51,"value":3771},{"type":46,"tag":470,"props":4413,"children":4414},{"style":531},[4415],{"type":51,"value":4416},"!",{"type":46,"tag":470,"props":4418,"children":4419},{"style":537},[4420],{"type":51,"value":4377},{"type":46,"tag":470,"props":4422,"children":4423},{"style":531},[4424],{"type":51,"value":628},{"type":46,"tag":470,"props":4426,"children":4427},{"style":537},[4428],{"type":51,"value":4110},{"type":46,"tag":470,"props":4430,"children":4431},{"style":531},[4432],{"type":51,"value":4433},"?.",{"type":46,"tag":470,"props":4435,"children":4436},{"style":537},[4437],{"type":51,"value":1250},{"type":46,"tag":470,"props":4439,"children":4440},{"style":531},[4441],{"type":51,"value":4442}," ||",{"type":46,"tag":470,"props":4444,"children":4445},{"style":537},[4446],{"type":51,"value":4447}," response",{"type":46,"tag":470,"props":4449,"children":4450},{"style":531},[4451],{"type":51,"value":628},{"type":46,"tag":470,"props":4453,"children":4454},{"style":537},[4455],{"type":51,"value":4110},{"type":46,"tag":470,"props":4457,"children":4458},{"style":531},[4459],{"type":51,"value":628},{"type":46,"tag":470,"props":4461,"children":4462},{"style":537},[4463],{"type":51,"value":1250},{"type":46,"tag":470,"props":4465,"children":4466},{"style":531},[4467],{"type":51,"value":3874},{"type":46,"tag":470,"props":4469,"children":4470},{"style":531},[4471],{"type":51,"value":4472}," ''",{"type":46,"tag":470,"props":4474,"children":4475},{"style":531},[4476],{"type":51,"value":4442},{"type":46,"tag":470,"props":4478,"children":4479},{"style":537},[4480],{"type":51,"value":4447},{"type":46,"tag":470,"props":4482,"children":4483},{"style":531},[4484],{"type":51,"value":628},{"type":46,"tag":470,"props":4486,"children":4487},{"style":537},[4488],{"type":51,"value":4110},{"type":46,"tag":470,"props":4490,"children":4491},{"style":531},[4492],{"type":51,"value":628},{"type":46,"tag":470,"props":4494,"children":4495},{"style":537},[4496],{"type":51,"value":1250},{"type":46,"tag":470,"props":4498,"children":4499},{"style":531},[4500],{"type":51,"value":3874},{"type":46,"tag":470,"props":4502,"children":4503},{"style":531},[4504],{"type":51,"value":555},{"type":46,"tag":470,"props":4506,"children":4507},{"style":483},[4508],{"type":51,"value":4509},"0x",{"type":46,"tag":470,"props":4511,"children":4512},{"style":531},[4513],{"type":51,"value":565},{"type":46,"tag":470,"props":4515,"children":4516},{"style":2780},[4517],{"type":51,"value":3781},{"type":46,"tag":470,"props":4519,"children":4520},{"style":531},[4521],{"type":51,"value":967},{"type":46,"tag":470,"props":4523,"children":4524},{"class":472,"line":583},[4525,4530,4535,4540,4544,4548,4553,4557,4561],{"type":46,"tag":470,"props":4526,"children":4527},{"style":525},[4528],{"type":51,"value":4529},"    throw",{"type":46,"tag":470,"props":4531,"children":4532},{"style":531},[4533],{"type":51,"value":4534}," new",{"type":46,"tag":470,"props":4536,"children":4537},{"style":631},[4538],{"type":51,"value":4539}," Error",{"type":46,"tag":470,"props":4541,"children":4542},{"style":2780},[4543],{"type":51,"value":835},{"type":46,"tag":470,"props":4545,"children":4546},{"style":531},[4547],{"type":51,"value":565},{"type":46,"tag":470,"props":4549,"children":4550},{"style":483},[4551],{"type":51,"value":4552},"swap.data is empty - quote may have expired",{"type":46,"tag":470,"props":4554,"children":4555},{"style":531},[4556],{"type":51,"value":565},{"type":46,"tag":470,"props":4558,"children":4559},{"style":2780},[4560],{"type":51,"value":842},{"type":46,"tag":470,"props":4562,"children":4563},{"style":531},[4564],{"type":51,"value":570},{"type":46,"tag":470,"props":4566,"children":4567},{"class":472,"line":1046},[4568],{"type":46,"tag":470,"props":4569,"children":4570},{"style":531},[4571],{"type":51,"value":1344},{"type":46,"tag":470,"props":4573,"children":4574},{"class":472,"line":1084},[4575,4579,4583,4587,4592,4596,4600,4604,4608,4612,4616,4620,4625,4630,4634,4638,4642,4646,4650,4654,4658,4663],{"type":46,"tag":470,"props":4576,"children":4577},{"style":525},[4578],{"type":51,"value":3766},{"type":46,"tag":470,"props":4580,"children":4581},{"style":2780},[4582],{"type":51,"value":3771},{"type":46,"tag":470,"props":4584,"children":4585},{"style":531},[4586],{"type":51,"value":4416},{"type":46,"tag":470,"props":4588,"children":4589},{"style":631},[4590],{"type":51,"value":4591},"isAddress",{"type":46,"tag":470,"props":4593,"children":4594},{"style":2780},[4595],{"type":51,"value":835},{"type":46,"tag":470,"props":4597,"children":4598},{"style":537},[4599],{"type":51,"value":4377},{"type":46,"tag":470,"props":4601,"children":4602},{"style":531},[4603],{"type":51,"value":628},{"type":46,"tag":470,"props":4605,"children":4606},{"style":537},[4607],{"type":51,"value":4110},{"type":46,"tag":470,"props":4609,"children":4610},{"style":531},[4611],{"type":51,"value":628},{"type":46,"tag":470,"props":4613,"children":4614},{"style":537},[4615],{"type":51,"value":1178},{"type":46,"tag":470,"props":4617,"children":4618},{"style":2780},[4619],{"type":51,"value":3781},{"type":46,"tag":470,"props":4621,"children":4622},{"style":531},[4623],{"type":51,"value":4624},"||",{"type":46,"tag":470,"props":4626,"children":4627},{"style":531},[4628],{"type":51,"value":4629}," !",{"type":46,"tag":470,"props":4631,"children":4632},{"style":631},[4633],{"type":51,"value":4591},{"type":46,"tag":470,"props":4635,"children":4636},{"style":2780},[4637],{"type":51,"value":835},{"type":46,"tag":470,"props":4639,"children":4640},{"style":537},[4641],{"type":51,"value":4377},{"type":46,"tag":470,"props":4643,"children":4644},{"style":531},[4645],{"type":51,"value":628},{"type":46,"tag":470,"props":4647,"children":4648},{"style":537},[4649],{"type":51,"value":4110},{"type":46,"tag":470,"props":4651,"children":4652},{"style":531},[4653],{"type":51,"value":628},{"type":46,"tag":470,"props":4655,"children":4656},{"style":537},[4657],{"type":51,"value":1214},{"type":46,"tag":470,"props":4659,"children":4660},{"style":2780},[4661],{"type":51,"value":4662},")) ",{"type":46,"tag":470,"props":4664,"children":4665},{"style":531},[4666],{"type":51,"value":967},{"type":46,"tag":470,"props":4668,"children":4669},{"class":472,"line":1111},[4670,4674,4678,4682,4686,4690,4695,4699,4703],{"type":46,"tag":470,"props":4671,"children":4672},{"style":525},[4673],{"type":51,"value":4529},{"type":46,"tag":470,"props":4675,"children":4676},{"style":531},[4677],{"type":51,"value":4534},{"type":46,"tag":470,"props":4679,"children":4680},{"style":631},[4681],{"type":51,"value":4539},{"type":46,"tag":470,"props":4683,"children":4684},{"style":2780},[4685],{"type":51,"value":835},{"type":46,"tag":470,"props":4687,"children":4688},{"style":531},[4689],{"type":51,"value":565},{"type":46,"tag":470,"props":4691,"children":4692},{"style":483},[4693],{"type":51,"value":4694},"Invalid address in swap response",{"type":46,"tag":470,"props":4696,"children":4697},{"style":531},[4698],{"type":51,"value":565},{"type":46,"tag":470,"props":4700,"children":4701},{"style":2780},[4702],{"type":51,"value":842},{"type":46,"tag":470,"props":4704,"children":4705},{"style":531},[4706],{"type":51,"value":570},{"type":46,"tag":470,"props":4708,"children":4709},{"class":472,"line":1314},[4710],{"type":46,"tag":470,"props":4711,"children":4712},{"style":531},[4713],{"type":51,"value":1344},{"type":46,"tag":470,"props":4715,"children":4716},{"class":472,"line":1338},[4717],{"type":46,"tag":470,"props":4718,"children":4719},{"style":531},[4720],{"type":51,"value":1117},{"type":46,"tag":172,"props":4722,"children":4724},{"id":4723},"supported-chains",[4725],{"type":51,"value":4726},"Supported Chains",{"type":46,"tag":54,"props":4728,"children":4729},{},[4730,4731,4736],{"type":51,"value":431},{"type":46,"tag":300,"props":4732,"children":4734},{"href":753,"rel":4733},[372],[4735],{"type":51,"value":757},{"type":51,"value":4737}," for the current set of chains and their IDs.",{"type":46,"tag":172,"props":4739,"children":4741},{"id":4740},"routing-types",[4742],{"type":51,"value":305},{"type":46,"tag":93,"props":4744,"children":4745},{},[4746,4760],{"type":46,"tag":97,"props":4747,"children":4748},{},[4749],{"type":46,"tag":101,"props":4750,"children":4751},{},[4752,4756],{"type":46,"tag":105,"props":4753,"children":4754},{},[4755],{"type":51,"value":191},{"type":46,"tag":105,"props":4757,"children":4758},{},[4759],{"type":51,"value":196},{"type":46,"tag":116,"props":4761,"children":4762},{},[4763,4774,4785,4797,4809,4822,4835,4846,4857,4870],{"type":46,"tag":101,"props":4764,"children":4765},{},[4766,4770],{"type":46,"tag":123,"props":4767,"children":4768},{},[4769],{"type":51,"value":212},{"type":46,"tag":123,"props":4771,"children":4772},{},[4773],{"type":51,"value":217},{"type":46,"tag":101,"props":4775,"children":4776},{},[4777,4781],{"type":46,"tag":123,"props":4778,"children":4779},{},[4780],{"type":51,"value":230},{"type":46,"tag":123,"props":4782,"children":4783},{},[4784],{"type":51,"value":235},{"type":46,"tag":101,"props":4786,"children":4787},{},[4788,4792],{"type":46,"tag":123,"props":4789,"children":4790},{},[4791],{"type":51,"value":3683},{"type":46,"tag":123,"props":4793,"children":4794},{},[4795],{"type":51,"value":4796},"UniswapX Dutch auction V3",{"type":46,"tag":101,"props":4798,"children":4799},{},[4800,4804],{"type":46,"tag":123,"props":4801,"children":4802},{},[4803],{"type":51,"value":248},{"type":46,"tag":123,"props":4805,"children":4806},{},[4807],{"type":51,"value":4808},"MEV-protected priority order (Base, Unichain)",{"type":46,"tag":101,"props":4810,"children":4811},{},[4812,4817],{"type":46,"tag":123,"props":4813,"children":4814},{},[4815],{"type":51,"value":4816},"DUTCH_LIMIT",{"type":46,"tag":123,"props":4818,"children":4819},{},[4820],{"type":51,"value":4821},"UniswapX Dutch limit order",{"type":46,"tag":101,"props":4823,"children":4824},{},[4825,4830],{"type":46,"tag":123,"props":4826,"children":4827},{},[4828],{"type":51,"value":4829},"LIMIT_ORDER",{"type":46,"tag":123,"props":4831,"children":4832},{},[4833],{"type":51,"value":4834},"Limit order",{"type":46,"tag":101,"props":4836,"children":4837},{},[4838,4842],{"type":46,"tag":123,"props":4839,"children":4840},{},[4841],{"type":51,"value":266},{"type":46,"tag":123,"props":4843,"children":4844},{},[4845],{"type":51,"value":271},{"type":46,"tag":101,"props":4847,"children":4848},{},[4849,4853],{"type":46,"tag":123,"props":4850,"children":4851},{},[4852],{"type":51,"value":284},{"type":46,"tag":123,"props":4854,"children":4855},{},[4856],{"type":51,"value":289},{"type":46,"tag":101,"props":4858,"children":4859},{},[4860,4865],{"type":46,"tag":123,"props":4861,"children":4862},{},[4863],{"type":51,"value":4864},"BRIDGE",{"type":46,"tag":123,"props":4866,"children":4867},{},[4868],{"type":51,"value":4869},"Cross-chain bridge",{"type":46,"tag":101,"props":4871,"children":4872},{},[4873,4878],{"type":46,"tag":123,"props":4874,"children":4875},{},[4876],{"type":51,"value":4877},"QUICKROUTE",{"type":46,"tag":123,"props":4879,"children":4880},{},[4881],{"type":51,"value":4882},"Fast approximation quote",{"type":46,"tag":54,"props":4884,"children":4885},{},[4886,4891,4893,4899],{"type":46,"tag":72,"props":4887,"children":4888},{},[4889],{"type":51,"value":4890},"UniswapX availability",{"type":51,"value":4892},": UniswapX V2 orders are supported on Ethereum (1), Arbitrum (42161), Base (8453), and Unichain (130). The auction mechanism varies by chain — see ",{"type":46,"tag":300,"props":4894,"children":4896},{"href":4895},"#uniswapx-auction-types",[4897],{"type":51,"value":4898},"UniswapX Auction Types",{"type":51,"value":4900}," below.",{"type":46,"tag":704,"props":4902,"children":4903},{},[],{"type":46,"tag":60,"props":4905,"children":4907},{"id":4906},"critical-implementation-notes",[4908],{"type":51,"value":4909},"Critical Implementation Notes",{"type":46,"tag":54,"props":4911,"children":4912},{},[4913,4915],{"type":51,"value":4914},"These are common pitfalls discovered during real-world Trading API integration. ",{"type":46,"tag":72,"props":4916,"children":4917},{},[4918],{"type":51,"value":4919},"Follow these rules to avoid on-chain reverts and API errors.",{"type":46,"tag":172,"props":4921,"children":4923},{"id":4922},"_1-swap-request-body-format",[4924],{"type":51,"value":4925},"1. Swap Request Body Format",{"type":46,"tag":54,"props":4927,"children":4928},{},[4929,4931,4936,4938,4943,4945,4950],{"type":51,"value":4930},"The ",{"type":46,"tag":80,"props":4932,"children":4934},{"className":4933},[],[4935],{"type":51,"value":4066},{"type":51,"value":4937}," endpoint expects the quote response ",{"type":46,"tag":72,"props":4939,"children":4940},{},[4941],{"type":51,"value":4942},"spread into the request body",{"type":51,"value":4944},", not wrapped in a ",{"type":46,"tag":80,"props":4946,"children":4948},{"className":4947},[],[4949],{"type":51,"value":2060},{"type":51,"value":4951}," field.",{"type":46,"tag":397,"props":4953,"children":4955},{"className":513,"code":4954,"language":515,"meta":402,"style":402},"\u002F\u002F WRONG - causes \"quote does not match any of the allowed types\"\nconst badRequest = {\n  quote: quoteResponse, \u002F\u002F Don't wrap!\n  signature: '0x...',\n};\n\n\u002F\u002F CORRECT - spread the quote response\nconst goodRequest = {\n  ...quoteResponse,\n  signature: '0x...', \u002F\u002F Only if using Permit2\n};\n",[4956],{"type":46,"tag":80,"props":4957,"children":4958},{"__ignoreMap":402},[4959,4967,4987,5012,5040,5047,5054,5062,5082,5099,5131],{"type":46,"tag":470,"props":4960,"children":4961},{"class":472,"line":473},[4962],{"type":46,"tag":470,"props":4963,"children":4964},{"style":3418},[4965],{"type":51,"value":4966},"\u002F\u002F WRONG - causes \"quote does not match any of the allowed types\"\n",{"type":46,"tag":470,"props":4968,"children":4969},{"class":472,"line":573},[4970,4974,4979,4983],{"type":46,"tag":470,"props":4971,"children":4972},{"style":587},[4973],{"type":51,"value":590},{"type":46,"tag":470,"props":4975,"children":4976},{"style":537},[4977],{"type":51,"value":4978}," badRequest ",{"type":46,"tag":470,"props":4980,"children":4981},{"style":531},[4982],{"type":51,"value":3438},{"type":46,"tag":470,"props":4984,"children":4985},{"style":531},[4986],{"type":51,"value":1165},{"type":46,"tag":470,"props":4988,"children":4989},{"class":472,"line":583},[4990,4995,4999,5003,5007],{"type":46,"tag":470,"props":4991,"children":4992},{"style":2780},[4993],{"type":51,"value":4994},"  quote",{"type":46,"tag":470,"props":4996,"children":4997},{"style":531},[4998],{"type":51,"value":417},{"type":46,"tag":470,"props":5000,"children":5001},{"style":537},[5002],{"type":51,"value":3524},{"type":46,"tag":470,"props":5004,"children":5005},{"style":531},[5006],{"type":51,"value":604},{"type":46,"tag":470,"props":5008,"children":5009},{"style":3418},[5010],{"type":51,"value":5011}," \u002F\u002F Don't wrap!\n",{"type":46,"tag":470,"props":5013,"children":5014},{"class":472,"line":1046},[5015,5020,5024,5028,5032,5036],{"type":46,"tag":470,"props":5016,"children":5017},{"style":2780},[5018],{"type":51,"value":5019},"  signature",{"type":46,"tag":470,"props":5021,"children":5022},{"style":531},[5023],{"type":51,"value":417},{"type":46,"tag":470,"props":5025,"children":5026},{"style":531},[5027],{"type":51,"value":555},{"type":46,"tag":470,"props":5029,"children":5030},{"style":483},[5031],{"type":51,"value":998},{"type":46,"tag":470,"props":5033,"children":5034},{"style":531},[5035],{"type":51,"value":565},{"type":46,"tag":470,"props":5037,"children":5038},{"style":531},[5039],{"type":51,"value":1007},{"type":46,"tag":470,"props":5041,"children":5042},{"class":472,"line":1084},[5043],{"type":46,"tag":470,"props":5044,"children":5045},{"style":531},[5046],{"type":51,"value":3592},{"type":46,"tag":470,"props":5048,"children":5049},{"class":472,"line":1111},[5050],{"type":46,"tag":470,"props":5051,"children":5052},{"emptyLinePlaceholder":577},[5053],{"type":51,"value":580},{"type":46,"tag":470,"props":5055,"children":5056},{"class":472,"line":1314},[5057],{"type":46,"tag":470,"props":5058,"children":5059},{"style":3418},[5060],{"type":51,"value":5061},"\u002F\u002F CORRECT - spread the quote response\n",{"type":46,"tag":470,"props":5063,"children":5064},{"class":472,"line":1338},[5065,5069,5074,5078],{"type":46,"tag":470,"props":5066,"children":5067},{"style":587},[5068],{"type":51,"value":590},{"type":46,"tag":470,"props":5070,"children":5071},{"style":537},[5072],{"type":51,"value":5073}," goodRequest ",{"type":46,"tag":470,"props":5075,"children":5076},{"style":531},[5077],{"type":51,"value":3438},{"type":46,"tag":470,"props":5079,"children":5080},{"style":531},[5081],{"type":51,"value":1165},{"type":46,"tag":470,"props":5083,"children":5084},{"class":472,"line":1347},[5085,5090,5095],{"type":46,"tag":470,"props":5086,"children":5087},{"style":531},[5088],{"type":51,"value":5089},"  ...",{"type":46,"tag":470,"props":5091,"children":5092},{"style":537},[5093],{"type":51,"value":5094},"quoteResponse",{"type":46,"tag":470,"props":5096,"children":5097},{"style":531},[5098],{"type":51,"value":1007},{"type":46,"tag":470,"props":5100,"children":5101},{"class":472,"line":1705},[5102,5106,5110,5114,5118,5122,5126],{"type":46,"tag":470,"props":5103,"children":5104},{"style":2780},[5105],{"type":51,"value":5019},{"type":46,"tag":470,"props":5107,"children":5108},{"style":531},[5109],{"type":51,"value":417},{"type":46,"tag":470,"props":5111,"children":5112},{"style":531},[5113],{"type":51,"value":555},{"type":46,"tag":470,"props":5115,"children":5116},{"style":483},[5117],{"type":51,"value":998},{"type":46,"tag":470,"props":5119,"children":5120},{"style":531},[5121],{"type":51,"value":565},{"type":46,"tag":470,"props":5123,"children":5124},{"style":531},[5125],{"type":51,"value":604},{"type":46,"tag":470,"props":5127,"children":5128},{"style":3418},[5129],{"type":51,"value":5130}," \u002F\u002F Only if using Permit2\n",{"type":46,"tag":470,"props":5132,"children":5133},{"class":472,"line":1740},[5134],{"type":46,"tag":470,"props":5135,"children":5136},{"style":531},[5137],{"type":51,"value":3592},{"type":46,"tag":172,"props":5139,"children":5141},{"id":5140},"_2-null-field-handling",[5142],{"type":51,"value":5143},"2. Null Field Handling",{"type":46,"tag":54,"props":5145,"children":5146},{},[5147,5149,5154,5156,5161,5163,5167],{"type":51,"value":5148},"The API rejects ",{"type":46,"tag":80,"props":5150,"children":5152},{"className":5151},[],[5153],{"type":51,"value":4022},{"type":51,"value":5155},". Additionally, ",{"type":46,"tag":80,"props":5157,"children":5159},{"className":5158},[],[5160],{"type":51,"value":2431},{"type":51,"value":5162}," handling differs by routing type — see ",{"type":46,"tag":300,"props":5164,"children":5165},{"href":4071},[5166],{"type":51,"value":4074},{"type":51,"value":5168}," for the full explanation.",{"type":46,"tag":397,"props":5170,"children":5172},{"className":513,"code":5171,"language":515,"meta":402,"style":402},"function prepareSwapRequest(quoteResponse: QuoteResponse, signature?: string): object {\n  \u002F\u002F Always strip permitData and permitTransaction from the spread — handle them explicitly\n  const { permitData, permitTransaction, ...cleanQuote } = quoteResponse;\n  const request: Record\u003Cstring, unknown> = { ...cleanQuote };\n\n  \u002F\u002F UniswapX (DUTCH_V2, DUTCH_V3, PRIORITY): permitData is for LOCAL signing only.\n  \u002F\u002F The \u002Fswap body must NOT include permitData — the order is encoded in\n  \u002F\u002F quote.encodedOrder. Only the signature is needed.\n  const isUniswapX =\n    quoteResponse.routing === 'DUTCH_V2' ||\n    quoteResponse.routing === 'DUTCH_V3' ||\n    quoteResponse.routing === 'PRIORITY';\n\n  if (isUniswapX) {\n    if (signature) request.signature = signature;\n  } else {\n    \u002F\u002F CLASSIC: both signature and permitData required together, or both omitted.\n    \u002F\u002F The Universal Router contract needs permitData to verify the Permit2\n    \u002F\u002F authorization on-chain.\n    if (signature && permitData && typeof permitData === 'object') {\n      request.signature = signature;\n      request.permitData = permitData;\n    }\n  }\n\n  return request;\n}\n",[5173],{"type":46,"tag":80,"props":5174,"children":5175},{"__ignoreMap":402},[5176,5237,5245,5298,5359,5366,5374,5382,5390,5407,5443,5478,5513,5520,5544,5589,5605,5613,5621,5629,5688,5716,5743,5751,5758,5765,5781],{"type":46,"tag":470,"props":5177,"children":5178},{"class":472,"line":473},[5179,5183,5188,5192,5196,5200,5205,5209,5214,5219,5224,5228,5233],{"type":46,"tag":470,"props":5180,"children":5181},{"style":587},[5182],{"type":51,"value":4362},{"type":46,"tag":470,"props":5184,"children":5185},{"style":631},[5186],{"type":51,"value":5187}," prepareSwapRequest",{"type":46,"tag":470,"props":5189,"children":5190},{"style":531},[5191],{"type":51,"value":835},{"type":46,"tag":470,"props":5193,"children":5194},{"style":4374},[5195],{"type":51,"value":5094},{"type":46,"tag":470,"props":5197,"children":5198},{"style":531},[5199],{"type":51,"value":417},{"type":46,"tag":470,"props":5201,"children":5202},{"style":477},[5203],{"type":51,"value":5204}," QuoteResponse",{"type":46,"tag":470,"props":5206,"children":5207},{"style":531},[5208],{"type":51,"value":604},{"type":46,"tag":470,"props":5210,"children":5211},{"style":4374},[5212],{"type":51,"value":5213}," signature",{"type":46,"tag":470,"props":5215,"children":5216},{"style":531},[5217],{"type":51,"value":5218},"?:",{"type":46,"tag":470,"props":5220,"children":5221},{"style":477},[5222],{"type":51,"value":5223}," string",{"type":46,"tag":470,"props":5225,"children":5226},{"style":531},[5227],{"type":51,"value":4391},{"type":46,"tag":470,"props":5229,"children":5230},{"style":477},[5231],{"type":51,"value":5232}," object",{"type":46,"tag":470,"props":5234,"children":5235},{"style":531},[5236],{"type":51,"value":1165},{"type":46,"tag":470,"props":5238,"children":5239},{"class":472,"line":573},[5240],{"type":46,"tag":470,"props":5241,"children":5242},{"style":3418},[5243],{"type":51,"value":5244},"  \u002F\u002F Always strip permitData and permitTransaction from the spread — handle them explicitly\n",{"type":46,"tag":470,"props":5246,"children":5247},{"class":472,"line":583},[5248,5253,5257,5261,5265,5269,5273,5277,5282,5286,5290,5294],{"type":46,"tag":470,"props":5249,"children":5250},{"style":587},[5251],{"type":51,"value":5252},"  const",{"type":46,"tag":470,"props":5254,"children":5255},{"style":531},[5256],{"type":51,"value":534},{"type":46,"tag":470,"props":5258,"children":5259},{"style":537},[5260],{"type":51,"value":3488},{"type":46,"tag":470,"props":5262,"children":5263},{"style":531},[5264],{"type":51,"value":604},{"type":46,"tag":470,"props":5266,"children":5267},{"style":537},[5268],{"type":51,"value":3497},{"type":46,"tag":470,"props":5270,"children":5271},{"style":531},[5272],{"type":51,"value":604},{"type":46,"tag":470,"props":5274,"children":5275},{"style":531},[5276],{"type":51,"value":3506},{"type":46,"tag":470,"props":5278,"children":5279},{"style":537},[5280],{"type":51,"value":5281},"cleanQuote",{"type":46,"tag":470,"props":5283,"children":5284},{"style":531},[5285],{"type":51,"value":545},{"type":46,"tag":470,"props":5287,"children":5288},{"style":531},[5289],{"type":51,"value":619},{"type":46,"tag":470,"props":5291,"children":5292},{"style":537},[5293],{"type":51,"value":3524},{"type":46,"tag":470,"props":5295,"children":5296},{"style":531},[5297],{"type":51,"value":570},{"type":46,"tag":470,"props":5299,"children":5300},{"class":472,"line":1046},[5301,5305,5310,5314,5318,5322,5326,5330,5334,5338,5342,5346,5350,5354],{"type":46,"tag":470,"props":5302,"children":5303},{"style":587},[5304],{"type":51,"value":5252},{"type":46,"tag":470,"props":5306,"children":5307},{"style":537},[5308],{"type":51,"value":5309}," request",{"type":46,"tag":470,"props":5311,"children":5312},{"style":531},[5313],{"type":51,"value":417},{"type":46,"tag":470,"props":5315,"children":5316},{"style":477},[5317],{"type":51,"value":3549},{"type":46,"tag":470,"props":5319,"children":5320},{"style":531},[5321],{"type":51,"value":856},{"type":46,"tag":470,"props":5323,"children":5324},{"style":477},[5325],{"type":51,"value":3558},{"type":46,"tag":470,"props":5327,"children":5328},{"style":531},[5329],{"type":51,"value":604},{"type":46,"tag":470,"props":5331,"children":5332},{"style":477},[5333],{"type":51,"value":3567},{"type":46,"tag":470,"props":5335,"children":5336},{"style":531},[5337],{"type":51,"value":849},{"type":46,"tag":470,"props":5339,"children":5340},{"style":531},[5341],{"type":51,"value":619},{"type":46,"tag":470,"props":5343,"children":5344},{"style":531},[5345],{"type":51,"value":534},{"type":46,"tag":470,"props":5347,"children":5348},{"style":531},[5349],{"type":51,"value":3506},{"type":46,"tag":470,"props":5351,"children":5352},{"style":537},[5353],{"type":51,"value":5281},{"type":46,"tag":470,"props":5355,"children":5356},{"style":531},[5357],{"type":51,"value":5358}," };\n",{"type":46,"tag":470,"props":5360,"children":5361},{"class":472,"line":1084},[5362],{"type":46,"tag":470,"props":5363,"children":5364},{"emptyLinePlaceholder":577},[5365],{"type":51,"value":580},{"type":46,"tag":470,"props":5367,"children":5368},{"class":472,"line":1111},[5369],{"type":46,"tag":470,"props":5370,"children":5371},{"style":3418},[5372],{"type":51,"value":5373},"  \u002F\u002F UniswapX (DUTCH_V2, DUTCH_V3, PRIORITY): permitData is for LOCAL signing only.\n",{"type":46,"tag":470,"props":5375,"children":5376},{"class":472,"line":1314},[5377],{"type":46,"tag":470,"props":5378,"children":5379},{"style":3418},[5380],{"type":51,"value":5381},"  \u002F\u002F The \u002Fswap body must NOT include permitData — the order is encoded in\n",{"type":46,"tag":470,"props":5383,"children":5384},{"class":472,"line":1338},[5385],{"type":46,"tag":470,"props":5386,"children":5387},{"style":3418},[5388],{"type":51,"value":5389},"  \u002F\u002F quote.encodedOrder. Only the signature is needed.\n",{"type":46,"tag":470,"props":5391,"children":5392},{"class":472,"line":1347},[5393,5397,5402],{"type":46,"tag":470,"props":5394,"children":5395},{"style":587},[5396],{"type":51,"value":5252},{"type":46,"tag":470,"props":5398,"children":5399},{"style":537},[5400],{"type":51,"value":5401}," isUniswapX",{"type":46,"tag":470,"props":5403,"children":5404},{"style":531},[5405],{"type":51,"value":5406}," =\n",{"type":46,"tag":470,"props":5408,"children":5409},{"class":472,"line":1705},[5410,5415,5419,5423,5427,5431,5435,5439],{"type":46,"tag":470,"props":5411,"children":5412},{"style":537},[5413],{"type":51,"value":5414},"    quoteResponse",{"type":46,"tag":470,"props":5416,"children":5417},{"style":531},[5418],{"type":51,"value":628},{"type":46,"tag":470,"props":5420,"children":5421},{"style":537},[5422],{"type":51,"value":2024},{"type":46,"tag":470,"props":5424,"children":5425},{"style":531},[5426],{"type":51,"value":3874},{"type":46,"tag":470,"props":5428,"children":5429},{"style":531},[5430],{"type":51,"value":555},{"type":46,"tag":470,"props":5432,"children":5433},{"style":483},[5434],{"type":51,"value":230},{"type":46,"tag":470,"props":5436,"children":5437},{"style":531},[5438],{"type":51,"value":565},{"type":46,"tag":470,"props":5440,"children":5441},{"style":531},[5442],{"type":51,"value":3655},{"type":46,"tag":470,"props":5444,"children":5445},{"class":472,"line":1740},[5446,5450,5454,5458,5462,5466,5470,5474],{"type":46,"tag":470,"props":5447,"children":5448},{"style":537},[5449],{"type":51,"value":5414},{"type":46,"tag":470,"props":5451,"children":5452},{"style":531},[5453],{"type":51,"value":628},{"type":46,"tag":470,"props":5455,"children":5456},{"style":537},[5457],{"type":51,"value":2024},{"type":46,"tag":470,"props":5459,"children":5460},{"style":531},[5461],{"type":51,"value":3874},{"type":46,"tag":470,"props":5463,"children":5464},{"style":531},[5465],{"type":51,"value":555},{"type":46,"tag":470,"props":5467,"children":5468},{"style":483},[5469],{"type":51,"value":3683},{"type":46,"tag":470,"props":5471,"children":5472},{"style":531},[5473],{"type":51,"value":565},{"type":46,"tag":470,"props":5475,"children":5476},{"style":531},[5477],{"type":51,"value":3655},{"type":46,"tag":470,"props":5479,"children":5480},{"class":472,"line":2421},[5481,5485,5489,5493,5497,5501,5505,5509],{"type":46,"tag":470,"props":5482,"children":5483},{"style":537},[5484],{"type":51,"value":5414},{"type":46,"tag":470,"props":5486,"children":5487},{"style":531},[5488],{"type":51,"value":628},{"type":46,"tag":470,"props":5490,"children":5491},{"style":537},[5492],{"type":51,"value":2024},{"type":46,"tag":470,"props":5494,"children":5495},{"style":531},[5496],{"type":51,"value":3874},{"type":46,"tag":470,"props":5498,"children":5499},{"style":531},[5500],{"type":51,"value":555},{"type":46,"tag":470,"props":5502,"children":5503},{"style":483},[5504],{"type":51,"value":248},{"type":46,"tag":470,"props":5506,"children":5507},{"style":531},[5508],{"type":51,"value":565},{"type":46,"tag":470,"props":5510,"children":5511},{"style":531},[5512],{"type":51,"value":570},{"type":46,"tag":470,"props":5514,"children":5515},{"class":472,"line":2447},[5516],{"type":46,"tag":470,"props":5517,"children":5518},{"emptyLinePlaceholder":577},[5519],{"type":51,"value":580},{"type":46,"tag":470,"props":5521,"children":5522},{"class":472,"line":2877},[5523,5527,5531,5536,5540],{"type":46,"tag":470,"props":5524,"children":5525},{"style":525},[5526],{"type":51,"value":3766},{"type":46,"tag":470,"props":5528,"children":5529},{"style":2780},[5530],{"type":51,"value":3771},{"type":46,"tag":470,"props":5532,"children":5533},{"style":537},[5534],{"type":51,"value":5535},"isUniswapX",{"type":46,"tag":470,"props":5537,"children":5538},{"style":2780},[5539],{"type":51,"value":3781},{"type":46,"tag":470,"props":5541,"children":5542},{"style":531},[5543],{"type":51,"value":967},{"type":46,"tag":470,"props":5545,"children":5546},{"class":472,"line":2886},[5547,5552,5556,5560,5564,5569,5573,5577,5581,5585],{"type":46,"tag":470,"props":5548,"children":5549},{"style":525},[5550],{"type":51,"value":5551},"    if",{"type":46,"tag":470,"props":5553,"children":5554},{"style":2780},[5555],{"type":51,"value":3771},{"type":46,"tag":470,"props":5557,"children":5558},{"style":537},[5559],{"type":51,"value":3795},{"type":46,"tag":470,"props":5561,"children":5562},{"style":2780},[5563],{"type":51,"value":3781},{"type":46,"tag":470,"props":5565,"children":5566},{"style":537},[5567],{"type":51,"value":5568},"request",{"type":46,"tag":470,"props":5570,"children":5571},{"style":531},[5572],{"type":51,"value":628},{"type":46,"tag":470,"props":5574,"children":5575},{"style":537},[5576],{"type":51,"value":3795},{"type":46,"tag":470,"props":5578,"children":5579},{"style":531},[5580],{"type":51,"value":619},{"type":46,"tag":470,"props":5582,"children":5583},{"style":537},[5584],{"type":51,"value":5213},{"type":46,"tag":470,"props":5586,"children":5587},{"style":531},[5588],{"type":51,"value":570},{"type":46,"tag":470,"props":5590,"children":5591},{"class":472,"line":2912},[5592,5597,5601],{"type":46,"tag":470,"props":5593,"children":5594},{"style":531},[5595],{"type":51,"value":5596},"  }",{"type":46,"tag":470,"props":5598,"children":5599},{"style":525},[5600],{"type":51,"value":3820},{"type":46,"tag":470,"props":5602,"children":5603},{"style":531},[5604],{"type":51,"value":1165},{"type":46,"tag":470,"props":5606,"children":5607},{"class":472,"line":2921},[5608],{"type":46,"tag":470,"props":5609,"children":5610},{"style":3418},[5611],{"type":51,"value":5612},"    \u002F\u002F CLASSIC: both signature and permitData required together, or both omitted.\n",{"type":46,"tag":470,"props":5614,"children":5615},{"class":472,"line":2958},[5616],{"type":46,"tag":470,"props":5617,"children":5618},{"style":3418},[5619],{"type":51,"value":5620},"    \u002F\u002F The Universal Router contract needs permitData to verify the Permit2\n",{"type":46,"tag":470,"props":5622,"children":5623},{"class":472,"line":2994},[5624],{"type":46,"tag":470,"props":5625,"children":5626},{"style":3418},[5627],{"type":51,"value":5628},"    \u002F\u002F authorization on-chain.\n",{"type":46,"tag":470,"props":5630,"children":5631},{"class":472,"line":3031},[5632,5636,5640,5644,5648,5652,5656,5660,5664,5668,5672,5676,5680,5684],{"type":46,"tag":470,"props":5633,"children":5634},{"style":525},[5635],{"type":51,"value":5551},{"type":46,"tag":470,"props":5637,"children":5638},{"style":2780},[5639],{"type":51,"value":3771},{"type":46,"tag":470,"props":5641,"children":5642},{"style":537},[5643],{"type":51,"value":3795},{"type":46,"tag":470,"props":5645,"children":5646},{"style":531},[5647],{"type":51,"value":3852},{"type":46,"tag":470,"props":5649,"children":5650},{"style":537},[5651],{"type":51,"value":3488},{"type":46,"tag":470,"props":5653,"children":5654},{"style":531},[5655],{"type":51,"value":3852},{"type":46,"tag":470,"props":5657,"children":5658},{"style":531},[5659],{"type":51,"value":3865},{"type":46,"tag":470,"props":5661,"children":5662},{"style":537},[5663],{"type":51,"value":3488},{"type":46,"tag":470,"props":5665,"children":5666},{"style":531},[5667],{"type":51,"value":3874},{"type":46,"tag":470,"props":5669,"children":5670},{"style":531},[5671],{"type":51,"value":555},{"type":46,"tag":470,"props":5673,"children":5674},{"style":483},[5675],{"type":51,"value":3883},{"type":46,"tag":470,"props":5677,"children":5678},{"style":531},[5679],{"type":51,"value":565},{"type":46,"tag":470,"props":5681,"children":5682},{"style":2780},[5683],{"type":51,"value":3781},{"type":46,"tag":470,"props":5685,"children":5686},{"style":531},[5687],{"type":51,"value":967},{"type":46,"tag":470,"props":5689,"children":5690},{"class":472,"line":3064},[5691,5696,5700,5704,5708,5712],{"type":46,"tag":470,"props":5692,"children":5693},{"style":537},[5694],{"type":51,"value":5695},"      request",{"type":46,"tag":470,"props":5697,"children":5698},{"style":531},[5699],{"type":51,"value":628},{"type":46,"tag":470,"props":5701,"children":5702},{"style":537},[5703],{"type":51,"value":3795},{"type":46,"tag":470,"props":5705,"children":5706},{"style":531},[5707],{"type":51,"value":619},{"type":46,"tag":470,"props":5709,"children":5710},{"style":537},[5711],{"type":51,"value":5213},{"type":46,"tag":470,"props":5713,"children":5714},{"style":531},[5715],{"type":51,"value":570},{"type":46,"tag":470,"props":5717,"children":5718},{"class":472,"line":3073},[5719,5723,5727,5731,5735,5739],{"type":46,"tag":470,"props":5720,"children":5721},{"style":537},[5722],{"type":51,"value":5695},{"type":46,"tag":470,"props":5724,"children":5725},{"style":531},[5726],{"type":51,"value":628},{"type":46,"tag":470,"props":5728,"children":5729},{"style":537},[5730],{"type":51,"value":2431},{"type":46,"tag":470,"props":5732,"children":5733},{"style":531},[5734],{"type":51,"value":619},{"type":46,"tag":470,"props":5736,"children":5737},{"style":537},[5738],{"type":51,"value":3488},{"type":46,"tag":470,"props":5740,"children":5741},{"style":531},[5742],{"type":51,"value":570},{"type":46,"tag":470,"props":5744,"children":5745},{"class":472,"line":3082},[5746],{"type":46,"tag":470,"props":5747,"children":5748},{"style":531},[5749],{"type":51,"value":5750},"    }\n",{"type":46,"tag":470,"props":5752,"children":5753},{"class":472,"line":3106},[5754],{"type":46,"tag":470,"props":5755,"children":5756},{"style":531},[5757],{"type":51,"value":1344},{"type":46,"tag":470,"props":5759,"children":5760},{"class":472,"line":3115},[5761],{"type":46,"tag":470,"props":5762,"children":5763},{"emptyLinePlaceholder":577},[5764],{"type":51,"value":580},{"type":46,"tag":470,"props":5766,"children":5767},{"class":472,"line":3152},[5768,5773,5777],{"type":46,"tag":470,"props":5769,"children":5770},{"style":525},[5771],{"type":51,"value":5772},"  return",{"type":46,"tag":470,"props":5774,"children":5775},{"style":537},[5776],{"type":51,"value":5309},{"type":46,"tag":470,"props":5778,"children":5779},{"style":531},[5780],{"type":51,"value":570},{"type":46,"tag":470,"props":5782,"children":5783},{"class":472,"line":3185},[5784],{"type":46,"tag":470,"props":5785,"children":5786},{"style":531},[5787],{"type":51,"value":1117},{"type":46,"tag":172,"props":5789,"children":5791},{"id":5790},"_3-permit2-field-rules",[5792],{"type":51,"value":5793},"3. Permit2 Field Rules",{"type":46,"tag":54,"props":5795,"children":5796},{},[5797,5799,5804,5805,5810,5812,5817],{"type":51,"value":5798},"The rules for ",{"type":46,"tag":80,"props":5800,"children":5802},{"className":5801},[],[5803],{"type":51,"value":3795},{"type":51,"value":1764},{"type":46,"tag":80,"props":5806,"children":5808},{"className":5807},[],[5809],{"type":51,"value":2431},{"type":51,"value":5811}," in the ",{"type":46,"tag":80,"props":5813,"children":5815},{"className":5814},[],[5816],{"type":51,"value":4066},{"type":51,"value":5818}," request body depend on the routing type:",{"type":46,"tag":54,"props":5820,"children":5821},{},[5822,5827],{"type":46,"tag":72,"props":5823,"children":5824},{},[5825],{"type":51,"value":5826},"CLASSIC routes",{"type":51,"value":417},{"type":46,"tag":93,"props":5829,"children":5830},{},[5831,5858],{"type":46,"tag":97,"props":5832,"children":5833},{},[5834],{"type":46,"tag":101,"props":5835,"children":5836},{},[5837,5842,5850],{"type":46,"tag":105,"props":5838,"children":5839},{},[5840],{"type":51,"value":5841},"Scenario",{"type":46,"tag":105,"props":5843,"children":5844},{},[5845],{"type":46,"tag":80,"props":5846,"children":5848},{"className":5847},[],[5849],{"type":51,"value":3795},{"type":46,"tag":105,"props":5851,"children":5852},{},[5853],{"type":46,"tag":80,"props":5854,"children":5856},{"className":5855},[],[5857],{"type":51,"value":2431},{"type":46,"tag":116,"props":5859,"children":5860},{},[5861,5878,5895,5916,5934],{"type":46,"tag":101,"props":5862,"children":5863},{},[5864,5869,5874],{"type":46,"tag":123,"props":5865,"children":5866},{},[5867],{"type":51,"value":5868},"Standard swap (no Permit2)",{"type":46,"tag":123,"props":5870,"children":5871},{},[5872],{"type":51,"value":5873},"Omit",{"type":46,"tag":123,"props":5875,"children":5876},{},[5877],{"type":51,"value":5873},{"type":46,"tag":101,"props":5879,"children":5880},{},[5881,5886,5891],{"type":46,"tag":123,"props":5882,"children":5883},{},[5884],{"type":51,"value":5885},"Permit2 swap",{"type":46,"tag":123,"props":5887,"children":5888},{},[5889],{"type":51,"value":5890},"Required",{"type":46,"tag":123,"props":5892,"children":5893},{},[5894],{"type":51,"value":5890},{"type":46,"tag":101,"props":5896,"children":5897},{},[5898,5906,5911],{"type":46,"tag":123,"props":5899,"children":5900},{},[5901],{"type":46,"tag":72,"props":5902,"children":5903},{},[5904],{"type":51,"value":5905},"Invalid",{"type":46,"tag":123,"props":5907,"children":5908},{},[5909],{"type":51,"value":5910},"Present",{"type":46,"tag":123,"props":5912,"children":5913},{},[5914],{"type":51,"value":5915},"Missing",{"type":46,"tag":101,"props":5917,"children":5918},{},[5919,5926,5930],{"type":46,"tag":123,"props":5920,"children":5921},{},[5922],{"type":46,"tag":72,"props":5923,"children":5924},{},[5925],{"type":51,"value":5905},{"type":46,"tag":123,"props":5927,"children":5928},{},[5929],{"type":51,"value":5915},{"type":46,"tag":123,"props":5931,"children":5932},{},[5933],{"type":51,"value":5910},{"type":46,"tag":101,"props":5935,"children":5936},{},[5937,5945,5950],{"type":46,"tag":123,"props":5938,"children":5939},{},[5940],{"type":46,"tag":72,"props":5941,"children":5942},{},[5943],{"type":51,"value":5944},"Invalid (API error)",{"type":46,"tag":123,"props":5946,"children":5947},{},[5948],{"type":51,"value":5949},"Any",{"type":46,"tag":123,"props":5951,"children":5952},{},[5953],{"type":46,"tag":80,"props":5954,"children":5956},{"className":5955},[],[5957],{"type":51,"value":1370},{"type":46,"tag":54,"props":5959,"children":5960},{},[5961,5966],{"type":46,"tag":72,"props":5962,"children":5963},{},[5964],{"type":51,"value":5965},"UniswapX routes (DUTCH_V2\u002FV3\u002FPRIORITY)",{"type":51,"value":417},{"type":46,"tag":93,"props":5968,"children":5969},{},[5970,5996],{"type":46,"tag":97,"props":5971,"children":5972},{},[5973],{"type":46,"tag":101,"props":5974,"children":5975},{},[5976,5980,5988],{"type":46,"tag":105,"props":5977,"children":5978},{},[5979],{"type":51,"value":5841},{"type":46,"tag":105,"props":5981,"children":5982},{},[5983],{"type":46,"tag":80,"props":5984,"children":5986},{"className":5985},[],[5987],{"type":51,"value":3795},{"type":46,"tag":105,"props":5989,"children":5990},{},[5991],{"type":46,"tag":80,"props":5992,"children":5994},{"className":5993},[],[5995],{"type":51,"value":2431},{"type":46,"tag":116,"props":5997,"children":5998},{},[5999,6020],{"type":46,"tag":101,"props":6000,"children":6001},{},[6002,6007,6011],{"type":46,"tag":123,"props":6003,"children":6004},{},[6005],{"type":51,"value":6006},"UniswapX order",{"type":46,"tag":123,"props":6008,"children":6009},{},[6010],{"type":51,"value":5890},{"type":46,"tag":123,"props":6012,"children":6013},{},[6014,6018],{"type":46,"tag":72,"props":6015,"children":6016},{},[6017],{"type":51,"value":5873},{"type":51,"value":6019}," (do not send)",{"type":46,"tag":101,"props":6021,"children":6022},{},[6023,6030,6034],{"type":46,"tag":123,"props":6024,"children":6025},{},[6026],{"type":46,"tag":72,"props":6027,"children":6028},{},[6029],{"type":51,"value":5905},{"type":46,"tag":123,"props":6031,"children":6032},{},[6033],{"type":51,"value":5949},{"type":46,"tag":123,"props":6035,"children":6036},{},[6037],{"type":51,"value":6038},"Present (schema rejects)",{"type":46,"tag":172,"props":6040,"children":6042},{"id":6041},"_4-pre-broadcast-validation",[6043],{"type":51,"value":6044},"4. Pre-Broadcast Validation",{"type":46,"tag":54,"props":6046,"children":6047},{},[6048],{"type":51,"value":6049},"Always validate the swap response before sending to the blockchain:",{"type":46,"tag":397,"props":6051,"children":6053},{"className":513,"code":6052,"language":515,"meta":402,"style":402},"import { isAddress, isHex } from 'viem';\n\nfunction validateSwapBeforeBroadcast(swap: SwapTransaction): void {\n  \u002F\u002F 1. data must be non-empty hex\n  if (!swap.data || swap.data === '' || swap.data === '0x') {\n    throw new Error('swap.data is empty - this will revert on-chain. Re-fetch the quote.');\n  }\n\n  if (!isHex(swap.data)) {\n    throw new Error('swap.data is not valid hex');\n  }\n\n  \u002F\u002F 2. Addresses must be valid\n  if (!isAddress(swap.to)) {\n    throw new Error('swap.to is not a valid address');\n  }\n\n  if (!isAddress(swap.from)) {\n    throw new Error('swap.from is not a valid address');\n  }\n\n  \u002F\u002F 3. Value must be present (can be \"0\" for non-ETH swaps)\n  if (swap.value === undefined || swap.value === null) {\n    throw new Error('swap.value is missing');\n  }\n}\n",[6054],{"type":46,"tag":80,"props":6055,"children":6056},{"__ignoreMap":402},[6057,6107,6114,6155,6163,6255,6295,6302,6309,6353,6393,6400,6407,6415,6458,6498,6505,6512,6555,6595,6602,6609,6617,6682,6722,6729],{"type":46,"tag":470,"props":6058,"children":6059},{"class":472,"line":473},[6060,6064,6068,6073,6077,6082,6086,6090,6094,6099,6103],{"type":46,"tag":470,"props":6061,"children":6062},{"style":525},[6063],{"type":51,"value":528},{"type":46,"tag":470,"props":6065,"children":6066},{"style":531},[6067],{"type":51,"value":534},{"type":46,"tag":470,"props":6069,"children":6070},{"style":537},[6071],{"type":51,"value":6072}," isAddress",{"type":46,"tag":470,"props":6074,"children":6075},{"style":531},[6076],{"type":51,"value":604},{"type":46,"tag":470,"props":6078,"children":6079},{"style":537},[6080],{"type":51,"value":6081}," isHex",{"type":46,"tag":470,"props":6083,"children":6084},{"style":531},[6085],{"type":51,"value":545},{"type":46,"tag":470,"props":6087,"children":6088},{"style":525},[6089],{"type":51,"value":550},{"type":46,"tag":470,"props":6091,"children":6092},{"style":531},[6093],{"type":51,"value":555},{"type":46,"tag":470,"props":6095,"children":6096},{"style":483},[6097],{"type":51,"value":6098},"viem",{"type":46,"tag":470,"props":6100,"children":6101},{"style":531},[6102],{"type":51,"value":565},{"type":46,"tag":470,"props":6104,"children":6105},{"style":531},[6106],{"type":51,"value":570},{"type":46,"tag":470,"props":6108,"children":6109},{"class":472,"line":573},[6110],{"type":46,"tag":470,"props":6111,"children":6112},{"emptyLinePlaceholder":577},[6113],{"type":51,"value":580},{"type":46,"tag":470,"props":6115,"children":6116},{"class":472,"line":583},[6117,6121,6126,6130,6134,6138,6143,6147,6151],{"type":46,"tag":470,"props":6118,"children":6119},{"style":587},[6120],{"type":51,"value":4362},{"type":46,"tag":470,"props":6122,"children":6123},{"style":631},[6124],{"type":51,"value":6125}," validateSwapBeforeBroadcast",{"type":46,"tag":470,"props":6127,"children":6128},{"style":531},[6129],{"type":51,"value":835},{"type":46,"tag":470,"props":6131,"children":6132},{"style":4374},[6133],{"type":51,"value":4110},{"type":46,"tag":470,"props":6135,"children":6136},{"style":531},[6137],{"type":51,"value":417},{"type":46,"tag":470,"props":6139,"children":6140},{"style":477},[6141],{"type":51,"value":6142}," SwapTransaction",{"type":46,"tag":470,"props":6144,"children":6145},{"style":531},[6146],{"type":51,"value":4391},{"type":46,"tag":470,"props":6148,"children":6149},{"style":477},[6150],{"type":51,"value":4396},{"type":46,"tag":470,"props":6152,"children":6153},{"style":531},[6154],{"type":51,"value":1165},{"type":46,"tag":470,"props":6156,"children":6157},{"class":472,"line":1046},[6158],{"type":46,"tag":470,"props":6159,"children":6160},{"style":3418},[6161],{"type":51,"value":6162},"  \u002F\u002F 1. data must be non-empty hex\n",{"type":46,"tag":470,"props":6164,"children":6165},{"class":472,"line":1084},[6166,6170,6174,6178,6182,6186,6190,6194,6199,6203,6207,6211,6215,6219,6223,6227,6231,6235,6239,6243,6247,6251],{"type":46,"tag":470,"props":6167,"children":6168},{"style":525},[6169],{"type":51,"value":3766},{"type":46,"tag":470,"props":6171,"children":6172},{"style":2780},[6173],{"type":51,"value":3771},{"type":46,"tag":470,"props":6175,"children":6176},{"style":531},[6177],{"type":51,"value":4416},{"type":46,"tag":470,"props":6179,"children":6180},{"style":537},[6181],{"type":51,"value":4110},{"type":46,"tag":470,"props":6183,"children":6184},{"style":531},[6185],{"type":51,"value":628},{"type":46,"tag":470,"props":6187,"children":6188},{"style":537},[6189],{"type":51,"value":1250},{"type":46,"tag":470,"props":6191,"children":6192},{"style":531},[6193],{"type":51,"value":4442},{"type":46,"tag":470,"props":6195,"children":6196},{"style":537},[6197],{"type":51,"value":6198}," swap",{"type":46,"tag":470,"props":6200,"children":6201},{"style":531},[6202],{"type":51,"value":628},{"type":46,"tag":470,"props":6204,"children":6205},{"style":537},[6206],{"type":51,"value":1250},{"type":46,"tag":470,"props":6208,"children":6209},{"style":531},[6210],{"type":51,"value":3874},{"type":46,"tag":470,"props":6212,"children":6213},{"style":531},[6214],{"type":51,"value":4472},{"type":46,"tag":470,"props":6216,"children":6217},{"style":531},[6218],{"type":51,"value":4442},{"type":46,"tag":470,"props":6220,"children":6221},{"style":537},[6222],{"type":51,"value":6198},{"type":46,"tag":470,"props":6224,"children":6225},{"style":531},[6226],{"type":51,"value":628},{"type":46,"tag":470,"props":6228,"children":6229},{"style":537},[6230],{"type":51,"value":1250},{"type":46,"tag":470,"props":6232,"children":6233},{"style":531},[6234],{"type":51,"value":3874},{"type":46,"tag":470,"props":6236,"children":6237},{"style":531},[6238],{"type":51,"value":555},{"type":46,"tag":470,"props":6240,"children":6241},{"style":483},[6242],{"type":51,"value":4509},{"type":46,"tag":470,"props":6244,"children":6245},{"style":531},[6246],{"type":51,"value":565},{"type":46,"tag":470,"props":6248,"children":6249},{"style":2780},[6250],{"type":51,"value":3781},{"type":46,"tag":470,"props":6252,"children":6253},{"style":531},[6254],{"type":51,"value":967},{"type":46,"tag":470,"props":6256,"children":6257},{"class":472,"line":1111},[6258,6262,6266,6270,6274,6278,6283,6287,6291],{"type":46,"tag":470,"props":6259,"children":6260},{"style":525},[6261],{"type":51,"value":4529},{"type":46,"tag":470,"props":6263,"children":6264},{"style":531},[6265],{"type":51,"value":4534},{"type":46,"tag":470,"props":6267,"children":6268},{"style":631},[6269],{"type":51,"value":4539},{"type":46,"tag":470,"props":6271,"children":6272},{"style":2780},[6273],{"type":51,"value":835},{"type":46,"tag":470,"props":6275,"children":6276},{"style":531},[6277],{"type":51,"value":565},{"type":46,"tag":470,"props":6279,"children":6280},{"style":483},[6281],{"type":51,"value":6282},"swap.data is empty - this will revert on-chain. Re-fetch the quote.",{"type":46,"tag":470,"props":6284,"children":6285},{"style":531},[6286],{"type":51,"value":565},{"type":46,"tag":470,"props":6288,"children":6289},{"style":2780},[6290],{"type":51,"value":842},{"type":46,"tag":470,"props":6292,"children":6293},{"style":531},[6294],{"type":51,"value":570},{"type":46,"tag":470,"props":6296,"children":6297},{"class":472,"line":1314},[6298],{"type":46,"tag":470,"props":6299,"children":6300},{"style":531},[6301],{"type":51,"value":1344},{"type":46,"tag":470,"props":6303,"children":6304},{"class":472,"line":1338},[6305],{"type":46,"tag":470,"props":6306,"children":6307},{"emptyLinePlaceholder":577},[6308],{"type":51,"value":580},{"type":46,"tag":470,"props":6310,"children":6311},{"class":472,"line":1347},[6312,6316,6320,6324,6329,6333,6337,6341,6345,6349],{"type":46,"tag":470,"props":6313,"children":6314},{"style":525},[6315],{"type":51,"value":3766},{"type":46,"tag":470,"props":6317,"children":6318},{"style":2780},[6319],{"type":51,"value":3771},{"type":46,"tag":470,"props":6321,"children":6322},{"style":531},[6323],{"type":51,"value":4416},{"type":46,"tag":470,"props":6325,"children":6326},{"style":631},[6327],{"type":51,"value":6328},"isHex",{"type":46,"tag":470,"props":6330,"children":6331},{"style":2780},[6332],{"type":51,"value":835},{"type":46,"tag":470,"props":6334,"children":6335},{"style":537},[6336],{"type":51,"value":4110},{"type":46,"tag":470,"props":6338,"children":6339},{"style":531},[6340],{"type":51,"value":628},{"type":46,"tag":470,"props":6342,"children":6343},{"style":537},[6344],{"type":51,"value":1250},{"type":46,"tag":470,"props":6346,"children":6347},{"style":2780},[6348],{"type":51,"value":4662},{"type":46,"tag":470,"props":6350,"children":6351},{"style":531},[6352],{"type":51,"value":967},{"type":46,"tag":470,"props":6354,"children":6355},{"class":472,"line":1705},[6356,6360,6364,6368,6372,6376,6381,6385,6389],{"type":46,"tag":470,"props":6357,"children":6358},{"style":525},[6359],{"type":51,"value":4529},{"type":46,"tag":470,"props":6361,"children":6362},{"style":531},[6363],{"type":51,"value":4534},{"type":46,"tag":470,"props":6365,"children":6366},{"style":631},[6367],{"type":51,"value":4539},{"type":46,"tag":470,"props":6369,"children":6370},{"style":2780},[6371],{"type":51,"value":835},{"type":46,"tag":470,"props":6373,"children":6374},{"style":531},[6375],{"type":51,"value":565},{"type":46,"tag":470,"props":6377,"children":6378},{"style":483},[6379],{"type":51,"value":6380},"swap.data is not valid hex",{"type":46,"tag":470,"props":6382,"children":6383},{"style":531},[6384],{"type":51,"value":565},{"type":46,"tag":470,"props":6386,"children":6387},{"style":2780},[6388],{"type":51,"value":842},{"type":46,"tag":470,"props":6390,"children":6391},{"style":531},[6392],{"type":51,"value":570},{"type":46,"tag":470,"props":6394,"children":6395},{"class":472,"line":1740},[6396],{"type":46,"tag":470,"props":6397,"children":6398},{"style":531},[6399],{"type":51,"value":1344},{"type":46,"tag":470,"props":6401,"children":6402},{"class":472,"line":2421},[6403],{"type":46,"tag":470,"props":6404,"children":6405},{"emptyLinePlaceholder":577},[6406],{"type":51,"value":580},{"type":46,"tag":470,"props":6408,"children":6409},{"class":472,"line":2447},[6410],{"type":46,"tag":470,"props":6411,"children":6412},{"style":3418},[6413],{"type":51,"value":6414},"  \u002F\u002F 2. Addresses must be valid\n",{"type":46,"tag":470,"props":6416,"children":6417},{"class":472,"line":2877},[6418,6422,6426,6430,6434,6438,6442,6446,6450,6454],{"type":46,"tag":470,"props":6419,"children":6420},{"style":525},[6421],{"type":51,"value":3766},{"type":46,"tag":470,"props":6423,"children":6424},{"style":2780},[6425],{"type":51,"value":3771},{"type":46,"tag":470,"props":6427,"children":6428},{"style":531},[6429],{"type":51,"value":4416},{"type":46,"tag":470,"props":6431,"children":6432},{"style":631},[6433],{"type":51,"value":4591},{"type":46,"tag":470,"props":6435,"children":6436},{"style":2780},[6437],{"type":51,"value":835},{"type":46,"tag":470,"props":6439,"children":6440},{"style":537},[6441],{"type":51,"value":4110},{"type":46,"tag":470,"props":6443,"children":6444},{"style":531},[6445],{"type":51,"value":628},{"type":46,"tag":470,"props":6447,"children":6448},{"style":537},[6449],{"type":51,"value":1178},{"type":46,"tag":470,"props":6451,"children":6452},{"style":2780},[6453],{"type":51,"value":4662},{"type":46,"tag":470,"props":6455,"children":6456},{"style":531},[6457],{"type":51,"value":967},{"type":46,"tag":470,"props":6459,"children":6460},{"class":472,"line":2886},[6461,6465,6469,6473,6477,6481,6486,6490,6494],{"type":46,"tag":470,"props":6462,"children":6463},{"style":525},[6464],{"type":51,"value":4529},{"type":46,"tag":470,"props":6466,"children":6467},{"style":531},[6468],{"type":51,"value":4534},{"type":46,"tag":470,"props":6470,"children":6471},{"style":631},[6472],{"type":51,"value":4539},{"type":46,"tag":470,"props":6474,"children":6475},{"style":2780},[6476],{"type":51,"value":835},{"type":46,"tag":470,"props":6478,"children":6479},{"style":531},[6480],{"type":51,"value":565},{"type":46,"tag":470,"props":6482,"children":6483},{"style":483},[6484],{"type":51,"value":6485},"swap.to is not a valid address",{"type":46,"tag":470,"props":6487,"children":6488},{"style":531},[6489],{"type":51,"value":565},{"type":46,"tag":470,"props":6491,"children":6492},{"style":2780},[6493],{"type":51,"value":842},{"type":46,"tag":470,"props":6495,"children":6496},{"style":531},[6497],{"type":51,"value":570},{"type":46,"tag":470,"props":6499,"children":6500},{"class":472,"line":2912},[6501],{"type":46,"tag":470,"props":6502,"children":6503},{"style":531},[6504],{"type":51,"value":1344},{"type":46,"tag":470,"props":6506,"children":6507},{"class":472,"line":2921},[6508],{"type":46,"tag":470,"props":6509,"children":6510},{"emptyLinePlaceholder":577},[6511],{"type":51,"value":580},{"type":46,"tag":470,"props":6513,"children":6514},{"class":472,"line":2958},[6515,6519,6523,6527,6531,6535,6539,6543,6547,6551],{"type":46,"tag":470,"props":6516,"children":6517},{"style":525},[6518],{"type":51,"value":3766},{"type":46,"tag":470,"props":6520,"children":6521},{"style":2780},[6522],{"type":51,"value":3771},{"type":46,"tag":470,"props":6524,"children":6525},{"style":531},[6526],{"type":51,"value":4416},{"type":46,"tag":470,"props":6528,"children":6529},{"style":631},[6530],{"type":51,"value":4591},{"type":46,"tag":470,"props":6532,"children":6533},{"style":2780},[6534],{"type":51,"value":835},{"type":46,"tag":470,"props":6536,"children":6537},{"style":537},[6538],{"type":51,"value":4110},{"type":46,"tag":470,"props":6540,"children":6541},{"style":531},[6542],{"type":51,"value":628},{"type":46,"tag":470,"props":6544,"children":6545},{"style":537},[6546],{"type":51,"value":1214},{"type":46,"tag":470,"props":6548,"children":6549},{"style":2780},[6550],{"type":51,"value":4662},{"type":46,"tag":470,"props":6552,"children":6553},{"style":531},[6554],{"type":51,"value":967},{"type":46,"tag":470,"props":6556,"children":6557},{"class":472,"line":2994},[6558,6562,6566,6570,6574,6578,6583,6587,6591],{"type":46,"tag":470,"props":6559,"children":6560},{"style":525},[6561],{"type":51,"value":4529},{"type":46,"tag":470,"props":6563,"children":6564},{"style":531},[6565],{"type":51,"value":4534},{"type":46,"tag":470,"props":6567,"children":6568},{"style":631},[6569],{"type":51,"value":4539},{"type":46,"tag":470,"props":6571,"children":6572},{"style":2780},[6573],{"type":51,"value":835},{"type":46,"tag":470,"props":6575,"children":6576},{"style":531},[6577],{"type":51,"value":565},{"type":46,"tag":470,"props":6579,"children":6580},{"style":483},[6581],{"type":51,"value":6582},"swap.from is not a valid address",{"type":46,"tag":470,"props":6584,"children":6585},{"style":531},[6586],{"type":51,"value":565},{"type":46,"tag":470,"props":6588,"children":6589},{"style":2780},[6590],{"type":51,"value":842},{"type":46,"tag":470,"props":6592,"children":6593},{"style":531},[6594],{"type":51,"value":570},{"type":46,"tag":470,"props":6596,"children":6597},{"class":472,"line":3031},[6598],{"type":46,"tag":470,"props":6599,"children":6600},{"style":531},[6601],{"type":51,"value":1344},{"type":46,"tag":470,"props":6603,"children":6604},{"class":472,"line":3064},[6605],{"type":46,"tag":470,"props":6606,"children":6607},{"emptyLinePlaceholder":577},[6608],{"type":51,"value":580},{"type":46,"tag":470,"props":6610,"children":6611},{"class":472,"line":3073},[6612],{"type":46,"tag":470,"props":6613,"children":6614},{"style":3418},[6615],{"type":51,"value":6616},"  \u002F\u002F 3. Value must be present (can be \"0\" for non-ETH swaps)\n",{"type":46,"tag":470,"props":6618,"children":6619},{"class":472,"line":3082},[6620,6624,6628,6632,6636,6640,6644,6649,6653,6657,6661,6665,6669,6674,6678],{"type":46,"tag":470,"props":6621,"children":6622},{"style":525},[6623],{"type":51,"value":3766},{"type":46,"tag":470,"props":6625,"children":6626},{"style":2780},[6627],{"type":51,"value":3771},{"type":46,"tag":470,"props":6629,"children":6630},{"style":537},[6631],{"type":51,"value":4110},{"type":46,"tag":470,"props":6633,"children":6634},{"style":531},[6635],{"type":51,"value":628},{"type":46,"tag":470,"props":6637,"children":6638},{"style":537},[6639],{"type":51,"value":1286},{"type":46,"tag":470,"props":6641,"children":6642},{"style":531},[6643],{"type":51,"value":3874},{"type":46,"tag":470,"props":6645,"children":6646},{"style":531},[6647],{"type":51,"value":6648}," undefined",{"type":46,"tag":470,"props":6650,"children":6651},{"style":531},[6652],{"type":51,"value":4442},{"type":46,"tag":470,"props":6654,"children":6655},{"style":537},[6656],{"type":51,"value":6198},{"type":46,"tag":470,"props":6658,"children":6659},{"style":531},[6660],{"type":51,"value":628},{"type":46,"tag":470,"props":6662,"children":6663},{"style":537},[6664],{"type":51,"value":1286},{"type":46,"tag":470,"props":6666,"children":6667},{"style":531},[6668],{"type":51,"value":3874},{"type":46,"tag":470,"props":6670,"children":6671},{"style":531},[6672],{"type":51,"value":6673}," null",{"type":46,"tag":470,"props":6675,"children":6676},{"style":2780},[6677],{"type":51,"value":3781},{"type":46,"tag":470,"props":6679,"children":6680},{"style":531},[6681],{"type":51,"value":967},{"type":46,"tag":470,"props":6683,"children":6684},{"class":472,"line":3106},[6685,6689,6693,6697,6701,6705,6710,6714,6718],{"type":46,"tag":470,"props":6686,"children":6687},{"style":525},[6688],{"type":51,"value":4529},{"type":46,"tag":470,"props":6690,"children":6691},{"style":531},[6692],{"type":51,"value":4534},{"type":46,"tag":470,"props":6694,"children":6695},{"style":631},[6696],{"type":51,"value":4539},{"type":46,"tag":470,"props":6698,"children":6699},{"style":2780},[6700],{"type":51,"value":835},{"type":46,"tag":470,"props":6702,"children":6703},{"style":531},[6704],{"type":51,"value":565},{"type":46,"tag":470,"props":6706,"children":6707},{"style":483},[6708],{"type":51,"value":6709},"swap.value is missing",{"type":46,"tag":470,"props":6711,"children":6712},{"style":531},[6713],{"type":51,"value":565},{"type":46,"tag":470,"props":6715,"children":6716},{"style":2780},[6717],{"type":51,"value":842},{"type":46,"tag":470,"props":6719,"children":6720},{"style":531},[6721],{"type":51,"value":570},{"type":46,"tag":470,"props":6723,"children":6724},{"class":472,"line":3115},[6725],{"type":46,"tag":470,"props":6726,"children":6727},{"style":531},[6728],{"type":51,"value":1344},{"type":46,"tag":470,"props":6730,"children":6731},{"class":472,"line":3152},[6732],{"type":46,"tag":470,"props":6733,"children":6734},{"style":531},[6735],{"type":51,"value":1117},{"type":46,"tag":172,"props":6737,"children":6739},{"id":6738},"_5-browser-environment-setup",[6740],{"type":51,"value":6741},"5. Browser Environment Setup",{"type":46,"tag":54,"props":6743,"children":6744},{},[6745],{"type":51,"value":6746},"When using viem\u002Fwagmi in browser environments, you need Node.js polyfills:",{"type":46,"tag":54,"props":6748,"children":6749},{},[6750,6755],{"type":46,"tag":72,"props":6751,"children":6752},{},[6753],{"type":51,"value":6754},"Install buffer polyfill",{"type":51,"value":417},{"type":46,"tag":397,"props":6757,"children":6759},{"className":462,"code":6758,"language":464,"meta":402,"style":402},"npm install buffer\n",[6760],{"type":46,"tag":80,"props":6761,"children":6762},{"__ignoreMap":402},[6763],{"type":46,"tag":470,"props":6764,"children":6765},{"class":472,"line":473},[6766,6770,6774],{"type":46,"tag":470,"props":6767,"children":6768},{"style":477},[6769],{"type":51,"value":480},{"type":46,"tag":470,"props":6771,"children":6772},{"style":483},[6773],{"type":51,"value":486},{"type":46,"tag":470,"props":6775,"children":6776},{"style":483},[6777],{"type":51,"value":6778}," buffer\n",{"type":46,"tag":54,"props":6780,"children":6781},{},[6782,6787],{"type":46,"tag":72,"props":6783,"children":6784},{},[6785],{"type":51,"value":6786},"Add to your entry file (before other imports)",{"type":51,"value":417},{"type":46,"tag":397,"props":6789,"children":6791},{"className":513,"code":6790,"language":515,"meta":402,"style":402},"\u002F\u002F src\u002Fmain.tsx or src\u002Findex.tsx\nimport { Buffer } from 'buffer';\nglobalThis.Buffer = Buffer;\n\n\u002F\u002F Then your other imports\nimport React from 'react';\nimport { WagmiProvider } from 'wagmi';\n\u002F\u002F ...\n",[6792],{"type":46,"tag":80,"props":6793,"children":6794},{"__ignoreMap":402},[6795,6803,6844,6873,6880,6888,6921,6962],{"type":46,"tag":470,"props":6796,"children":6797},{"class":472,"line":473},[6798],{"type":46,"tag":470,"props":6799,"children":6800},{"style":3418},[6801],{"type":51,"value":6802},"\u002F\u002F src\u002Fmain.tsx or src\u002Findex.tsx\n",{"type":46,"tag":470,"props":6804,"children":6805},{"class":472,"line":573},[6806,6810,6814,6819,6823,6827,6831,6836,6840],{"type":46,"tag":470,"props":6807,"children":6808},{"style":525},[6809],{"type":51,"value":528},{"type":46,"tag":470,"props":6811,"children":6812},{"style":531},[6813],{"type":51,"value":534},{"type":46,"tag":470,"props":6815,"children":6816},{"style":537},[6817],{"type":51,"value":6818}," Buffer",{"type":46,"tag":470,"props":6820,"children":6821},{"style":531},[6822],{"type":51,"value":545},{"type":46,"tag":470,"props":6824,"children":6825},{"style":525},[6826],{"type":51,"value":550},{"type":46,"tag":470,"props":6828,"children":6829},{"style":531},[6830],{"type":51,"value":555},{"type":46,"tag":470,"props":6832,"children":6833},{"style":483},[6834],{"type":51,"value":6835},"buffer",{"type":46,"tag":470,"props":6837,"children":6838},{"style":531},[6839],{"type":51,"value":565},{"type":46,"tag":470,"props":6841,"children":6842},{"style":531},[6843],{"type":51,"value":570},{"type":46,"tag":470,"props":6845,"children":6846},{"class":472,"line":583},[6847,6852,6856,6861,6865,6869],{"type":46,"tag":470,"props":6848,"children":6849},{"style":537},[6850],{"type":51,"value":6851},"globalThis",{"type":46,"tag":470,"props":6853,"children":6854},{"style":531},[6855],{"type":51,"value":628},{"type":46,"tag":470,"props":6857,"children":6858},{"style":537},[6859],{"type":51,"value":6860},"Buffer ",{"type":46,"tag":470,"props":6862,"children":6863},{"style":531},[6864],{"type":51,"value":3438},{"type":46,"tag":470,"props":6866,"children":6867},{"style":537},[6868],{"type":51,"value":6818},{"type":46,"tag":470,"props":6870,"children":6871},{"style":531},[6872],{"type":51,"value":570},{"type":46,"tag":470,"props":6874,"children":6875},{"class":472,"line":1046},[6876],{"type":46,"tag":470,"props":6877,"children":6878},{"emptyLinePlaceholder":577},[6879],{"type":51,"value":580},{"type":46,"tag":470,"props":6881,"children":6882},{"class":472,"line":1084},[6883],{"type":46,"tag":470,"props":6884,"children":6885},{"style":3418},[6886],{"type":51,"value":6887},"\u002F\u002F Then your other imports\n",{"type":46,"tag":470,"props":6889,"children":6890},{"class":472,"line":1111},[6891,6895,6900,6904,6908,6913,6917],{"type":46,"tag":470,"props":6892,"children":6893},{"style":525},[6894],{"type":51,"value":528},{"type":46,"tag":470,"props":6896,"children":6897},{"style":537},[6898],{"type":51,"value":6899}," React ",{"type":46,"tag":470,"props":6901,"children":6902},{"style":525},[6903],{"type":51,"value":1214},{"type":46,"tag":470,"props":6905,"children":6906},{"style":531},[6907],{"type":51,"value":555},{"type":46,"tag":470,"props":6909,"children":6910},{"style":483},[6911],{"type":51,"value":6912},"react",{"type":46,"tag":470,"props":6914,"children":6915},{"style":531},[6916],{"type":51,"value":565},{"type":46,"tag":470,"props":6918,"children":6919},{"style":531},[6920],{"type":51,"value":570},{"type":46,"tag":470,"props":6922,"children":6923},{"class":472,"line":1314},[6924,6928,6932,6937,6941,6945,6949,6954,6958],{"type":46,"tag":470,"props":6925,"children":6926},{"style":525},[6927],{"type":51,"value":528},{"type":46,"tag":470,"props":6929,"children":6930},{"style":531},[6931],{"type":51,"value":534},{"type":46,"tag":470,"props":6933,"children":6934},{"style":537},[6935],{"type":51,"value":6936}," WagmiProvider",{"type":46,"tag":470,"props":6938,"children":6939},{"style":531},[6940],{"type":51,"value":545},{"type":46,"tag":470,"props":6942,"children":6943},{"style":525},[6944],{"type":51,"value":550},{"type":46,"tag":470,"props":6946,"children":6947},{"style":531},[6948],{"type":51,"value":555},{"type":46,"tag":470,"props":6950,"children":6951},{"style":483},[6952],{"type":51,"value":6953},"wagmi",{"type":46,"tag":470,"props":6955,"children":6956},{"style":531},[6957],{"type":51,"value":565},{"type":46,"tag":470,"props":6959,"children":6960},{"style":531},[6961],{"type":51,"value":570},{"type":46,"tag":470,"props":6963,"children":6964},{"class":472,"line":1338},[6965],{"type":46,"tag":470,"props":6966,"children":6967},{"style":3418},[6968],{"type":51,"value":6969},"\u002F\u002F ...\n",{"type":46,"tag":54,"props":6971,"children":6972},{},[6973,6978,6979,6985],{"type":46,"tag":72,"props":6974,"children":6975},{},[6976],{"type":51,"value":6977},"Vite configuration",{"type":51,"value":3771},{"type":46,"tag":80,"props":6980,"children":6982},{"className":6981},[],[6983],{"type":51,"value":6984},"vite.config.ts",{"type":51,"value":4391},{"type":46,"tag":397,"props":6987,"children":6989},{"className":513,"code":6988,"language":515,"meta":402,"style":402},"export default defineConfig({\n  define: {\n    global: 'globalThis',\n  },\n  optimizeDeps: {\n    include: ['buffer'],\n  },\n  resolve: {\n    alias: {\n      buffer: 'buffer',\n    },\n  },\n});\n",[6990],{"type":46,"tag":80,"props":6991,"children":6992},{"__ignoreMap":402},[6993,7019,7035,7063,7070,7086,7124,7131,7147,7163,7191,7198,7205],{"type":46,"tag":470,"props":6994,"children":6995},{"class":472,"line":473},[6996,7001,7006,7011,7015],{"type":46,"tag":470,"props":6997,"children":6998},{"style":525},[6999],{"type":51,"value":7000},"export",{"type":46,"tag":470,"props":7002,"children":7003},{"style":525},[7004],{"type":51,"value":7005}," default",{"type":46,"tag":470,"props":7007,"children":7008},{"style":631},[7009],{"type":51,"value":7010}," defineConfig",{"type":46,"tag":470,"props":7012,"children":7013},{"style":537},[7014],{"type":51,"value":835},{"type":46,"tag":470,"props":7016,"children":7017},{"style":531},[7018],{"type":51,"value":967},{"type":46,"tag":470,"props":7020,"children":7021},{"class":472,"line":573},[7022,7027,7031],{"type":46,"tag":470,"props":7023,"children":7024},{"style":2780},[7025],{"type":51,"value":7026},"  define",{"type":46,"tag":470,"props":7028,"children":7029},{"style":531},[7030],{"type":51,"value":417},{"type":46,"tag":470,"props":7032,"children":7033},{"style":531},[7034],{"type":51,"value":1165},{"type":46,"tag":470,"props":7036,"children":7037},{"class":472,"line":583},[7038,7043,7047,7051,7055,7059],{"type":46,"tag":470,"props":7039,"children":7040},{"style":2780},[7041],{"type":51,"value":7042},"    global",{"type":46,"tag":470,"props":7044,"children":7045},{"style":531},[7046],{"type":51,"value":417},{"type":46,"tag":470,"props":7048,"children":7049},{"style":531},[7050],{"type":51,"value":555},{"type":46,"tag":470,"props":7052,"children":7053},{"style":483},[7054],{"type":51,"value":6851},{"type":46,"tag":470,"props":7056,"children":7057},{"style":531},[7058],{"type":51,"value":565},{"type":46,"tag":470,"props":7060,"children":7061},{"style":531},[7062],{"type":51,"value":1007},{"type":46,"tag":470,"props":7064,"children":7065},{"class":472,"line":1046},[7066],{"type":46,"tag":470,"props":7067,"children":7068},{"style":531},[7069],{"type":51,"value":2418},{"type":46,"tag":470,"props":7071,"children":7072},{"class":472,"line":1084},[7073,7078,7082],{"type":46,"tag":470,"props":7074,"children":7075},{"style":2780},[7076],{"type":51,"value":7077},"  optimizeDeps",{"type":46,"tag":470,"props":7079,"children":7080},{"style":531},[7081],{"type":51,"value":417},{"type":46,"tag":470,"props":7083,"children":7084},{"style":531},[7085],{"type":51,"value":1165},{"type":46,"tag":470,"props":7087,"children":7088},{"class":472,"line":1111},[7089,7094,7098,7103,7107,7111,7115,7120],{"type":46,"tag":470,"props":7090,"children":7091},{"style":2780},[7092],{"type":51,"value":7093},"    include",{"type":46,"tag":470,"props":7095,"children":7096},{"style":531},[7097],{"type":51,"value":417},{"type":46,"tag":470,"props":7099,"children":7100},{"style":537},[7101],{"type":51,"value":7102}," [",{"type":46,"tag":470,"props":7104,"children":7105},{"style":531},[7106],{"type":51,"value":565},{"type":46,"tag":470,"props":7108,"children":7109},{"style":483},[7110],{"type":51,"value":6835},{"type":46,"tag":470,"props":7112,"children":7113},{"style":531},[7114],{"type":51,"value":565},{"type":46,"tag":470,"props":7116,"children":7117},{"style":537},[7118],{"type":51,"value":7119},"]",{"type":46,"tag":470,"props":7121,"children":7122},{"style":531},[7123],{"type":51,"value":1007},{"type":46,"tag":470,"props":7125,"children":7126},{"class":472,"line":1314},[7127],{"type":46,"tag":470,"props":7128,"children":7129},{"style":531},[7130],{"type":51,"value":2418},{"type":46,"tag":470,"props":7132,"children":7133},{"class":472,"line":1338},[7134,7139,7143],{"type":46,"tag":470,"props":7135,"children":7136},{"style":2780},[7137],{"type":51,"value":7138},"  resolve",{"type":46,"tag":470,"props":7140,"children":7141},{"style":531},[7142],{"type":51,"value":417},{"type":46,"tag":470,"props":7144,"children":7145},{"style":531},[7146],{"type":51,"value":1165},{"type":46,"tag":470,"props":7148,"children":7149},{"class":472,"line":1347},[7150,7155,7159],{"type":46,"tag":470,"props":7151,"children":7152},{"style":2780},[7153],{"type":51,"value":7154},"    alias",{"type":46,"tag":470,"props":7156,"children":7157},{"style":531},[7158],{"type":51,"value":417},{"type":46,"tag":470,"props":7160,"children":7161},{"style":531},[7162],{"type":51,"value":1165},{"type":46,"tag":470,"props":7164,"children":7165},{"class":472,"line":1705},[7166,7171,7175,7179,7183,7187],{"type":46,"tag":470,"props":7167,"children":7168},{"style":2780},[7169],{"type":51,"value":7170},"      buffer",{"type":46,"tag":470,"props":7172,"children":7173},{"style":531},[7174],{"type":51,"value":417},{"type":46,"tag":470,"props":7176,"children":7177},{"style":531},[7178],{"type":51,"value":555},{"type":46,"tag":470,"props":7180,"children":7181},{"style":483},[7182],{"type":51,"value":6835},{"type":46,"tag":470,"props":7184,"children":7185},{"style":531},[7186],{"type":51,"value":565},{"type":46,"tag":470,"props":7188,"children":7189},{"style":531},[7190],{"type":51,"value":1007},{"type":46,"tag":470,"props":7192,"children":7193},{"class":472,"line":1740},[7194],{"type":46,"tag":470,"props":7195,"children":7196},{"style":531},[7197],{"type":51,"value":3112},{"type":46,"tag":470,"props":7199,"children":7200},{"class":472,"line":2421},[7201],{"type":46,"tag":470,"props":7202,"children":7203},{"style":531},[7204],{"type":51,"value":2418},{"type":46,"tag":470,"props":7206,"children":7207},{"class":472,"line":2447},[7208,7212,7216],{"type":46,"tag":470,"props":7209,"children":7210},{"style":531},[7211],{"type":51,"value":614},{"type":46,"tag":470,"props":7213,"children":7214},{"style":537},[7215],{"type":51,"value":842},{"type":46,"tag":470,"props":7217,"children":7218},{"style":531},[7219],{"type":51,"value":570},{"type":46,"tag":54,"props":7221,"children":7222},{},[7223,7225],{"type":51,"value":7224},"Without this setup, you'll see: ",{"type":46,"tag":80,"props":7226,"children":7228},{"className":7227},[],[7229],{"type":51,"value":7230},"ReferenceError: Buffer is not defined",{"type":46,"tag":7232,"props":7233,"children":7235},"h4",{"id":7234},"cors-proxy-configuration",[7236],{"type":51,"value":7237},"CORS Proxy Configuration",{"type":46,"tag":54,"props":7239,"children":7240},{},[7241,7243,7249,7251,7257,7259,7265,7267,7272],{"type":51,"value":7242},"The Trading API does not support browser CORS preflight requests — ",{"type":46,"tag":80,"props":7244,"children":7246},{"className":7245},[],[7247],{"type":51,"value":7248},"OPTIONS",{"type":51,"value":7250}," requests return ",{"type":46,"tag":80,"props":7252,"children":7254},{"className":7253},[],[7255],{"type":51,"value":7256},"415 Unsupported Media Type",{"type":51,"value":7258},". Direct ",{"type":46,"tag":80,"props":7260,"children":7262},{"className":7261},[],[7263],{"type":51,"value":7264},"fetch()",{"type":51,"value":7266}," calls from a browser will always fail. You ",{"type":46,"tag":72,"props":7268,"children":7269},{},[7270],{"type":51,"value":7271},"must",{"type":51,"value":7273}," proxy API requests through your own server or dev server.",{"type":46,"tag":54,"props":7275,"children":7276},{},[7277,7282,7284,7289],{"type":46,"tag":72,"props":7278,"children":7279},{},[7280],{"type":51,"value":7281},"Vite dev proxy",{"type":51,"value":7283}," (merge into the same ",{"type":46,"tag":80,"props":7285,"children":7287},{"className":7286},[],[7288],{"type":51,"value":6984},{"type":51,"value":7290}," used for the Buffer polyfill above):",{"type":46,"tag":397,"props":7292,"children":7294},{"className":513,"code":7293,"language":515,"meta":402,"style":402},"export default defineConfig({\n  server: {\n    proxy: {\n      '\u002Fapi\u002Funiswap': {\n        target: 'https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1',\n        changeOrigin: true,\n        rewrite: (path) => path.replace(\u002F^\\\u002Fapi\\\u002Funiswap\u002F, ''),\n      },\n    },\n  },\n});\n",[7295],{"type":46,"tag":80,"props":7296,"children":7297},{"__ignoreMap":402},[7298,7321,7337,7353,7378,7406,7428,7524,7531,7538,7545],{"type":46,"tag":470,"props":7299,"children":7300},{"class":472,"line":473},[7301,7305,7309,7313,7317],{"type":46,"tag":470,"props":7302,"children":7303},{"style":525},[7304],{"type":51,"value":7000},{"type":46,"tag":470,"props":7306,"children":7307},{"style":525},[7308],{"type":51,"value":7005},{"type":46,"tag":470,"props":7310,"children":7311},{"style":631},[7312],{"type":51,"value":7010},{"type":46,"tag":470,"props":7314,"children":7315},{"style":537},[7316],{"type":51,"value":835},{"type":46,"tag":470,"props":7318,"children":7319},{"style":531},[7320],{"type":51,"value":967},{"type":46,"tag":470,"props":7322,"children":7323},{"class":472,"line":573},[7324,7329,7333],{"type":46,"tag":470,"props":7325,"children":7326},{"style":2780},[7327],{"type":51,"value":7328},"  server",{"type":46,"tag":470,"props":7330,"children":7331},{"style":531},[7332],{"type":51,"value":417},{"type":46,"tag":470,"props":7334,"children":7335},{"style":531},[7336],{"type":51,"value":1165},{"type":46,"tag":470,"props":7338,"children":7339},{"class":472,"line":583},[7340,7345,7349],{"type":46,"tag":470,"props":7341,"children":7342},{"style":2780},[7343],{"type":51,"value":7344},"    proxy",{"type":46,"tag":470,"props":7346,"children":7347},{"style":531},[7348],{"type":51,"value":417},{"type":46,"tag":470,"props":7350,"children":7351},{"style":531},[7352],{"type":51,"value":1165},{"type":46,"tag":470,"props":7354,"children":7355},{"class":472,"line":1046},[7356,7361,7366,7370,7374],{"type":46,"tag":470,"props":7357,"children":7358},{"style":531},[7359],{"type":51,"value":7360},"      '",{"type":46,"tag":470,"props":7362,"children":7363},{"style":2780},[7364],{"type":51,"value":7365},"\u002Fapi\u002Funiswap",{"type":46,"tag":470,"props":7367,"children":7368},{"style":531},[7369],{"type":51,"value":565},{"type":46,"tag":470,"props":7371,"children":7372},{"style":531},[7373],{"type":51,"value":417},{"type":46,"tag":470,"props":7375,"children":7376},{"style":531},[7377],{"type":51,"value":1165},{"type":46,"tag":470,"props":7379,"children":7380},{"class":472,"line":1084},[7381,7386,7390,7394,7398,7402],{"type":46,"tag":470,"props":7382,"children":7383},{"style":2780},[7384],{"type":51,"value":7385},"        target",{"type":46,"tag":470,"props":7387,"children":7388},{"style":531},[7389],{"type":51,"value":417},{"type":46,"tag":470,"props":7391,"children":7392},{"style":531},[7393],{"type":51,"value":555},{"type":46,"tag":470,"props":7395,"children":7396},{"style":483},[7397],{"type":51,"value":340},{"type":46,"tag":470,"props":7399,"children":7400},{"style":531},[7401],{"type":51,"value":565},{"type":46,"tag":470,"props":7403,"children":7404},{"style":531},[7405],{"type":51,"value":1007},{"type":46,"tag":470,"props":7407,"children":7408},{"class":472,"line":1111},[7409,7414,7418,7424],{"type":46,"tag":470,"props":7410,"children":7411},{"style":2780},[7412],{"type":51,"value":7413},"        changeOrigin",{"type":46,"tag":470,"props":7415,"children":7416},{"style":531},[7417],{"type":51,"value":417},{"type":46,"tag":470,"props":7419,"children":7421},{"style":7420},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[7422],{"type":51,"value":7423}," true",{"type":46,"tag":470,"props":7425,"children":7426},{"style":531},[7427],{"type":51,"value":1007},{"type":46,"tag":470,"props":7429,"children":7430},{"class":472,"line":1314},[7431,7436,7440,7444,7449,7453,7458,7463,7467,7472,7476,7481,7486,7491,7496,7500,7504,7508,7512,7516,7520],{"type":46,"tag":470,"props":7432,"children":7433},{"style":631},[7434],{"type":51,"value":7435},"        rewrite",{"type":46,"tag":470,"props":7437,"children":7438},{"style":531},[7439],{"type":51,"value":417},{"type":46,"tag":470,"props":7441,"children":7442},{"style":531},[7443],{"type":51,"value":3771},{"type":46,"tag":470,"props":7445,"children":7446},{"style":4374},[7447],{"type":51,"value":7448},"path",{"type":46,"tag":470,"props":7450,"children":7451},{"style":531},[7452],{"type":51,"value":842},{"type":46,"tag":470,"props":7454,"children":7455},{"style":587},[7456],{"type":51,"value":7457}," =>",{"type":46,"tag":470,"props":7459,"children":7460},{"style":537},[7461],{"type":51,"value":7462}," path",{"type":46,"tag":470,"props":7464,"children":7465},{"style":531},[7466],{"type":51,"value":628},{"type":46,"tag":470,"props":7468,"children":7469},{"style":631},[7470],{"type":51,"value":7471},"replace",{"type":46,"tag":470,"props":7473,"children":7474},{"style":537},[7475],{"type":51,"value":835},{"type":46,"tag":470,"props":7477,"children":7478},{"style":531},[7479],{"type":51,"value":7480},"\u002F",{"type":46,"tag":470,"props":7482,"children":7483},{"style":525},[7484],{"type":51,"value":7485},"^",{"type":46,"tag":470,"props":7487,"children":7488},{"style":537},[7489],{"type":51,"value":7490},"\\\u002F",{"type":46,"tag":470,"props":7492,"children":7493},{"style":483},[7494],{"type":51,"value":7495},"api",{"type":46,"tag":470,"props":7497,"children":7498},{"style":537},[7499],{"type":51,"value":7490},{"type":46,"tag":470,"props":7501,"children":7502},{"style":483},[7503],{"type":51,"value":8},{"type":46,"tag":470,"props":7505,"children":7506},{"style":531},[7507],{"type":51,"value":7480},{"type":46,"tag":470,"props":7509,"children":7510},{"style":531},[7511],{"type":51,"value":604},{"type":46,"tag":470,"props":7513,"children":7514},{"style":531},[7515],{"type":51,"value":4472},{"type":46,"tag":470,"props":7517,"children":7518},{"style":537},[7519],{"type":51,"value":842},{"type":46,"tag":470,"props":7521,"children":7522},{"style":531},[7523],{"type":51,"value":1007},{"type":46,"tag":470,"props":7525,"children":7526},{"class":472,"line":1338},[7527],{"type":46,"tag":470,"props":7528,"children":7529},{"style":531},[7530],{"type":51,"value":2883},{"type":46,"tag":470,"props":7532,"children":7533},{"class":472,"line":1347},[7534],{"type":46,"tag":470,"props":7535,"children":7536},{"style":531},[7537],{"type":51,"value":3112},{"type":46,"tag":470,"props":7539,"children":7540},{"class":472,"line":1705},[7541],{"type":46,"tag":470,"props":7542,"children":7543},{"style":531},[7544],{"type":51,"value":2418},{"type":46,"tag":470,"props":7546,"children":7547},{"class":472,"line":1740},[7548,7552,7556],{"type":46,"tag":470,"props":7549,"children":7550},{"style":531},[7551],{"type":51,"value":614},{"type":46,"tag":470,"props":7553,"children":7554},{"style":537},[7555],{"type":51,"value":842},{"type":46,"tag":470,"props":7557,"children":7558},{"style":531},[7559],{"type":51,"value":570},{"type":46,"tag":54,"props":7561,"children":7562},{},[7563,7565,7571],{"type":51,"value":7564},"Then use ",{"type":46,"tag":80,"props":7566,"children":7568},{"className":7567},[],[7569],{"type":51,"value":7570},"\u002Fapi\u002Funiswap\u002Fquote",{"type":51,"value":7572}," instead of the full URL in your frontend code.",{"type":46,"tag":54,"props":7574,"children":7575},{},[7576,7581,7582,7588],{"type":46,"tag":72,"props":7577,"children":7578},{},[7579],{"type":51,"value":7580},"Vercel production proxy",{"type":51,"value":3771},{"type":46,"tag":80,"props":7583,"children":7585},{"className":7584},[],[7586],{"type":51,"value":7587},"vercel.json",{"type":51,"value":4391},{"type":46,"tag":397,"props":7590,"children":7592},{"className":953,"code":7591,"language":955,"meta":402,"style":402},"{\n  \"rewrites\": [\n    {\n      \"source\": \"\u002Fapi\u002Funiswap\u002F:path*\",\n      \"destination\": \"https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1\u002F:path*\"\n    }\n  ]\n}\n",[7593],{"type":46,"tag":80,"props":7594,"children":7595},{"__ignoreMap":402},[7596,7603,7627,7635,7672,7705,7712,7720],{"type":46,"tag":470,"props":7597,"children":7598},{"class":472,"line":473},[7599],{"type":46,"tag":470,"props":7600,"children":7601},{"style":531},[7602],{"type":51,"value":967},{"type":46,"tag":470,"props":7604,"children":7605},{"class":472,"line":573},[7606,7610,7615,7619,7623],{"type":46,"tag":470,"props":7607,"children":7608},{"style":531},[7609],{"type":51,"value":975},{"type":46,"tag":470,"props":7611,"children":7612},{"style":587},[7613],{"type":51,"value":7614},"rewrites",{"type":46,"tag":470,"props":7616,"children":7617},{"style":531},[7618],{"type":51,"value":876},{"type":46,"tag":470,"props":7620,"children":7621},{"style":531},[7622],{"type":51,"value":417},{"type":46,"tag":470,"props":7624,"children":7625},{"style":531},[7626],{"type":51,"value":2909},{"type":46,"tag":470,"props":7628,"children":7629},{"class":472,"line":583},[7630],{"type":46,"tag":470,"props":7631,"children":7632},{"style":531},[7633],{"type":51,"value":7634},"    {\n",{"type":46,"tag":470,"props":7636,"children":7637},{"class":472,"line":1046},[7638,7642,7647,7651,7655,7659,7664,7668],{"type":46,"tag":470,"props":7639,"children":7640},{"style":531},[7641],{"type":51,"value":2580},{"type":46,"tag":470,"props":7643,"children":7644},{"style":477},[7645],{"type":51,"value":7646},"source",{"type":46,"tag":470,"props":7648,"children":7649},{"style":531},[7650],{"type":51,"value":876},{"type":46,"tag":470,"props":7652,"children":7653},{"style":531},[7654],{"type":51,"value":417},{"type":46,"tag":470,"props":7656,"children":7657},{"style":531},[7658],{"type":51,"value":993},{"type":46,"tag":470,"props":7660,"children":7661},{"style":483},[7662],{"type":51,"value":7663},"\u002Fapi\u002Funiswap\u002F:path*",{"type":46,"tag":470,"props":7665,"children":7666},{"style":531},[7667],{"type":51,"value":876},{"type":46,"tag":470,"props":7669,"children":7670},{"style":531},[7671],{"type":51,"value":1007},{"type":46,"tag":470,"props":7673,"children":7674},{"class":472,"line":1084},[7675,7679,7684,7688,7692,7696,7701],{"type":46,"tag":470,"props":7676,"children":7677},{"style":531},[7678],{"type":51,"value":2580},{"type":46,"tag":470,"props":7680,"children":7681},{"style":477},[7682],{"type":51,"value":7683},"destination",{"type":46,"tag":470,"props":7685,"children":7686},{"style":531},[7687],{"type":51,"value":876},{"type":46,"tag":470,"props":7689,"children":7690},{"style":531},[7691],{"type":51,"value":417},{"type":46,"tag":470,"props":7693,"children":7694},{"style":531},[7695],{"type":51,"value":993},{"type":46,"tag":470,"props":7697,"children":7698},{"style":483},[7699],{"type":51,"value":7700},"https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1\u002F:path*",{"type":46,"tag":470,"props":7702,"children":7703},{"style":531},[7704],{"type":51,"value":1737},{"type":46,"tag":470,"props":7706,"children":7707},{"class":472,"line":1111},[7708],{"type":46,"tag":470,"props":7709,"children":7710},{"style":531},[7711],{"type":51,"value":5750},{"type":46,"tag":470,"props":7713,"children":7714},{"class":472,"line":1314},[7715],{"type":46,"tag":470,"props":7716,"children":7717},{"style":531},[7718],{"type":51,"value":7719},"  ]\n",{"type":46,"tag":470,"props":7721,"children":7722},{"class":472,"line":1338},[7723],{"type":46,"tag":470,"props":7724,"children":7725},{"style":531},[7726],{"type":51,"value":1117},{"type":46,"tag":54,"props":7728,"children":7729},{},[7730,7735,7736,7742],{"type":46,"tag":72,"props":7731,"children":7732},{},[7733],{"type":51,"value":7734},"Cloudflare Pages",{"type":51,"value":3771},{"type":46,"tag":80,"props":7737,"children":7739},{"className":7738},[],[7740],{"type":51,"value":7741},"public\u002F_redirects",{"type":51,"value":4391},{"type":46,"tag":397,"props":7744,"children":7747},{"className":7745,"code":7746,"language":51,"meta":402},[400],"\u002Fapi\u002Funiswap\u002F* https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1\u002F:splat 200\n",[7748],{"type":46,"tag":80,"props":7749,"children":7750},{"__ignoreMap":402},[7751],{"type":51,"value":7746},{"type":46,"tag":54,"props":7753,"children":7754},{},[7755,7760,7761,7767],{"type":46,"tag":72,"props":7756,"children":7757},{},[7758],{"type":51,"value":7759},"Next.js",{"type":51,"value":3771},{"type":46,"tag":80,"props":7762,"children":7764},{"className":7763},[],[7765],{"type":51,"value":7766},"next.config.js",{"type":51,"value":4391},{"type":46,"tag":397,"props":7769,"children":7773},{"className":7770,"code":7771,"language":7772,"meta":402,"style":402},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","module.exports = {\n  async rewrites() {\n    return [\n      {\n        source: '\u002Fapi\u002Funiswap\u002F:path*',\n        destination: 'https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1\u002F:path*',\n      },\n    ];\n  },\n};\n","javascript",[7774],{"type":46,"tag":80,"props":7775,"children":7776},{"__ignoreMap":402},[7777,7793,7815,7827,7835,7863,7891,7898,7910,7917],{"type":46,"tag":470,"props":7778,"children":7779},{"class":472,"line":473},[7780,7785,7789],{"type":46,"tag":470,"props":7781,"children":7782},{"style":531},[7783],{"type":51,"value":7784},"module.exports",{"type":46,"tag":470,"props":7786,"children":7787},{"style":531},[7788],{"type":51,"value":619},{"type":46,"tag":470,"props":7790,"children":7791},{"style":531},[7792],{"type":51,"value":1165},{"type":46,"tag":470,"props":7794,"children":7795},{"class":472,"line":573},[7796,7801,7806,7811],{"type":46,"tag":470,"props":7797,"children":7798},{"style":587},[7799],{"type":51,"value":7800},"  async",{"type":46,"tag":470,"props":7802,"children":7803},{"style":2780},[7804],{"type":51,"value":7805}," rewrites",{"type":46,"tag":470,"props":7807,"children":7808},{"style":531},[7809],{"type":51,"value":7810},"()",{"type":46,"tag":470,"props":7812,"children":7813},{"style":531},[7814],{"type":51,"value":1165},{"type":46,"tag":470,"props":7816,"children":7817},{"class":472,"line":583},[7818,7823],{"type":46,"tag":470,"props":7819,"children":7820},{"style":525},[7821],{"type":51,"value":7822},"    return",{"type":46,"tag":470,"props":7824,"children":7825},{"style":2780},[7826],{"type":51,"value":2909},{"type":46,"tag":470,"props":7828,"children":7829},{"class":472,"line":1046},[7830],{"type":46,"tag":470,"props":7831,"children":7832},{"style":531},[7833],{"type":51,"value":7834},"      {\n",{"type":46,"tag":470,"props":7836,"children":7837},{"class":472,"line":1084},[7838,7843,7847,7851,7855,7859],{"type":46,"tag":470,"props":7839,"children":7840},{"style":2780},[7841],{"type":51,"value":7842},"        source",{"type":46,"tag":470,"props":7844,"children":7845},{"style":531},[7846],{"type":51,"value":417},{"type":46,"tag":470,"props":7848,"children":7849},{"style":531},[7850],{"type":51,"value":555},{"type":46,"tag":470,"props":7852,"children":7853},{"style":483},[7854],{"type":51,"value":7663},{"type":46,"tag":470,"props":7856,"children":7857},{"style":531},[7858],{"type":51,"value":565},{"type":46,"tag":470,"props":7860,"children":7861},{"style":531},[7862],{"type":51,"value":1007},{"type":46,"tag":470,"props":7864,"children":7865},{"class":472,"line":1111},[7866,7871,7875,7879,7883,7887],{"type":46,"tag":470,"props":7867,"children":7868},{"style":2780},[7869],{"type":51,"value":7870},"        destination",{"type":46,"tag":470,"props":7872,"children":7873},{"style":531},[7874],{"type":51,"value":417},{"type":46,"tag":470,"props":7876,"children":7877},{"style":531},[7878],{"type":51,"value":555},{"type":46,"tag":470,"props":7880,"children":7881},{"style":483},[7882],{"type":51,"value":7700},{"type":46,"tag":470,"props":7884,"children":7885},{"style":531},[7886],{"type":51,"value":565},{"type":46,"tag":470,"props":7888,"children":7889},{"style":531},[7890],{"type":51,"value":1007},{"type":46,"tag":470,"props":7892,"children":7893},{"class":472,"line":1314},[7894],{"type":46,"tag":470,"props":7895,"children":7896},{"style":531},[7897],{"type":51,"value":2883},{"type":46,"tag":470,"props":7899,"children":7900},{"class":472,"line":1338},[7901,7906],{"type":46,"tag":470,"props":7902,"children":7903},{"style":2780},[7904],{"type":51,"value":7905},"    ]",{"type":46,"tag":470,"props":7907,"children":7908},{"style":531},[7909],{"type":51,"value":570},{"type":46,"tag":470,"props":7911,"children":7912},{"class":472,"line":1347},[7913],{"type":46,"tag":470,"props":7914,"children":7915},{"style":531},[7916],{"type":51,"value":2418},{"type":46,"tag":470,"props":7918,"children":7919},{"class":472,"line":1705},[7920],{"type":46,"tag":470,"props":7921,"children":7922},{"style":531},[7923],{"type":51,"value":3592},{"type":46,"tag":54,"props":7925,"children":7926},{},[7927,7929,7934],{"type":51,"value":7928},"Without a proxy, you'll see: ",{"type":46,"tag":80,"props":7930,"children":7932},{"className":7931},[],[7933],{"type":51,"value":7256},{"type":51,"value":7935}," on preflight or CORS errors in the browser console.",{"type":46,"tag":172,"props":7937,"children":7939},{"id":7938},"_6-quote-freshness",[7940],{"type":51,"value":7941},"6. Quote Freshness",{"type":46,"tag":719,"props":7943,"children":7944},{},[7945,7950,7955,7967],{"type":46,"tag":723,"props":7946,"children":7947},{},[7948],{"type":51,"value":7949},"Quotes expire quickly (typically 30 seconds)",{"type":46,"tag":723,"props":7951,"children":7952},{},[7953],{"type":51,"value":7954},"Always re-fetch if the user takes time to review",{"type":46,"tag":723,"props":7956,"children":7957},{},[7958,7960,7965],{"type":51,"value":7959},"Use the ",{"type":46,"tag":80,"props":7961,"children":7963},{"className":7962},[],[7964],{"type":51,"value":2693},{"type":51,"value":7966}," parameter to prevent stale execution",{"type":46,"tag":723,"props":7968,"children":7969},{},[7970,7971,7976,7978,7983],{"type":51,"value":1357},{"type":46,"tag":80,"props":7972,"children":7974},{"className":7973},[],[7975],{"type":51,"value":4066},{"type":51,"value":7977}," returns empty ",{"type":46,"tag":80,"props":7979,"children":7981},{"className":7980},[],[7982],{"type":51,"value":1250},{"type":51,"value":7984},", the quote likely expired",{"type":46,"tag":172,"props":7986,"children":7988},{"id":7987},"_7-quoteresponse-typescript-types",[7989],{"type":51,"value":7990},"7. QuoteResponse TypeScript Types",{"type":46,"tag":54,"props":7992,"children":7993},{},[7994,7996,8001,8003,8009],{"type":51,"value":7995},"The quote response shape differs by routing type. Use a discriminated union on the ",{"type":46,"tag":80,"props":7997,"children":7999},{"className":7998},[],[8000],{"type":51,"value":2024},{"type":51,"value":8002}," field to get compile-time safety instead of casting to ",{"type":46,"tag":80,"props":8004,"children":8006},{"className":8005},[],[8007],{"type":51,"value":8008},"any",{"type":51,"value":417},{"type":46,"tag":397,"props":8011,"children":8013},{"className":513,"code":8012,"language":515,"meta":402,"style":402},"type ClassicQuoteResponse = {\n  routing: 'CLASSIC' | 'WRAP' | 'UNWRAP';\n  quote: {\n    input: { token: string; amount: string };\n    output: { token: string; amount: string };\n    slippage: number;\n    route: unknown[];\n    gasFee: string;\n    gasFeeUSD: string;\n    gasUseEstimate: string;\n  };\n  permitData: Record\u003Cstring, unknown> | null;\n};\n\ntype DutchOrderOutput = {\n  token: string;\n  startAmount: string;\n  endAmount: string;\n  recipient: string;\n};\n\ntype UniswapXQuoteResponse = {\n  routing: 'DUTCH_V2' | 'DUTCH_V3' | 'PRIORITY';\n  quote: {\n    orderInfo: {\n      outputs: DutchOrderOutput[];\n      input: { token: string; startAmount: string; endAmount: string };\n      deadline: number;\n      nonce: string;\n    };\n    encodedOrder: string;\n    orderHash: string;\n  };\n  \u002F\u002F EIP-712 typed data — sign locally, do NOT send to \u002Fswap\n  permitData: Record\u003Cstring, unknown> | null;\n};\n\ntype QuoteResponse = ClassicQuoteResponse | UniswapXQuoteResponse;\n\n\u002F\u002F Type guard for routing-aware logic\nfunction isUniswapXQuote(q: QuoteResponse): q is UniswapXQuoteResponse {\n  return q.routing === 'DUTCH_V2' || q.routing === 'DUTCH_V3' || q.routing === 'PRIORITY';\n}\n\n\u002F\u002F Reading the output amount by routing type\nfunction getOutputAmount(q: QuoteResponse): string {\n  if (isUniswapXQuote(q)) {\n    const firstOutput = q.quote.orderInfo.outputs[0];\n    if (!firstOutput) throw new Error('UniswapX quote has no outputs');\n    \u002F\u002F startAmount = best-case fill; endAmount = floor after auction decay\n    return firstOutput.startAmount;\n  }\n  return q.quote.output.amount;\n}\n",[8014],{"type":46,"tag":80,"props":8015,"children":8016},{"__ignoreMap":402},[8017,8037,8098,8113,8163,8211,8232,8257,8277,8297,8317,8325,8373,8380,8387,8407,8427,8447,8467,8487,8494,8501,8521,8580,8595,8611,8635,8701,8721,8741,8750,8771,8792,8800,8809,8856,8864,8872,8904,8912,8921,8973,9077,9085,9093,9102,9143,9176,9239,9302,9311,9335,9343,9383],{"type":46,"tag":470,"props":8018,"children":8019},{"class":472,"line":473},[8020,8024,8029,8033],{"type":46,"tag":470,"props":8021,"children":8022},{"style":587},[8023],{"type":51,"value":1648},{"type":46,"tag":470,"props":8025,"children":8026},{"style":477},[8027],{"type":51,"value":8028}," ClassicQuoteResponse",{"type":46,"tag":470,"props":8030,"children":8031},{"style":531},[8032],{"type":51,"value":619},{"type":46,"tag":470,"props":8034,"children":8035},{"style":531},[8036],{"type":51,"value":1165},{"type":46,"tag":470,"props":8038,"children":8039},{"class":472,"line":573},[8040,8045,8049,8053,8057,8061,8066,8070,8074,8078,8082,8086,8090,8094],{"type":46,"tag":470,"props":8041,"children":8042},{"style":2780},[8043],{"type":51,"value":8044},"  routing",{"type":46,"tag":470,"props":8046,"children":8047},{"style":531},[8048],{"type":51,"value":417},{"type":46,"tag":470,"props":8050,"children":8051},{"style":531},[8052],{"type":51,"value":555},{"type":46,"tag":470,"props":8054,"children":8055},{"style":483},[8056],{"type":51,"value":212},{"type":46,"tag":470,"props":8058,"children":8059},{"style":531},[8060],{"type":51,"value":565},{"type":46,"tag":470,"props":8062,"children":8063},{"style":531},[8064],{"type":51,"value":8065}," |",{"type":46,"tag":470,"props":8067,"children":8068},{"style":531},[8069],{"type":51,"value":555},{"type":46,"tag":470,"props":8071,"children":8072},{"style":483},[8073],{"type":51,"value":266},{"type":46,"tag":470,"props":8075,"children":8076},{"style":531},[8077],{"type":51,"value":565},{"type":46,"tag":470,"props":8079,"children":8080},{"style":531},[8081],{"type":51,"value":8065},{"type":46,"tag":470,"props":8083,"children":8084},{"style":531},[8085],{"type":51,"value":555},{"type":46,"tag":470,"props":8087,"children":8088},{"style":483},[8089],{"type":51,"value":284},{"type":46,"tag":470,"props":8091,"children":8092},{"style":531},[8093],{"type":51,"value":565},{"type":46,"tag":470,"props":8095,"children":8096},{"style":531},[8097],{"type":51,"value":570},{"type":46,"tag":470,"props":8099,"children":8100},{"class":472,"line":583},[8101,8105,8109],{"type":46,"tag":470,"props":8102,"children":8103},{"style":2780},[8104],{"type":51,"value":4994},{"type":46,"tag":470,"props":8106,"children":8107},{"style":531},[8108],{"type":51,"value":417},{"type":46,"tag":470,"props":8110,"children":8111},{"style":531},[8112],{"type":51,"value":1165},{"type":46,"tag":470,"props":8114,"children":8115},{"class":472,"line":1046},[8116,8121,8125,8129,8134,8138,8142,8146,8151,8155,8159],{"type":46,"tag":470,"props":8117,"children":8118},{"style":2780},[8119],{"type":51,"value":8120},"    input",{"type":46,"tag":470,"props":8122,"children":8123},{"style":531},[8124],{"type":51,"value":417},{"type":46,"tag":470,"props":8126,"children":8127},{"style":531},[8128],{"type":51,"value":534},{"type":46,"tag":470,"props":8130,"children":8131},{"style":2780},[8132],{"type":51,"value":8133}," token",{"type":46,"tag":470,"props":8135,"children":8136},{"style":531},[8137],{"type":51,"value":417},{"type":46,"tag":470,"props":8139,"children":8140},{"style":477},[8141],{"type":51,"value":5223},{"type":46,"tag":470,"props":8143,"children":8144},{"style":531},[8145],{"type":51,"value":799},{"type":46,"tag":470,"props":8147,"children":8148},{"style":2780},[8149],{"type":51,"value":8150}," amount",{"type":46,"tag":470,"props":8152,"children":8153},{"style":531},[8154],{"type":51,"value":417},{"type":46,"tag":470,"props":8156,"children":8157},{"style":477},[8158],{"type":51,"value":5223},{"type":46,"tag":470,"props":8160,"children":8161},{"style":531},[8162],{"type":51,"value":5358},{"type":46,"tag":470,"props":8164,"children":8165},{"class":472,"line":1084},[8166,8171,8175,8179,8183,8187,8191,8195,8199,8203,8207],{"type":46,"tag":470,"props":8167,"children":8168},{"style":2780},[8169],{"type":51,"value":8170},"    output",{"type":46,"tag":470,"props":8172,"children":8173},{"style":531},[8174],{"type":51,"value":417},{"type":46,"tag":470,"props":8176,"children":8177},{"style":531},[8178],{"type":51,"value":534},{"type":46,"tag":470,"props":8180,"children":8181},{"style":2780},[8182],{"type":51,"value":8133},{"type":46,"tag":470,"props":8184,"children":8185},{"style":531},[8186],{"type":51,"value":417},{"type":46,"tag":470,"props":8188,"children":8189},{"style":477},[8190],{"type":51,"value":5223},{"type":46,"tag":470,"props":8192,"children":8193},{"style":531},[8194],{"type":51,"value":799},{"type":46,"tag":470,"props":8196,"children":8197},{"style":2780},[8198],{"type":51,"value":8150},{"type":46,"tag":470,"props":8200,"children":8201},{"style":531},[8202],{"type":51,"value":417},{"type":46,"tag":470,"props":8204,"children":8205},{"style":477},[8206],{"type":51,"value":5223},{"type":46,"tag":470,"props":8208,"children":8209},{"style":531},[8210],{"type":51,"value":5358},{"type":46,"tag":470,"props":8212,"children":8213},{"class":472,"line":1111},[8214,8219,8223,8228],{"type":46,"tag":470,"props":8215,"children":8216},{"style":2780},[8217],{"type":51,"value":8218},"    slippage",{"type":46,"tag":470,"props":8220,"children":8221},{"style":531},[8222],{"type":51,"value":417},{"type":46,"tag":470,"props":8224,"children":8225},{"style":477},[8226],{"type":51,"value":8227}," number",{"type":46,"tag":470,"props":8229,"children":8230},{"style":531},[8231],{"type":51,"value":570},{"type":46,"tag":470,"props":8233,"children":8234},{"class":472,"line":1314},[8235,8240,8244,8248,8253],{"type":46,"tag":470,"props":8236,"children":8237},{"style":2780},[8238],{"type":51,"value":8239},"    route",{"type":46,"tag":470,"props":8241,"children":8242},{"style":531},[8243],{"type":51,"value":417},{"type":46,"tag":470,"props":8245,"children":8246},{"style":477},[8247],{"type":51,"value":3567},{"type":46,"tag":470,"props":8249,"children":8250},{"style":537},[8251],{"type":51,"value":8252},"[]",{"type":46,"tag":470,"props":8254,"children":8255},{"style":531},[8256],{"type":51,"value":570},{"type":46,"tag":470,"props":8258,"children":8259},{"class":472,"line":1338},[8260,8265,8269,8273],{"type":46,"tag":470,"props":8261,"children":8262},{"style":2780},[8263],{"type":51,"value":8264},"    gasFee",{"type":46,"tag":470,"props":8266,"children":8267},{"style":531},[8268],{"type":51,"value":417},{"type":46,"tag":470,"props":8270,"children":8271},{"style":477},[8272],{"type":51,"value":5223},{"type":46,"tag":470,"props":8274,"children":8275},{"style":531},[8276],{"type":51,"value":570},{"type":46,"tag":470,"props":8278,"children":8279},{"class":472,"line":1347},[8280,8285,8289,8293],{"type":46,"tag":470,"props":8281,"children":8282},{"style":2780},[8283],{"type":51,"value":8284},"    gasFeeUSD",{"type":46,"tag":470,"props":8286,"children":8287},{"style":531},[8288],{"type":51,"value":417},{"type":46,"tag":470,"props":8290,"children":8291},{"style":477},[8292],{"type":51,"value":5223},{"type":46,"tag":470,"props":8294,"children":8295},{"style":531},[8296],{"type":51,"value":570},{"type":46,"tag":470,"props":8298,"children":8299},{"class":472,"line":1705},[8300,8305,8309,8313],{"type":46,"tag":470,"props":8301,"children":8302},{"style":2780},[8303],{"type":51,"value":8304},"    gasUseEstimate",{"type":46,"tag":470,"props":8306,"children":8307},{"style":531},[8308],{"type":51,"value":417},{"type":46,"tag":470,"props":8310,"children":8311},{"style":477},[8312],{"type":51,"value":5223},{"type":46,"tag":470,"props":8314,"children":8315},{"style":531},[8316],{"type":51,"value":570},{"type":46,"tag":470,"props":8318,"children":8319},{"class":472,"line":1740},[8320],{"type":46,"tag":470,"props":8321,"children":8322},{"style":531},[8323],{"type":51,"value":8324},"  };\n",{"type":46,"tag":470,"props":8326,"children":8327},{"class":472,"line":2421},[8328,8333,8337,8341,8345,8349,8353,8357,8361,8365,8369],{"type":46,"tag":470,"props":8329,"children":8330},{"style":2780},[8331],{"type":51,"value":8332},"  permitData",{"type":46,"tag":470,"props":8334,"children":8335},{"style":531},[8336],{"type":51,"value":417},{"type":46,"tag":470,"props":8338,"children":8339},{"style":477},[8340],{"type":51,"value":3549},{"type":46,"tag":470,"props":8342,"children":8343},{"style":531},[8344],{"type":51,"value":856},{"type":46,"tag":470,"props":8346,"children":8347},{"style":477},[8348],{"type":51,"value":3558},{"type":46,"tag":470,"props":8350,"children":8351},{"style":531},[8352],{"type":51,"value":604},{"type":46,"tag":470,"props":8354,"children":8355},{"style":477},[8356],{"type":51,"value":3567},{"type":46,"tag":470,"props":8358,"children":8359},{"style":531},[8360],{"type":51,"value":849},{"type":46,"tag":470,"props":8362,"children":8363},{"style":531},[8364],{"type":51,"value":8065},{"type":46,"tag":470,"props":8366,"children":8367},{"style":477},[8368],{"type":51,"value":6673},{"type":46,"tag":470,"props":8370,"children":8371},{"style":531},[8372],{"type":51,"value":570},{"type":46,"tag":470,"props":8374,"children":8375},{"class":472,"line":2447},[8376],{"type":46,"tag":470,"props":8377,"children":8378},{"style":531},[8379],{"type":51,"value":3592},{"type":46,"tag":470,"props":8381,"children":8382},{"class":472,"line":2877},[8383],{"type":46,"tag":470,"props":8384,"children":8385},{"emptyLinePlaceholder":577},[8386],{"type":51,"value":580},{"type":46,"tag":470,"props":8388,"children":8389},{"class":472,"line":2886},[8390,8394,8399,8403],{"type":46,"tag":470,"props":8391,"children":8392},{"style":587},[8393],{"type":51,"value":1648},{"type":46,"tag":470,"props":8395,"children":8396},{"style":477},[8397],{"type":51,"value":8398}," DutchOrderOutput",{"type":46,"tag":470,"props":8400,"children":8401},{"style":531},[8402],{"type":51,"value":619},{"type":46,"tag":470,"props":8404,"children":8405},{"style":531},[8406],{"type":51,"value":1165},{"type":46,"tag":470,"props":8408,"children":8409},{"class":472,"line":2912},[8410,8415,8419,8423],{"type":46,"tag":470,"props":8411,"children":8412},{"style":2780},[8413],{"type":51,"value":8414},"  token",{"type":46,"tag":470,"props":8416,"children":8417},{"style":531},[8418],{"type":51,"value":417},{"type":46,"tag":470,"props":8420,"children":8421},{"style":477},[8422],{"type":51,"value":5223},{"type":46,"tag":470,"props":8424,"children":8425},{"style":531},[8426],{"type":51,"value":570},{"type":46,"tag":470,"props":8428,"children":8429},{"class":472,"line":2921},[8430,8435,8439,8443],{"type":46,"tag":470,"props":8431,"children":8432},{"style":2780},[8433],{"type":51,"value":8434},"  startAmount",{"type":46,"tag":470,"props":8436,"children":8437},{"style":531},[8438],{"type":51,"value":417},{"type":46,"tag":470,"props":8440,"children":8441},{"style":477},[8442],{"type":51,"value":5223},{"type":46,"tag":470,"props":8444,"children":8445},{"style":531},[8446],{"type":51,"value":570},{"type":46,"tag":470,"props":8448,"children":8449},{"class":472,"line":2958},[8450,8455,8459,8463],{"type":46,"tag":470,"props":8451,"children":8452},{"style":2780},[8453],{"type":51,"value":8454},"  endAmount",{"type":46,"tag":470,"props":8456,"children":8457},{"style":531},[8458],{"type":51,"value":417},{"type":46,"tag":470,"props":8460,"children":8461},{"style":477},[8462],{"type":51,"value":5223},{"type":46,"tag":470,"props":8464,"children":8465},{"style":531},[8466],{"type":51,"value":570},{"type":46,"tag":470,"props":8468,"children":8469},{"class":472,"line":2994},[8470,8475,8479,8483],{"type":46,"tag":470,"props":8471,"children":8472},{"style":2780},[8473],{"type":51,"value":8474},"  recipient",{"type":46,"tag":470,"props":8476,"children":8477},{"style":531},[8478],{"type":51,"value":417},{"type":46,"tag":470,"props":8480,"children":8481},{"style":477},[8482],{"type":51,"value":5223},{"type":46,"tag":470,"props":8484,"children":8485},{"style":531},[8486],{"type":51,"value":570},{"type":46,"tag":470,"props":8488,"children":8489},{"class":472,"line":3031},[8490],{"type":46,"tag":470,"props":8491,"children":8492},{"style":531},[8493],{"type":51,"value":3592},{"type":46,"tag":470,"props":8495,"children":8496},{"class":472,"line":3064},[8497],{"type":46,"tag":470,"props":8498,"children":8499},{"emptyLinePlaceholder":577},[8500],{"type":51,"value":580},{"type":46,"tag":470,"props":8502,"children":8503},{"class":472,"line":3073},[8504,8508,8513,8517],{"type":46,"tag":470,"props":8505,"children":8506},{"style":587},[8507],{"type":51,"value":1648},{"type":46,"tag":470,"props":8509,"children":8510},{"style":477},[8511],{"type":51,"value":8512}," UniswapXQuoteResponse",{"type":46,"tag":470,"props":8514,"children":8515},{"style":531},[8516],{"type":51,"value":619},{"type":46,"tag":470,"props":8518,"children":8519},{"style":531},[8520],{"type":51,"value":1165},{"type":46,"tag":470,"props":8522,"children":8523},{"class":472,"line":3082},[8524,8528,8532,8536,8540,8544,8548,8552,8556,8560,8564,8568,8572,8576],{"type":46,"tag":470,"props":8525,"children":8526},{"style":2780},[8527],{"type":51,"value":8044},{"type":46,"tag":470,"props":8529,"children":8530},{"style":531},[8531],{"type":51,"value":417},{"type":46,"tag":470,"props":8533,"children":8534},{"style":531},[8535],{"type":51,"value":555},{"type":46,"tag":470,"props":8537,"children":8538},{"style":483},[8539],{"type":51,"value":230},{"type":46,"tag":470,"props":8541,"children":8542},{"style":531},[8543],{"type":51,"value":565},{"type":46,"tag":470,"props":8545,"children":8546},{"style":531},[8547],{"type":51,"value":8065},{"type":46,"tag":470,"props":8549,"children":8550},{"style":531},[8551],{"type":51,"value":555},{"type":46,"tag":470,"props":8553,"children":8554},{"style":483},[8555],{"type":51,"value":3683},{"type":46,"tag":470,"props":8557,"children":8558},{"style":531},[8559],{"type":51,"value":565},{"type":46,"tag":470,"props":8561,"children":8562},{"style":531},[8563],{"type":51,"value":8065},{"type":46,"tag":470,"props":8565,"children":8566},{"style":531},[8567],{"type":51,"value":555},{"type":46,"tag":470,"props":8569,"children":8570},{"style":483},[8571],{"type":51,"value":248},{"type":46,"tag":470,"props":8573,"children":8574},{"style":531},[8575],{"type":51,"value":565},{"type":46,"tag":470,"props":8577,"children":8578},{"style":531},[8579],{"type":51,"value":570},{"type":46,"tag":470,"props":8581,"children":8582},{"class":472,"line":3106},[8583,8587,8591],{"type":46,"tag":470,"props":8584,"children":8585},{"style":2780},[8586],{"type":51,"value":4994},{"type":46,"tag":470,"props":8588,"children":8589},{"style":531},[8590],{"type":51,"value":417},{"type":46,"tag":470,"props":8592,"children":8593},{"style":531},[8594],{"type":51,"value":1165},{"type":46,"tag":470,"props":8596,"children":8597},{"class":472,"line":3115},[8598,8603,8607],{"type":46,"tag":470,"props":8599,"children":8600},{"style":2780},[8601],{"type":51,"value":8602},"    orderInfo",{"type":46,"tag":470,"props":8604,"children":8605},{"style":531},[8606],{"type":51,"value":417},{"type":46,"tag":470,"props":8608,"children":8609},{"style":531},[8610],{"type":51,"value":1165},{"type":46,"tag":470,"props":8612,"children":8613},{"class":472,"line":3152},[8614,8619,8623,8627,8631],{"type":46,"tag":470,"props":8615,"children":8616},{"style":2780},[8617],{"type":51,"value":8618},"      outputs",{"type":46,"tag":470,"props":8620,"children":8621},{"style":531},[8622],{"type":51,"value":417},{"type":46,"tag":470,"props":8624,"children":8625},{"style":477},[8626],{"type":51,"value":8398},{"type":46,"tag":470,"props":8628,"children":8629},{"style":537},[8630],{"type":51,"value":8252},{"type":46,"tag":470,"props":8632,"children":8633},{"style":531},[8634],{"type":51,"value":570},{"type":46,"tag":470,"props":8636,"children":8637},{"class":472,"line":3185},[8638,8643,8647,8651,8655,8659,8663,8667,8672,8676,8680,8684,8689,8693,8697],{"type":46,"tag":470,"props":8639,"children":8640},{"style":2780},[8641],{"type":51,"value":8642},"      input",{"type":46,"tag":470,"props":8644,"children":8645},{"style":531},[8646],{"type":51,"value":417},{"type":46,"tag":470,"props":8648,"children":8649},{"style":531},[8650],{"type":51,"value":534},{"type":46,"tag":470,"props":8652,"children":8653},{"style":2780},[8654],{"type":51,"value":8133},{"type":46,"tag":470,"props":8656,"children":8657},{"style":531},[8658],{"type":51,"value":417},{"type":46,"tag":470,"props":8660,"children":8661},{"style":477},[8662],{"type":51,"value":5223},{"type":46,"tag":470,"props":8664,"children":8665},{"style":531},[8666],{"type":51,"value":799},{"type":46,"tag":470,"props":8668,"children":8669},{"style":2780},[8670],{"type":51,"value":8671}," startAmount",{"type":46,"tag":470,"props":8673,"children":8674},{"style":531},[8675],{"type":51,"value":417},{"type":46,"tag":470,"props":8677,"children":8678},{"style":477},[8679],{"type":51,"value":5223},{"type":46,"tag":470,"props":8681,"children":8682},{"style":531},[8683],{"type":51,"value":799},{"type":46,"tag":470,"props":8685,"children":8686},{"style":2780},[8687],{"type":51,"value":8688}," endAmount",{"type":46,"tag":470,"props":8690,"children":8691},{"style":531},[8692],{"type":51,"value":417},{"type":46,"tag":470,"props":8694,"children":8695},{"style":477},[8696],{"type":51,"value":5223},{"type":46,"tag":470,"props":8698,"children":8699},{"style":531},[8700],{"type":51,"value":5358},{"type":46,"tag":470,"props":8702,"children":8703},{"class":472,"line":3193},[8704,8709,8713,8717],{"type":46,"tag":470,"props":8705,"children":8706},{"style":2780},[8707],{"type":51,"value":8708},"      deadline",{"type":46,"tag":470,"props":8710,"children":8711},{"style":531},[8712],{"type":51,"value":417},{"type":46,"tag":470,"props":8714,"children":8715},{"style":477},[8716],{"type":51,"value":8227},{"type":46,"tag":470,"props":8718,"children":8719},{"style":531},[8720],{"type":51,"value":570},{"type":46,"tag":470,"props":8722,"children":8723},{"class":472,"line":3287},[8724,8729,8733,8737],{"type":46,"tag":470,"props":8725,"children":8726},{"style":2780},[8727],{"type":51,"value":8728},"      nonce",{"type":46,"tag":470,"props":8730,"children":8731},{"style":531},[8732],{"type":51,"value":417},{"type":46,"tag":470,"props":8734,"children":8735},{"style":477},[8736],{"type":51,"value":5223},{"type":46,"tag":470,"props":8738,"children":8739},{"style":531},[8740],{"type":51,"value":570},{"type":46,"tag":470,"props":8742,"children":8744},{"class":472,"line":8743},30,[8745],{"type":46,"tag":470,"props":8746,"children":8747},{"style":531},[8748],{"type":51,"value":8749},"    };\n",{"type":46,"tag":470,"props":8751,"children":8753},{"class":472,"line":8752},31,[8754,8759,8763,8767],{"type":46,"tag":470,"props":8755,"children":8756},{"style":2780},[8757],{"type":51,"value":8758},"    encodedOrder",{"type":46,"tag":470,"props":8760,"children":8761},{"style":531},[8762],{"type":51,"value":417},{"type":46,"tag":470,"props":8764,"children":8765},{"style":477},[8766],{"type":51,"value":5223},{"type":46,"tag":470,"props":8768,"children":8769},{"style":531},[8770],{"type":51,"value":570},{"type":46,"tag":470,"props":8772,"children":8774},{"class":472,"line":8773},32,[8775,8780,8784,8788],{"type":46,"tag":470,"props":8776,"children":8777},{"style":2780},[8778],{"type":51,"value":8779},"    orderHash",{"type":46,"tag":470,"props":8781,"children":8782},{"style":531},[8783],{"type":51,"value":417},{"type":46,"tag":470,"props":8785,"children":8786},{"style":477},[8787],{"type":51,"value":5223},{"type":46,"tag":470,"props":8789,"children":8790},{"style":531},[8791],{"type":51,"value":570},{"type":46,"tag":470,"props":8793,"children":8795},{"class":472,"line":8794},33,[8796],{"type":46,"tag":470,"props":8797,"children":8798},{"style":531},[8799],{"type":51,"value":8324},{"type":46,"tag":470,"props":8801,"children":8803},{"class":472,"line":8802},34,[8804],{"type":46,"tag":470,"props":8805,"children":8806},{"style":3418},[8807],{"type":51,"value":8808},"  \u002F\u002F EIP-712 typed data — sign locally, do NOT send to \u002Fswap\n",{"type":46,"tag":470,"props":8810,"children":8811},{"class":472,"line":29},[8812,8816,8820,8824,8828,8832,8836,8840,8844,8848,8852],{"type":46,"tag":470,"props":8813,"children":8814},{"style":2780},[8815],{"type":51,"value":8332},{"type":46,"tag":470,"props":8817,"children":8818},{"style":531},[8819],{"type":51,"value":417},{"type":46,"tag":470,"props":8821,"children":8822},{"style":477},[8823],{"type":51,"value":3549},{"type":46,"tag":470,"props":8825,"children":8826},{"style":531},[8827],{"type":51,"value":856},{"type":46,"tag":470,"props":8829,"children":8830},{"style":477},[8831],{"type":51,"value":3558},{"type":46,"tag":470,"props":8833,"children":8834},{"style":531},[8835],{"type":51,"value":604},{"type":46,"tag":470,"props":8837,"children":8838},{"style":477},[8839],{"type":51,"value":3567},{"type":46,"tag":470,"props":8841,"children":8842},{"style":531},[8843],{"type":51,"value":849},{"type":46,"tag":470,"props":8845,"children":8846},{"style":531},[8847],{"type":51,"value":8065},{"type":46,"tag":470,"props":8849,"children":8850},{"style":477},[8851],{"type":51,"value":6673},{"type":46,"tag":470,"props":8853,"children":8854},{"style":531},[8855],{"type":51,"value":570},{"type":46,"tag":470,"props":8857,"children":8859},{"class":472,"line":8858},36,[8860],{"type":46,"tag":470,"props":8861,"children":8862},{"style":531},[8863],{"type":51,"value":3592},{"type":46,"tag":470,"props":8865,"children":8867},{"class":472,"line":8866},37,[8868],{"type":46,"tag":470,"props":8869,"children":8870},{"emptyLinePlaceholder":577},[8871],{"type":51,"value":580},{"type":46,"tag":470,"props":8873,"children":8875},{"class":472,"line":8874},38,[8876,8880,8884,8888,8892,8896,8900],{"type":46,"tag":470,"props":8877,"children":8878},{"style":587},[8879],{"type":51,"value":1648},{"type":46,"tag":470,"props":8881,"children":8882},{"style":477},[8883],{"type":51,"value":5204},{"type":46,"tag":470,"props":8885,"children":8886},{"style":531},[8887],{"type":51,"value":619},{"type":46,"tag":470,"props":8889,"children":8890},{"style":477},[8891],{"type":51,"value":8028},{"type":46,"tag":470,"props":8893,"children":8894},{"style":531},[8895],{"type":51,"value":8065},{"type":46,"tag":470,"props":8897,"children":8898},{"style":477},[8899],{"type":51,"value":8512},{"type":46,"tag":470,"props":8901,"children":8902},{"style":531},[8903],{"type":51,"value":570},{"type":46,"tag":470,"props":8905,"children":8907},{"class":472,"line":8906},39,[8908],{"type":46,"tag":470,"props":8909,"children":8910},{"emptyLinePlaceholder":577},[8911],{"type":51,"value":580},{"type":46,"tag":470,"props":8913,"children":8915},{"class":472,"line":8914},40,[8916],{"type":46,"tag":470,"props":8917,"children":8918},{"style":3418},[8919],{"type":51,"value":8920},"\u002F\u002F Type guard for routing-aware logic\n",{"type":46,"tag":470,"props":8922,"children":8924},{"class":472,"line":8923},41,[8925,8929,8934,8938,8943,8947,8951,8955,8960,8965,8969],{"type":46,"tag":470,"props":8926,"children":8927},{"style":587},[8928],{"type":51,"value":4362},{"type":46,"tag":470,"props":8930,"children":8931},{"style":631},[8932],{"type":51,"value":8933}," isUniswapXQuote",{"type":46,"tag":470,"props":8935,"children":8936},{"style":531},[8937],{"type":51,"value":835},{"type":46,"tag":470,"props":8939,"children":8940},{"style":4374},[8941],{"type":51,"value":8942},"q",{"type":46,"tag":470,"props":8944,"children":8945},{"style":531},[8946],{"type":51,"value":417},{"type":46,"tag":470,"props":8948,"children":8949},{"style":477},[8950],{"type":51,"value":5204},{"type":46,"tag":470,"props":8952,"children":8953},{"style":531},[8954],{"type":51,"value":4391},{"type":46,"tag":470,"props":8956,"children":8957},{"style":4374},[8958],{"type":51,"value":8959}," q",{"type":46,"tag":470,"props":8961,"children":8962},{"style":531},[8963],{"type":51,"value":8964}," is",{"type":46,"tag":470,"props":8966,"children":8967},{"style":477},[8968],{"type":51,"value":8512},{"type":46,"tag":470,"props":8970,"children":8971},{"style":531},[8972],{"type":51,"value":1165},{"type":46,"tag":470,"props":8974,"children":8976},{"class":472,"line":8975},42,[8977,8981,8985,8989,8993,8997,9001,9005,9009,9013,9017,9021,9025,9029,9033,9037,9041,9045,9049,9053,9057,9061,9065,9069,9073],{"type":46,"tag":470,"props":8978,"children":8979},{"style":525},[8980],{"type":51,"value":5772},{"type":46,"tag":470,"props":8982,"children":8983},{"style":537},[8984],{"type":51,"value":8959},{"type":46,"tag":470,"props":8986,"children":8987},{"style":531},[8988],{"type":51,"value":628},{"type":46,"tag":470,"props":8990,"children":8991},{"style":537},[8992],{"type":51,"value":2024},{"type":46,"tag":470,"props":8994,"children":8995},{"style":531},[8996],{"type":51,"value":3874},{"type":46,"tag":470,"props":8998,"children":8999},{"style":531},[9000],{"type":51,"value":555},{"type":46,"tag":470,"props":9002,"children":9003},{"style":483},[9004],{"type":51,"value":230},{"type":46,"tag":470,"props":9006,"children":9007},{"style":531},[9008],{"type":51,"value":565},{"type":46,"tag":470,"props":9010,"children":9011},{"style":531},[9012],{"type":51,"value":4442},{"type":46,"tag":470,"props":9014,"children":9015},{"style":537},[9016],{"type":51,"value":8959},{"type":46,"tag":470,"props":9018,"children":9019},{"style":531},[9020],{"type":51,"value":628},{"type":46,"tag":470,"props":9022,"children":9023},{"style":537},[9024],{"type":51,"value":2024},{"type":46,"tag":470,"props":9026,"children":9027},{"style":531},[9028],{"type":51,"value":3874},{"type":46,"tag":470,"props":9030,"children":9031},{"style":531},[9032],{"type":51,"value":555},{"type":46,"tag":470,"props":9034,"children":9035},{"style":483},[9036],{"type":51,"value":3683},{"type":46,"tag":470,"props":9038,"children":9039},{"style":531},[9040],{"type":51,"value":565},{"type":46,"tag":470,"props":9042,"children":9043},{"style":531},[9044],{"type":51,"value":4442},{"type":46,"tag":470,"props":9046,"children":9047},{"style":537},[9048],{"type":51,"value":8959},{"type":46,"tag":470,"props":9050,"children":9051},{"style":531},[9052],{"type":51,"value":628},{"type":46,"tag":470,"props":9054,"children":9055},{"style":537},[9056],{"type":51,"value":2024},{"type":46,"tag":470,"props":9058,"children":9059},{"style":531},[9060],{"type":51,"value":3874},{"type":46,"tag":470,"props":9062,"children":9063},{"style":531},[9064],{"type":51,"value":555},{"type":46,"tag":470,"props":9066,"children":9067},{"style":483},[9068],{"type":51,"value":248},{"type":46,"tag":470,"props":9070,"children":9071},{"style":531},[9072],{"type":51,"value":565},{"type":46,"tag":470,"props":9074,"children":9075},{"style":531},[9076],{"type":51,"value":570},{"type":46,"tag":470,"props":9078,"children":9080},{"class":472,"line":9079},43,[9081],{"type":46,"tag":470,"props":9082,"children":9083},{"style":531},[9084],{"type":51,"value":1117},{"type":46,"tag":470,"props":9086,"children":9088},{"class":472,"line":9087},44,[9089],{"type":46,"tag":470,"props":9090,"children":9091},{"emptyLinePlaceholder":577},[9092],{"type":51,"value":580},{"type":46,"tag":470,"props":9094,"children":9096},{"class":472,"line":9095},45,[9097],{"type":46,"tag":470,"props":9098,"children":9099},{"style":3418},[9100],{"type":51,"value":9101},"\u002F\u002F Reading the output amount by routing type\n",{"type":46,"tag":470,"props":9103,"children":9105},{"class":472,"line":9104},46,[9106,9110,9115,9119,9123,9127,9131,9135,9139],{"type":46,"tag":470,"props":9107,"children":9108},{"style":587},[9109],{"type":51,"value":4362},{"type":46,"tag":470,"props":9111,"children":9112},{"style":631},[9113],{"type":51,"value":9114}," getOutputAmount",{"type":46,"tag":470,"props":9116,"children":9117},{"style":531},[9118],{"type":51,"value":835},{"type":46,"tag":470,"props":9120,"children":9121},{"style":4374},[9122],{"type":51,"value":8942},{"type":46,"tag":470,"props":9124,"children":9125},{"style":531},[9126],{"type":51,"value":417},{"type":46,"tag":470,"props":9128,"children":9129},{"style":477},[9130],{"type":51,"value":5204},{"type":46,"tag":470,"props":9132,"children":9133},{"style":531},[9134],{"type":51,"value":4391},{"type":46,"tag":470,"props":9136,"children":9137},{"style":477},[9138],{"type":51,"value":5223},{"type":46,"tag":470,"props":9140,"children":9141},{"style":531},[9142],{"type":51,"value":1165},{"type":46,"tag":470,"props":9144,"children":9146},{"class":472,"line":9145},47,[9147,9151,9155,9160,9164,9168,9172],{"type":46,"tag":470,"props":9148,"children":9149},{"style":525},[9150],{"type":51,"value":3766},{"type":46,"tag":470,"props":9152,"children":9153},{"style":2780},[9154],{"type":51,"value":3771},{"type":46,"tag":470,"props":9156,"children":9157},{"style":631},[9158],{"type":51,"value":9159},"isUniswapXQuote",{"type":46,"tag":470,"props":9161,"children":9162},{"style":2780},[9163],{"type":51,"value":835},{"type":46,"tag":470,"props":9165,"children":9166},{"style":537},[9167],{"type":51,"value":8942},{"type":46,"tag":470,"props":9169,"children":9170},{"style":2780},[9171],{"type":51,"value":4662},{"type":46,"tag":470,"props":9173,"children":9174},{"style":531},[9175],{"type":51,"value":967},{"type":46,"tag":470,"props":9177,"children":9179},{"class":472,"line":9178},48,[9180,9185,9190,9194,9198,9202,9206,9210,9214,9218,9222,9227,9231,9235],{"type":46,"tag":470,"props":9181,"children":9182},{"style":587},[9183],{"type":51,"value":9184},"    const",{"type":46,"tag":470,"props":9186,"children":9187},{"style":537},[9188],{"type":51,"value":9189}," firstOutput",{"type":46,"tag":470,"props":9191,"children":9192},{"style":531},[9193],{"type":51,"value":619},{"type":46,"tag":470,"props":9195,"children":9196},{"style":537},[9197],{"type":51,"value":8959},{"type":46,"tag":470,"props":9199,"children":9200},{"style":531},[9201],{"type":51,"value":628},{"type":46,"tag":470,"props":9203,"children":9204},{"style":537},[9205],{"type":51,"value":2060},{"type":46,"tag":470,"props":9207,"children":9208},{"style":531},[9209],{"type":51,"value":628},{"type":46,"tag":470,"props":9211,"children":9212},{"style":537},[9213],{"type":51,"value":2560},{"type":46,"tag":470,"props":9215,"children":9216},{"style":531},[9217],{"type":51,"value":628},{"type":46,"tag":470,"props":9219,"children":9220},{"style":537},[9221],{"type":51,"value":2896},{"type":46,"tag":470,"props":9223,"children":9224},{"style":2780},[9225],{"type":51,"value":9226},"[",{"type":46,"tag":470,"props":9228,"children":9229},{"style":1105},[9230],{"type":51,"value":1303},{"type":46,"tag":470,"props":9232,"children":9233},{"style":2780},[9234],{"type":51,"value":7119},{"type":46,"tag":470,"props":9236,"children":9237},{"style":531},[9238],{"type":51,"value":570},{"type":46,"tag":470,"props":9240,"children":9242},{"class":472,"line":9241},49,[9243,9247,9251,9255,9260,9264,9269,9273,9277,9281,9285,9290,9294,9298],{"type":46,"tag":470,"props":9244,"children":9245},{"style":525},[9246],{"type":51,"value":5551},{"type":46,"tag":470,"props":9248,"children":9249},{"style":2780},[9250],{"type":51,"value":3771},{"type":46,"tag":470,"props":9252,"children":9253},{"style":531},[9254],{"type":51,"value":4416},{"type":46,"tag":470,"props":9256,"children":9257},{"style":537},[9258],{"type":51,"value":9259},"firstOutput",{"type":46,"tag":470,"props":9261,"children":9262},{"style":2780},[9263],{"type":51,"value":3781},{"type":46,"tag":470,"props":9265,"children":9266},{"style":525},[9267],{"type":51,"value":9268},"throw",{"type":46,"tag":470,"props":9270,"children":9271},{"style":531},[9272],{"type":51,"value":4534},{"type":46,"tag":470,"props":9274,"children":9275},{"style":631},[9276],{"type":51,"value":4539},{"type":46,"tag":470,"props":9278,"children":9279},{"style":2780},[9280],{"type":51,"value":835},{"type":46,"tag":470,"props":9282,"children":9283},{"style":531},[9284],{"type":51,"value":565},{"type":46,"tag":470,"props":9286,"children":9287},{"style":483},[9288],{"type":51,"value":9289},"UniswapX quote has no outputs",{"type":46,"tag":470,"props":9291,"children":9292},{"style":531},[9293],{"type":51,"value":565},{"type":46,"tag":470,"props":9295,"children":9296},{"style":2780},[9297],{"type":51,"value":842},{"type":46,"tag":470,"props":9299,"children":9300},{"style":531},[9301],{"type":51,"value":570},{"type":46,"tag":470,"props":9303,"children":9305},{"class":472,"line":9304},50,[9306],{"type":46,"tag":470,"props":9307,"children":9308},{"style":3418},[9309],{"type":51,"value":9310},"    \u002F\u002F startAmount = best-case fill; endAmount = floor after auction decay\n",{"type":46,"tag":470,"props":9312,"children":9314},{"class":472,"line":9313},51,[9315,9319,9323,9327,9331],{"type":46,"tag":470,"props":9316,"children":9317},{"style":525},[9318],{"type":51,"value":7822},{"type":46,"tag":470,"props":9320,"children":9321},{"style":537},[9322],{"type":51,"value":9189},{"type":46,"tag":470,"props":9324,"children":9325},{"style":531},[9326],{"type":51,"value":628},{"type":46,"tag":470,"props":9328,"children":9329},{"style":537},[9330],{"type":51,"value":2818},{"type":46,"tag":470,"props":9332,"children":9333},{"style":531},[9334],{"type":51,"value":570},{"type":46,"tag":470,"props":9336,"children":9338},{"class":472,"line":9337},52,[9339],{"type":46,"tag":470,"props":9340,"children":9341},{"style":531},[9342],{"type":51,"value":1344},{"type":46,"tag":470,"props":9344,"children":9346},{"class":472,"line":9345},53,[9347,9351,9355,9359,9363,9367,9371,9375,9379],{"type":46,"tag":470,"props":9348,"children":9349},{"style":525},[9350],{"type":51,"value":5772},{"type":46,"tag":470,"props":9352,"children":9353},{"style":537},[9354],{"type":51,"value":8959},{"type":46,"tag":470,"props":9356,"children":9357},{"style":531},[9358],{"type":51,"value":628},{"type":46,"tag":470,"props":9360,"children":9361},{"style":537},[9362],{"type":51,"value":2060},{"type":46,"tag":470,"props":9364,"children":9365},{"style":531},[9366],{"type":51,"value":628},{"type":46,"tag":470,"props":9368,"children":9369},{"style":537},[9370],{"type":51,"value":2173},{"type":46,"tag":470,"props":9372,"children":9373},{"style":531},[9374],{"type":51,"value":628},{"type":46,"tag":470,"props":9376,"children":9377},{"style":537},[9378],{"type":51,"value":1056},{"type":46,"tag":470,"props":9380,"children":9381},{"style":531},[9382],{"type":51,"value":570},{"type":46,"tag":470,"props":9384,"children":9386},{"class":472,"line":9385},54,[9387],{"type":46,"tag":470,"props":9388,"children":9389},{"style":531},[9390],{"type":51,"value":1117},{"type":46,"tag":704,"props":9392,"children":9393},{},[],{"type":46,"tag":60,"props":9395,"children":9397},{"id":9396},"universal-router-reference",[9398],{"type":51,"value":662},{"type":46,"tag":54,"props":9400,"children":9401},{},[9402],{"type":51,"value":9403},"The Universal Router is a unified interface for swapping across Uniswap v2, v3, and v4.",{"type":46,"tag":172,"props":9405,"children":9407},{"id":9406},"core-function",[9408],{"type":51,"value":9409},"Core Function",{"type":46,"tag":397,"props":9411,"children":9415},{"className":9412,"code":9413,"language":9414,"meta":402,"style":402},"language-solidity shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","function execute(\n    bytes calldata commands,\n    bytes[] calldata inputs,\n    uint256 deadline\n) external payable;\n","solidity",[9416],{"type":46,"tag":80,"props":9417,"children":9418},{"__ignoreMap":402},[9419,9427,9435,9443,9451],{"type":46,"tag":470,"props":9420,"children":9421},{"class":472,"line":473},[9422],{"type":46,"tag":470,"props":9423,"children":9424},{},[9425],{"type":51,"value":9426},"function execute(\n",{"type":46,"tag":470,"props":9428,"children":9429},{"class":472,"line":573},[9430],{"type":46,"tag":470,"props":9431,"children":9432},{},[9433],{"type":51,"value":9434},"    bytes calldata commands,\n",{"type":46,"tag":470,"props":9436,"children":9437},{"class":472,"line":583},[9438],{"type":46,"tag":470,"props":9439,"children":9440},{},[9441],{"type":51,"value":9442},"    bytes[] calldata inputs,\n",{"type":46,"tag":470,"props":9444,"children":9445},{"class":472,"line":1046},[9446],{"type":46,"tag":470,"props":9447,"children":9448},{},[9449],{"type":51,"value":9450},"    uint256 deadline\n",{"type":46,"tag":470,"props":9452,"children":9453},{"class":472,"line":1084},[9454],{"type":46,"tag":470,"props":9455,"children":9456},{},[9457],{"type":51,"value":9458},") external payable;\n",{"type":46,"tag":172,"props":9460,"children":9462},{"id":9461},"command-encoding",[9463],{"type":51,"value":9464},"Command Encoding",{"type":46,"tag":54,"props":9466,"children":9467},{},[9468],{"type":51,"value":9469},"Each command is a single byte:",{"type":46,"tag":93,"props":9471,"children":9472},{},[9473,9494],{"type":46,"tag":97,"props":9474,"children":9475},{},[9476],{"type":46,"tag":101,"props":9477,"children":9478},{},[9479,9484,9489],{"type":46,"tag":105,"props":9480,"children":9481},{},[9482],{"type":51,"value":9483},"Bits",{"type":46,"tag":105,"props":9485,"children":9486},{},[9487],{"type":51,"value":9488},"Name",{"type":46,"tag":105,"props":9490,"children":9491},{},[9492],{"type":51,"value":9493},"Purpose",{"type":46,"tag":116,"props":9495,"children":9496},{},[9497,9514,9532],{"type":46,"tag":101,"props":9498,"children":9499},{},[9500,9504,9509],{"type":46,"tag":123,"props":9501,"children":9502},{},[9503],{"type":51,"value":1303},{"type":46,"tag":123,"props":9505,"children":9506},{},[9507],{"type":51,"value":9508},"flag",{"type":46,"tag":123,"props":9510,"children":9511},{},[9512],{"type":51,"value":9513},"Allow revert (1 = continue on fail)",{"type":46,"tag":101,"props":9515,"children":9516},{},[9517,9522,9527],{"type":46,"tag":123,"props":9518,"children":9519},{},[9520],{"type":51,"value":9521},"1-2",{"type":46,"tag":123,"props":9523,"children":9524},{},[9525],{"type":51,"value":9526},"reserved",{"type":46,"tag":123,"props":9528,"children":9529},{},[9530],{"type":51,"value":9531},"Use 0",{"type":46,"tag":101,"props":9533,"children":9534},{},[9535,9540,9545],{"type":46,"tag":123,"props":9536,"children":9537},{},[9538],{"type":51,"value":9539},"3-7",{"type":46,"tag":123,"props":9541,"children":9542},{},[9543],{"type":51,"value":9544},"command",{"type":46,"tag":123,"props":9546,"children":9547},{},[9548],{"type":51,"value":9549},"Operation identifier",{"type":46,"tag":172,"props":9551,"children":9553},{"id":9552},"swap-commands",[9554],{"type":51,"value":9555},"Swap Commands",{"type":46,"tag":93,"props":9557,"children":9558},{},[9559,9579],{"type":46,"tag":97,"props":9560,"children":9561},{},[9562],{"type":46,"tag":101,"props":9563,"children":9564},{},[9565,9570,9575],{"type":46,"tag":105,"props":9566,"children":9567},{},[9568],{"type":51,"value":9569},"Code",{"type":46,"tag":105,"props":9571,"children":9572},{},[9573],{"type":51,"value":9574},"Command",{"type":46,"tag":105,"props":9576,"children":9577},{},[9578],{"type":51,"value":196},{"type":46,"tag":116,"props":9580,"children":9581},{},[9582,9600,9618,9636,9654],{"type":46,"tag":101,"props":9583,"children":9584},{},[9585,9590,9595],{"type":46,"tag":123,"props":9586,"children":9587},{},[9588],{"type":51,"value":9589},"0x00",{"type":46,"tag":123,"props":9591,"children":9592},{},[9593],{"type":51,"value":9594},"V3_SWAP_EXACT_IN",{"type":46,"tag":123,"props":9596,"children":9597},{},[9598],{"type":51,"value":9599},"v3 swap with exact input",{"type":46,"tag":101,"props":9601,"children":9602},{},[9603,9608,9613],{"type":46,"tag":123,"props":9604,"children":9605},{},[9606],{"type":51,"value":9607},"0x01",{"type":46,"tag":123,"props":9609,"children":9610},{},[9611],{"type":51,"value":9612},"V3_SWAP_EXACT_OUT",{"type":46,"tag":123,"props":9614,"children":9615},{},[9616],{"type":51,"value":9617},"v3 swap with exact output",{"type":46,"tag":101,"props":9619,"children":9620},{},[9621,9626,9631],{"type":46,"tag":123,"props":9622,"children":9623},{},[9624],{"type":51,"value":9625},"0x08",{"type":46,"tag":123,"props":9627,"children":9628},{},[9629],{"type":51,"value":9630},"V2_SWAP_EXACT_IN",{"type":46,"tag":123,"props":9632,"children":9633},{},[9634],{"type":51,"value":9635},"v2 swap with exact input",{"type":46,"tag":101,"props":9637,"children":9638},{},[9639,9644,9649],{"type":46,"tag":123,"props":9640,"children":9641},{},[9642],{"type":51,"value":9643},"0x09",{"type":46,"tag":123,"props":9645,"children":9646},{},[9647],{"type":51,"value":9648},"V2_SWAP_EXACT_OUT",{"type":46,"tag":123,"props":9650,"children":9651},{},[9652],{"type":51,"value":9653},"v2 swap with exact output",{"type":46,"tag":101,"props":9655,"children":9656},{},[9657,9662,9667],{"type":46,"tag":123,"props":9658,"children":9659},{},[9660],{"type":51,"value":9661},"0x10",{"type":46,"tag":123,"props":9663,"children":9664},{},[9665],{"type":51,"value":9666},"V4_SWAP",{"type":46,"tag":123,"props":9668,"children":9669},{},[9670],{"type":51,"value":9671},"v4 swap",{"type":46,"tag":172,"props":9673,"children":9675},{"id":9674},"token-operations",[9676],{"type":51,"value":9677},"Token Operations",{"type":46,"tag":93,"props":9679,"children":9680},{},[9681,9699],{"type":46,"tag":97,"props":9682,"children":9683},{},[9684],{"type":46,"tag":101,"props":9685,"children":9686},{},[9687,9691,9695],{"type":46,"tag":105,"props":9688,"children":9689},{},[9690],{"type":51,"value":9569},{"type":46,"tag":105,"props":9692,"children":9693},{},[9694],{"type":51,"value":9574},{"type":46,"tag":105,"props":9696,"children":9697},{},[9698],{"type":51,"value":196},{"type":46,"tag":116,"props":9700,"children":9701},{},[9702,9720,9738,9756],{"type":46,"tag":101,"props":9703,"children":9704},{},[9705,9710,9715],{"type":46,"tag":123,"props":9706,"children":9707},{},[9708],{"type":51,"value":9709},"0x04",{"type":46,"tag":123,"props":9711,"children":9712},{},[9713],{"type":51,"value":9714},"SWEEP",{"type":46,"tag":123,"props":9716,"children":9717},{},[9718],{"type":51,"value":9719},"Clear router token balance",{"type":46,"tag":101,"props":9721,"children":9722},{},[9723,9728,9733],{"type":46,"tag":123,"props":9724,"children":9725},{},[9726],{"type":51,"value":9727},"0x05",{"type":46,"tag":123,"props":9729,"children":9730},{},[9731],{"type":51,"value":9732},"TRANSFER",{"type":46,"tag":123,"props":9734,"children":9735},{},[9736],{"type":51,"value":9737},"Send specific amount",{"type":46,"tag":101,"props":9739,"children":9740},{},[9741,9746,9751],{"type":46,"tag":123,"props":9742,"children":9743},{},[9744],{"type":51,"value":9745},"0x0b",{"type":46,"tag":123,"props":9747,"children":9748},{},[9749],{"type":51,"value":9750},"WRAP_ETH",{"type":46,"tag":123,"props":9752,"children":9753},{},[9754],{"type":51,"value":9755},"ETH to WETH",{"type":46,"tag":101,"props":9757,"children":9758},{},[9759,9764,9769],{"type":46,"tag":123,"props":9760,"children":9761},{},[9762],{"type":51,"value":9763},"0x0c",{"type":46,"tag":123,"props":9765,"children":9766},{},[9767],{"type":51,"value":9768},"UNWRAP_WETH",{"type":46,"tag":123,"props":9770,"children":9771},{},[9772],{"type":51,"value":9773},"WETH to ETH",{"type":46,"tag":172,"props":9775,"children":9777},{"id":9776},"permit2-commands",[9778],{"type":51,"value":9779},"Permit2 Commands",{"type":46,"tag":93,"props":9781,"children":9782},{},[9783,9801],{"type":46,"tag":97,"props":9784,"children":9785},{},[9786],{"type":46,"tag":101,"props":9787,"children":9788},{},[9789,9793,9797],{"type":46,"tag":105,"props":9790,"children":9791},{},[9792],{"type":51,"value":9569},{"type":46,"tag":105,"props":9794,"children":9795},{},[9796],{"type":51,"value":9574},{"type":46,"tag":105,"props":9798,"children":9799},{},[9800],{"type":51,"value":196},{"type":46,"tag":116,"props":9802,"children":9803},{},[9804,9822,9840],{"type":46,"tag":101,"props":9805,"children":9806},{},[9807,9812,9817],{"type":46,"tag":123,"props":9808,"children":9809},{},[9810],{"type":51,"value":9811},"0x02",{"type":46,"tag":123,"props":9813,"children":9814},{},[9815],{"type":51,"value":9816},"PERMIT2_TRANSFER_FROM",{"type":46,"tag":123,"props":9818,"children":9819},{},[9820],{"type":51,"value":9821},"Single token transfer",{"type":46,"tag":101,"props":9823,"children":9824},{},[9825,9830,9835],{"type":46,"tag":123,"props":9826,"children":9827},{},[9828],{"type":51,"value":9829},"0x03",{"type":46,"tag":123,"props":9831,"children":9832},{},[9833],{"type":51,"value":9834},"PERMIT2_PERMIT_BATCH",{"type":46,"tag":123,"props":9836,"children":9837},{},[9838],{"type":51,"value":9839},"Batch approval",{"type":46,"tag":101,"props":9841,"children":9842},{},[9843,9848,9853],{"type":46,"tag":123,"props":9844,"children":9845},{},[9846],{"type":51,"value":9847},"0x0a",{"type":46,"tag":123,"props":9849,"children":9850},{},[9851],{"type":51,"value":9852},"PERMIT2_PERMIT",{"type":46,"tag":123,"props":9854,"children":9855},{},[9856],{"type":51,"value":9857},"Single approval",{"type":46,"tag":172,"props":9859,"children":9861},{"id":9860},"sdk-usage",[9862],{"type":51,"value":9863},"SDK Usage",{"type":46,"tag":397,"props":9865,"children":9867},{"className":513,"code":9866,"language":515,"meta":402,"style":402},"import { SwapRouter, UniswapTrade } from '@uniswap\u002Funiversal-router-sdk'\nimport { TradeType } from '@uniswap\u002Fsdk-core'\n\n\u002F\u002F Build trade using v3-sdk or router-sdk\nconst trade = new RouterTrade({\n  v3Routes: [...],\n  tradeType: TradeType.EXACT_INPUT\n})\n\n\u002F\u002F Get calldata for Universal Router\nconst { calldata, value } = SwapRouter.swapCallParameters(trade, {\n  slippageTolerance: new Percent(50, 10000), \u002F\u002F 0.5%\n  recipient: walletAddress,\n  deadline: Math.floor(Date.now() \u002F 1000) + 1200 \u002F\u002F 20 min\n})\n\n\u002F\u002F Send transaction\nconst tx = await wallet.sendTransaction({\n  to: UNIVERSAL_ROUTER_ADDRESS,\n  data: calldata,\n  value\n})\n",[9868],{"type":46,"tag":80,"props":9869,"children":9870},{"__ignoreMap":402},[9871,9916,9953,9960,9968,10001,10029,10054,10066,10073,10081,10136,10188,10208,10281,10292,10299,10307,10348,10369,10389,10397],{"type":46,"tag":470,"props":9872,"children":9873},{"class":472,"line":473},[9874,9878,9882,9886,9890,9895,9899,9903,9907,9911],{"type":46,"tag":470,"props":9875,"children":9876},{"style":525},[9877],{"type":51,"value":528},{"type":46,"tag":470,"props":9879,"children":9880},{"style":531},[9881],{"type":51,"value":534},{"type":46,"tag":470,"props":9883,"children":9884},{"style":537},[9885],{"type":51,"value":540},{"type":46,"tag":470,"props":9887,"children":9888},{"style":531},[9889],{"type":51,"value":604},{"type":46,"tag":470,"props":9891,"children":9892},{"style":537},[9893],{"type":51,"value":9894}," UniswapTrade",{"type":46,"tag":470,"props":9896,"children":9897},{"style":531},[9898],{"type":51,"value":545},{"type":46,"tag":470,"props":9900,"children":9901},{"style":525},[9902],{"type":51,"value":550},{"type":46,"tag":470,"props":9904,"children":9905},{"style":531},[9906],{"type":51,"value":555},{"type":46,"tag":470,"props":9908,"children":9909},{"style":483},[9910],{"type":51,"value":560},{"type":46,"tag":470,"props":9912,"children":9913},{"style":531},[9914],{"type":51,"value":9915},"'\n",{"type":46,"tag":470,"props":9917,"children":9918},{"class":472,"line":573},[9919,9923,9927,9932,9936,9940,9944,9949],{"type":46,"tag":470,"props":9920,"children":9921},{"style":525},[9922],{"type":51,"value":528},{"type":46,"tag":470,"props":9924,"children":9925},{"style":531},[9926],{"type":51,"value":534},{"type":46,"tag":470,"props":9928,"children":9929},{"style":537},[9930],{"type":51,"value":9931}," TradeType",{"type":46,"tag":470,"props":9933,"children":9934},{"style":531},[9935],{"type":51,"value":545},{"type":46,"tag":470,"props":9937,"children":9938},{"style":525},[9939],{"type":51,"value":550},{"type":46,"tag":470,"props":9941,"children":9942},{"style":531},[9943],{"type":51,"value":555},{"type":46,"tag":470,"props":9945,"children":9946},{"style":483},[9947],{"type":51,"value":9948},"@uniswap\u002Fsdk-core",{"type":46,"tag":470,"props":9950,"children":9951},{"style":531},[9952],{"type":51,"value":9915},{"type":46,"tag":470,"props":9954,"children":9955},{"class":472,"line":583},[9956],{"type":46,"tag":470,"props":9957,"children":9958},{"emptyLinePlaceholder":577},[9959],{"type":51,"value":580},{"type":46,"tag":470,"props":9961,"children":9962},{"class":472,"line":1046},[9963],{"type":46,"tag":470,"props":9964,"children":9965},{"style":3418},[9966],{"type":51,"value":9967},"\u002F\u002F Build trade using v3-sdk or router-sdk\n",{"type":46,"tag":470,"props":9969,"children":9970},{"class":472,"line":1084},[9971,9975,9980,9984,9988,9993,9997],{"type":46,"tag":470,"props":9972,"children":9973},{"style":587},[9974],{"type":51,"value":590},{"type":46,"tag":470,"props":9976,"children":9977},{"style":537},[9978],{"type":51,"value":9979}," trade ",{"type":46,"tag":470,"props":9981,"children":9982},{"style":531},[9983],{"type":51,"value":3438},{"type":46,"tag":470,"props":9985,"children":9986},{"style":531},[9987],{"type":51,"value":4534},{"type":46,"tag":470,"props":9989,"children":9990},{"style":631},[9991],{"type":51,"value":9992}," RouterTrade",{"type":46,"tag":470,"props":9994,"children":9995},{"style":537},[9996],{"type":51,"value":835},{"type":46,"tag":470,"props":9998,"children":9999},{"style":531},[10000],{"type":51,"value":967},{"type":46,"tag":470,"props":10002,"children":10003},{"class":472,"line":1111},[10004,10009,10013,10017,10021,10025],{"type":46,"tag":470,"props":10005,"children":10006},{"style":2780},[10007],{"type":51,"value":10008},"  v3Routes",{"type":46,"tag":470,"props":10010,"children":10011},{"style":531},[10012],{"type":51,"value":417},{"type":46,"tag":470,"props":10014,"children":10015},{"style":537},[10016],{"type":51,"value":7102},{"type":46,"tag":470,"props":10018,"children":10019},{"style":531},[10020],{"type":51,"value":2673},{"type":46,"tag":470,"props":10022,"children":10023},{"style":537},[10024],{"type":51,"value":7119},{"type":46,"tag":470,"props":10026,"children":10027},{"style":531},[10028],{"type":51,"value":1007},{"type":46,"tag":470,"props":10030,"children":10031},{"class":472,"line":1314},[10032,10037,10041,10045,10049],{"type":46,"tag":470,"props":10033,"children":10034},{"style":2780},[10035],{"type":51,"value":10036},"  tradeType",{"type":46,"tag":470,"props":10038,"children":10039},{"style":531},[10040],{"type":51,"value":417},{"type":46,"tag":470,"props":10042,"children":10043},{"style":537},[10044],{"type":51,"value":9931},{"type":46,"tag":470,"props":10046,"children":10047},{"style":531},[10048],{"type":51,"value":628},{"type":46,"tag":470,"props":10050,"children":10051},{"style":537},[10052],{"type":51,"value":10053},"EXACT_INPUT\n",{"type":46,"tag":470,"props":10055,"children":10056},{"class":472,"line":1338},[10057,10061],{"type":46,"tag":470,"props":10058,"children":10059},{"style":531},[10060],{"type":51,"value":614},{"type":46,"tag":470,"props":10062,"children":10063},{"style":537},[10064],{"type":51,"value":10065},")\n",{"type":46,"tag":470,"props":10067,"children":10068},{"class":472,"line":1347},[10069],{"type":46,"tag":470,"props":10070,"children":10071},{"emptyLinePlaceholder":577},[10072],{"type":51,"value":580},{"type":46,"tag":470,"props":10074,"children":10075},{"class":472,"line":1705},[10076],{"type":46,"tag":470,"props":10077,"children":10078},{"style":3418},[10079],{"type":51,"value":10080},"\u002F\u002F Get calldata for Universal Router\n",{"type":46,"tag":470,"props":10082,"children":10083},{"class":472,"line":1740},[10084,10088,10092,10096,10100,10104,10108,10112,10116,10120,10124,10128,10132],{"type":46,"tag":470,"props":10085,"children":10086},{"style":587},[10087],{"type":51,"value":590},{"type":46,"tag":470,"props":10089,"children":10090},{"style":531},[10091],{"type":51,"value":534},{"type":46,"tag":470,"props":10093,"children":10094},{"style":537},[10095],{"type":51,"value":599},{"type":46,"tag":470,"props":10097,"children":10098},{"style":531},[10099],{"type":51,"value":604},{"type":46,"tag":470,"props":10101,"children":10102},{"style":537},[10103],{"type":51,"value":609},{"type":46,"tag":470,"props":10105,"children":10106},{"style":531},[10107],{"type":51,"value":614},{"type":46,"tag":470,"props":10109,"children":10110},{"style":531},[10111],{"type":51,"value":619},{"type":46,"tag":470,"props":10113,"children":10114},{"style":537},[10115],{"type":51,"value":540},{"type":46,"tag":470,"props":10117,"children":10118},{"style":531},[10119],{"type":51,"value":628},{"type":46,"tag":470,"props":10121,"children":10122},{"style":631},[10123],{"type":51,"value":634},{"type":46,"tag":470,"props":10125,"children":10126},{"style":537},[10127],{"type":51,"value":639},{"type":46,"tag":470,"props":10129,"children":10130},{"style":531},[10131],{"type":51,"value":604},{"type":46,"tag":470,"props":10133,"children":10134},{"style":531},[10135],{"type":51,"value":1165},{"type":46,"tag":470,"props":10137,"children":10138},{"class":472,"line":2421},[10139,10144,10148,10152,10157,10161,10166,10170,10175,10179,10183],{"type":46,"tag":470,"props":10140,"children":10141},{"style":2780},[10142],{"type":51,"value":10143},"  slippageTolerance",{"type":46,"tag":470,"props":10145,"children":10146},{"style":531},[10147],{"type":51,"value":417},{"type":46,"tag":470,"props":10149,"children":10150},{"style":531},[10151],{"type":51,"value":4534},{"type":46,"tag":470,"props":10153,"children":10154},{"style":631},[10155],{"type":51,"value":10156}," Percent",{"type":46,"tag":470,"props":10158,"children":10159},{"style":537},[10160],{"type":51,"value":835},{"type":46,"tag":470,"props":10162,"children":10163},{"style":1105},[10164],{"type":51,"value":10165},"50",{"type":46,"tag":470,"props":10167,"children":10168},{"style":531},[10169],{"type":51,"value":604},{"type":46,"tag":470,"props":10171,"children":10172},{"style":1105},[10173],{"type":51,"value":10174}," 10000",{"type":46,"tag":470,"props":10176,"children":10177},{"style":537},[10178],{"type":51,"value":842},{"type":46,"tag":470,"props":10180,"children":10181},{"style":531},[10182],{"type":51,"value":604},{"type":46,"tag":470,"props":10184,"children":10185},{"style":3418},[10186],{"type":51,"value":10187}," \u002F\u002F 0.5%\n",{"type":46,"tag":470,"props":10189,"children":10190},{"class":472,"line":2447},[10191,10195,10199,10204],{"type":46,"tag":470,"props":10192,"children":10193},{"style":2780},[10194],{"type":51,"value":8474},{"type":46,"tag":470,"props":10196,"children":10197},{"style":531},[10198],{"type":51,"value":417},{"type":46,"tag":470,"props":10200,"children":10201},{"style":537},[10202],{"type":51,"value":10203}," walletAddress",{"type":46,"tag":470,"props":10205,"children":10206},{"style":531},[10207],{"type":51,"value":1007},{"type":46,"tag":470,"props":10209,"children":10210},{"class":472,"line":2877},[10211,10216,10220,10225,10229,10234,10239,10243,10248,10253,10257,10262,10266,10271,10276],{"type":46,"tag":470,"props":10212,"children":10213},{"style":2780},[10214],{"type":51,"value":10215},"  deadline",{"type":46,"tag":470,"props":10217,"children":10218},{"style":531},[10219],{"type":51,"value":417},{"type":46,"tag":470,"props":10221,"children":10222},{"style":537},[10223],{"type":51,"value":10224}," Math",{"type":46,"tag":470,"props":10226,"children":10227},{"style":531},[10228],{"type":51,"value":628},{"type":46,"tag":470,"props":10230,"children":10231},{"style":631},[10232],{"type":51,"value":10233},"floor",{"type":46,"tag":470,"props":10235,"children":10236},{"style":537},[10237],{"type":51,"value":10238},"(Date",{"type":46,"tag":470,"props":10240,"children":10241},{"style":531},[10242],{"type":51,"value":628},{"type":46,"tag":470,"props":10244,"children":10245},{"style":631},[10246],{"type":51,"value":10247},"now",{"type":46,"tag":470,"props":10249,"children":10250},{"style":537},[10251],{"type":51,"value":10252},"() ",{"type":46,"tag":470,"props":10254,"children":10255},{"style":531},[10256],{"type":51,"value":7480},{"type":46,"tag":470,"props":10258,"children":10259},{"style":1105},[10260],{"type":51,"value":10261}," 1000",{"type":46,"tag":470,"props":10263,"children":10264},{"style":537},[10265],{"type":51,"value":3781},{"type":46,"tag":470,"props":10267,"children":10268},{"style":531},[10269],{"type":51,"value":10270},"+",{"type":46,"tag":470,"props":10272,"children":10273},{"style":1105},[10274],{"type":51,"value":10275}," 1200",{"type":46,"tag":470,"props":10277,"children":10278},{"style":3418},[10279],{"type":51,"value":10280}," \u002F\u002F 20 min\n",{"type":46,"tag":470,"props":10282,"children":10283},{"class":472,"line":2886},[10284,10288],{"type":46,"tag":470,"props":10285,"children":10286},{"style":531},[10287],{"type":51,"value":614},{"type":46,"tag":470,"props":10289,"children":10290},{"style":537},[10291],{"type":51,"value":10065},{"type":46,"tag":470,"props":10293,"children":10294},{"class":472,"line":2912},[10295],{"type":46,"tag":470,"props":10296,"children":10297},{"emptyLinePlaceholder":577},[10298],{"type":51,"value":580},{"type":46,"tag":470,"props":10300,"children":10301},{"class":472,"line":2921},[10302],{"type":46,"tag":470,"props":10303,"children":10304},{"style":3418},[10305],{"type":51,"value":10306},"\u002F\u002F Send transaction\n",{"type":46,"tag":470,"props":10308,"children":10309},{"class":472,"line":2958},[10310,10314,10319,10323,10327,10332,10336,10340,10344],{"type":46,"tag":470,"props":10311,"children":10312},{"style":587},[10313],{"type":51,"value":590},{"type":46,"tag":470,"props":10315,"children":10316},{"style":537},[10317],{"type":51,"value":10318}," tx ",{"type":46,"tag":470,"props":10320,"children":10321},{"style":531},[10322],{"type":51,"value":3438},{"type":46,"tag":470,"props":10324,"children":10325},{"style":525},[10326],{"type":51,"value":3443},{"type":46,"tag":470,"props":10328,"children":10329},{"style":537},[10330],{"type":51,"value":10331}," wallet",{"type":46,"tag":470,"props":10333,"children":10334},{"style":531},[10335],{"type":51,"value":628},{"type":46,"tag":470,"props":10337,"children":10338},{"style":631},[10339],{"type":51,"value":898},{"type":46,"tag":470,"props":10341,"children":10342},{"style":537},[10343],{"type":51,"value":835},{"type":46,"tag":470,"props":10345,"children":10346},{"style":531},[10347],{"type":51,"value":967},{"type":46,"tag":470,"props":10349,"children":10350},{"class":472,"line":2994},[10351,10356,10360,10365],{"type":46,"tag":470,"props":10352,"children":10353},{"style":2780},[10354],{"type":51,"value":10355},"  to",{"type":46,"tag":470,"props":10357,"children":10358},{"style":531},[10359],{"type":51,"value":417},{"type":46,"tag":470,"props":10361,"children":10362},{"style":537},[10363],{"type":51,"value":10364}," UNIVERSAL_ROUTER_ADDRESS",{"type":46,"tag":470,"props":10366,"children":10367},{"style":531},[10368],{"type":51,"value":1007},{"type":46,"tag":470,"props":10370,"children":10371},{"class":472,"line":3031},[10372,10377,10381,10385],{"type":46,"tag":470,"props":10373,"children":10374},{"style":2780},[10375],{"type":51,"value":10376},"  data",{"type":46,"tag":470,"props":10378,"children":10379},{"style":531},[10380],{"type":51,"value":417},{"type":46,"tag":470,"props":10382,"children":10383},{"style":537},[10384],{"type":51,"value":599},{"type":46,"tag":470,"props":10386,"children":10387},{"style":531},[10388],{"type":51,"value":1007},{"type":46,"tag":470,"props":10390,"children":10391},{"class":472,"line":3064},[10392],{"type":46,"tag":470,"props":10393,"children":10394},{"style":537},[10395],{"type":51,"value":10396},"  value\n",{"type":46,"tag":470,"props":10398,"children":10399},{"class":472,"line":3073},[10400,10404],{"type":46,"tag":470,"props":10401,"children":10402},{"style":531},[10403],{"type":51,"value":614},{"type":46,"tag":470,"props":10405,"children":10406},{"style":537},[10407],{"type":51,"value":10065},{"type":46,"tag":704,"props":10409,"children":10410},{},[],{"type":46,"tag":60,"props":10412,"children":10414},{"id":10413},"permit2-integration",[10415],{"type":51,"value":10416},"Permit2 Integration",{"type":46,"tag":54,"props":10418,"children":10419},{},[10420],{"type":51,"value":10421},"Permit2 enables signature-based token approvals instead of on-chain approve() calls.",{"type":46,"tag":172,"props":10423,"children":10425},{"id":10424},"approval-target-permit2-vs-legacy-direct-to-router",[10426],{"type":51,"value":10427},"Approval Target: Permit2 vs Legacy (Direct to Router)",{"type":46,"tag":54,"props":10429,"children":10430},{},[10431],{"type":51,"value":10432},"There are two approval paths. Choose based on your integration type:",{"type":46,"tag":93,"props":10434,"children":10435},{},[10436,10462],{"type":46,"tag":97,"props":10437,"children":10438},{},[10439],{"type":46,"tag":101,"props":10440,"children":10441},{},[10442,10447,10452,10457],{"type":46,"tag":105,"props":10443,"children":10444},{},[10445],{"type":51,"value":10446},"Approach",{"type":46,"tag":105,"props":10448,"children":10449},{},[10450],{"type":51,"value":10451},"Approve To",{"type":46,"tag":105,"props":10453,"children":10454},{},[10455],{"type":51,"value":10456},"Per-Swap Auth",{"type":46,"tag":105,"props":10458,"children":10459},{},[10460],{"type":51,"value":10461},"Best For",{"type":46,"tag":116,"props":10463,"children":10464},{},[10465,10493],{"type":46,"tag":101,"props":10466,"children":10467},{},[10468,10478,10483,10488],{"type":46,"tag":123,"props":10469,"children":10470},{},[10471,10476],{"type":46,"tag":72,"props":10472,"children":10473},{},[10474],{"type":51,"value":10475},"Permit2",{"type":51,"value":10477}," (recommended)",{"type":46,"tag":123,"props":10479,"children":10480},{},[10481],{"type":51,"value":10482},"Permit2 contract",{"type":46,"tag":123,"props":10484,"children":10485},{},[10486],{"type":51,"value":10487},"EIP-712 signature",{"type":46,"tag":123,"props":10489,"children":10490},{},[10491],{"type":51,"value":10492},"Frontends with user interaction",{"type":46,"tag":101,"props":10494,"children":10495},{},[10496,10506,10511,10516],{"type":46,"tag":123,"props":10497,"children":10498},{},[10499,10504],{"type":46,"tag":72,"props":10500,"children":10501},{},[10502],{"type":51,"value":10503},"Legacy",{"type":51,"value":10505}," (direct approve)",{"type":46,"tag":123,"props":10507,"children":10508},{},[10509],{"type":51,"value":10510},"Universal Router",{"type":46,"tag":123,"props":10512,"children":10513},{},[10514],{"type":51,"value":10515},"None (pre-approved)",{"type":46,"tag":123,"props":10517,"children":10518},{},[10519],{"type":51,"value":10520},"Backend services, smart accounts",{"type":46,"tag":54,"props":10522,"children":10523},{},[10524,10529],{"type":46,"tag":72,"props":10525,"children":10526},{},[10527],{"type":51,"value":10528},"Permit2 flow",{"type":51,"value":10530}," (frontend with user signing):",{"type":46,"tag":10532,"props":10533,"children":10534},"ol",{},[10535,10540,10545],{"type":46,"tag":723,"props":10536,"children":10537},{},[10538],{"type":51,"value":10539},"User approves token to Permit2 contract (one-time)",{"type":46,"tag":723,"props":10541,"children":10542},{},[10543],{"type":51,"value":10544},"Each swap: user signs an EIP-712 permit message",{"type":46,"tag":723,"props":10546,"children":10547},{},[10548],{"type":51,"value":10549},"Universal Router uses the signature to transfer tokens via Permit2",{"type":46,"tag":54,"props":10551,"children":10552},{},[10553,10558],{"type":46,"tag":72,"props":10554,"children":10555},{},[10556],{"type":51,"value":10557},"Legacy flow",{"type":51,"value":10559}," (backend services, ERC-4337 smart accounts):",{"type":46,"tag":10532,"props":10561,"children":10562},{},[10563,10568,10573],{"type":46,"tag":723,"props":10564,"children":10565},{},[10566],{"type":51,"value":10567},"Approve token directly to the Universal Router address (one-time)",{"type":46,"tag":723,"props":10569,"children":10570},{},[10571],{"type":51,"value":10572},"Each swap: no additional authorization needed",{"type":46,"tag":723,"props":10574,"children":10575},{},[10576],{"type":51,"value":10577},"Simpler for automated systems that cannot sign EIP-712 messages",{"type":46,"tag":54,"props":10579,"children":10580},{},[10581,10583,10589],{"type":51,"value":10582},"Use the Trading API's ",{"type":46,"tag":80,"props":10584,"children":10586},{"className":10585},[],[10587],{"type":51,"value":10588},"\u002Fcheck_approval",{"type":51,"value":10590}," endpoint — it returns the correct approval target based on the routing type.",{"type":46,"tag":172,"props":10592,"children":10594},{"id":10593},"how-it-works",[10595],{"type":51,"value":10596},"How It Works",{"type":46,"tag":10532,"props":10598,"children":10599},{},[10600,10605,10610],{"type":46,"tag":723,"props":10601,"children":10602},{},[10603],{"type":51,"value":10604},"User approves Permit2 contract once (infinite approval)",{"type":46,"tag":723,"props":10606,"children":10607},{},[10608],{"type":51,"value":10609},"For each swap, user signs a message authorizing the transfer",{"type":46,"tag":723,"props":10611,"children":10612},{},[10613],{"type":51,"value":10614},"Universal Router uses signature to transfer tokens via Permit2",{"type":46,"tag":172,"props":10616,"children":10618},{"id":10617},"two-modes",[10619],{"type":51,"value":10620},"Two Modes",{"type":46,"tag":93,"props":10622,"children":10623},{},[10624,10639],{"type":46,"tag":97,"props":10625,"children":10626},{},[10627],{"type":46,"tag":101,"props":10628,"children":10629},{},[10630,10635],{"type":46,"tag":105,"props":10631,"children":10632},{},[10633],{"type":51,"value":10634},"Mode",{"type":46,"tag":105,"props":10636,"children":10637},{},[10638],{"type":51,"value":196},{"type":46,"tag":116,"props":10640,"children":10641},{},[10642,10655],{"type":46,"tag":101,"props":10643,"children":10644},{},[10645,10650],{"type":46,"tag":123,"props":10646,"children":10647},{},[10648],{"type":51,"value":10649},"SignatureTransfer",{"type":46,"tag":123,"props":10651,"children":10652},{},[10653],{"type":51,"value":10654},"One-time signature, no on-chain state",{"type":46,"tag":101,"props":10656,"children":10657},{},[10658,10663],{"type":46,"tag":123,"props":10659,"children":10660},{},[10661],{"type":51,"value":10662},"AllowanceTransfer",{"type":46,"tag":123,"props":10664,"children":10665},{},[10666],{"type":51,"value":10667},"Time-limited allowance with on-chain state",{"type":46,"tag":172,"props":10669,"children":10671},{"id":10670},"integration-pattern",[10672],{"type":51,"value":10673},"Integration Pattern",{"type":46,"tag":397,"props":10675,"children":10677},{"className":513,"code":10676,"language":515,"meta":402,"style":402},"import { getContract, maxUint256, type Address } from 'viem';\n\nconst PERMIT2_ADDRESS = '0x000000000022D473030F116dDEE9F6B43aC78BA3' as const;\n\n\u002F\u002F Check if Permit2 approval exists\nconst allowance = await publicClient.readContract({\n  address: PERMIT2_ADDRESS,\n  abi: permit2Abi,\n  functionName: 'allowance',\n  args: [userAddress, tokenAddress, spenderAddress],\n});\n\n\u002F\u002F If not approved, user must approve Permit2 first\nif (allowance.amount \u003C requiredAmount) {\n  const hash = await walletClient.writeContract({\n    address: tokenAddress,\n    abi: erc20Abi,\n    functionName: 'approve',\n    args: [PERMIT2_ADDRESS, maxUint256],\n  });\n  await publicClient.waitForTransactionReceipt({ hash });\n}\n\n\u002F\u002F Then sign permit for the swap\nconst permitSignature = await signPermit(...);\n",[10678],{"type":46,"tag":80,"props":10679,"children":10680},{"__ignoreMap":402},[10681,10744,10751,10794,10801,10809,10851,10872,10893,10922,10961,10976,10983,10991,11025,11066,11086,11107,11136,11173,11188,11234,11241,11248,11256],{"type":46,"tag":470,"props":10682,"children":10683},{"class":472,"line":473},[10684,10688,10692,10697,10701,10706,10710,10715,10720,10724,10728,10732,10736,10740],{"type":46,"tag":470,"props":10685,"children":10686},{"style":525},[10687],{"type":51,"value":528},{"type":46,"tag":470,"props":10689,"children":10690},{"style":531},[10691],{"type":51,"value":534},{"type":46,"tag":470,"props":10693,"children":10694},{"style":537},[10695],{"type":51,"value":10696}," getContract",{"type":46,"tag":470,"props":10698,"children":10699},{"style":531},[10700],{"type":51,"value":604},{"type":46,"tag":470,"props":10702,"children":10703},{"style":537},[10704],{"type":51,"value":10705}," maxUint256",{"type":46,"tag":470,"props":10707,"children":10708},{"style":531},[10709],{"type":51,"value":604},{"type":46,"tag":470,"props":10711,"children":10712},{"style":525},[10713],{"type":51,"value":10714}," type",{"type":46,"tag":470,"props":10716,"children":10717},{"style":537},[10718],{"type":51,"value":10719}," Address",{"type":46,"tag":470,"props":10721,"children":10722},{"style":531},[10723],{"type":51,"value":545},{"type":46,"tag":470,"props":10725,"children":10726},{"style":525},[10727],{"type":51,"value":550},{"type":46,"tag":470,"props":10729,"children":10730},{"style":531},[10731],{"type":51,"value":555},{"type":46,"tag":470,"props":10733,"children":10734},{"style":483},[10735],{"type":51,"value":6098},{"type":46,"tag":470,"props":10737,"children":10738},{"style":531},[10739],{"type":51,"value":565},{"type":46,"tag":470,"props":10741,"children":10742},{"style":531},[10743],{"type":51,"value":570},{"type":46,"tag":470,"props":10745,"children":10746},{"class":472,"line":573},[10747],{"type":46,"tag":470,"props":10748,"children":10749},{"emptyLinePlaceholder":577},[10750],{"type":51,"value":580},{"type":46,"tag":470,"props":10752,"children":10753},{"class":472,"line":583},[10754,10758,10763,10767,10771,10776,10780,10785,10790],{"type":46,"tag":470,"props":10755,"children":10756},{"style":587},[10757],{"type":51,"value":590},{"type":46,"tag":470,"props":10759,"children":10760},{"style":537},[10761],{"type":51,"value":10762}," PERMIT2_ADDRESS ",{"type":46,"tag":470,"props":10764,"children":10765},{"style":531},[10766],{"type":51,"value":3438},{"type":46,"tag":470,"props":10768,"children":10769},{"style":531},[10770],{"type":51,"value":555},{"type":46,"tag":470,"props":10772,"children":10773},{"style":483},[10774],{"type":51,"value":10775},"0x000000000022D473030F116dDEE9F6B43aC78BA3",{"type":46,"tag":470,"props":10777,"children":10778},{"style":531},[10779],{"type":51,"value":565},{"type":46,"tag":470,"props":10781,"children":10782},{"style":525},[10783],{"type":51,"value":10784}," as",{"type":46,"tag":470,"props":10786,"children":10787},{"style":587},[10788],{"type":51,"value":10789}," const",{"type":46,"tag":470,"props":10791,"children":10792},{"style":531},[10793],{"type":51,"value":570},{"type":46,"tag":470,"props":10795,"children":10796},{"class":472,"line":1046},[10797],{"type":46,"tag":470,"props":10798,"children":10799},{"emptyLinePlaceholder":577},[10800],{"type":51,"value":580},{"type":46,"tag":470,"props":10802,"children":10803},{"class":472,"line":1084},[10804],{"type":46,"tag":470,"props":10805,"children":10806},{"style":3418},[10807],{"type":51,"value":10808},"\u002F\u002F Check if Permit2 approval exists\n",{"type":46,"tag":470,"props":10810,"children":10811},{"class":472,"line":1111},[10812,10816,10821,10825,10829,10834,10838,10843,10847],{"type":46,"tag":470,"props":10813,"children":10814},{"style":587},[10815],{"type":51,"value":590},{"type":46,"tag":470,"props":10817,"children":10818},{"style":537},[10819],{"type":51,"value":10820}," allowance ",{"type":46,"tag":470,"props":10822,"children":10823},{"style":531},[10824],{"type":51,"value":3438},{"type":46,"tag":470,"props":10826,"children":10827},{"style":525},[10828],{"type":51,"value":3443},{"type":46,"tag":470,"props":10830,"children":10831},{"style":537},[10832],{"type":51,"value":10833}," publicClient",{"type":46,"tag":470,"props":10835,"children":10836},{"style":531},[10837],{"type":51,"value":628},{"type":46,"tag":470,"props":10839,"children":10840},{"style":631},[10841],{"type":51,"value":10842},"readContract",{"type":46,"tag":470,"props":10844,"children":10845},{"style":537},[10846],{"type":51,"value":835},{"type":46,"tag":470,"props":10848,"children":10849},{"style":531},[10850],{"type":51,"value":967},{"type":46,"tag":470,"props":10852,"children":10853},{"class":472,"line":1314},[10854,10859,10863,10868],{"type":46,"tag":470,"props":10855,"children":10856},{"style":2780},[10857],{"type":51,"value":10858},"  address",{"type":46,"tag":470,"props":10860,"children":10861},{"style":531},[10862],{"type":51,"value":417},{"type":46,"tag":470,"props":10864,"children":10865},{"style":537},[10866],{"type":51,"value":10867}," PERMIT2_ADDRESS",{"type":46,"tag":470,"props":10869,"children":10870},{"style":531},[10871],{"type":51,"value":1007},{"type":46,"tag":470,"props":10873,"children":10874},{"class":472,"line":1338},[10875,10880,10884,10889],{"type":46,"tag":470,"props":10876,"children":10877},{"style":2780},[10878],{"type":51,"value":10879},"  abi",{"type":46,"tag":470,"props":10881,"children":10882},{"style":531},[10883],{"type":51,"value":417},{"type":46,"tag":470,"props":10885,"children":10886},{"style":537},[10887],{"type":51,"value":10888}," permit2Abi",{"type":46,"tag":470,"props":10890,"children":10891},{"style":531},[10892],{"type":51,"value":1007},{"type":46,"tag":470,"props":10894,"children":10895},{"class":472,"line":1347},[10896,10901,10905,10909,10914,10918],{"type":46,"tag":470,"props":10897,"children":10898},{"style":2780},[10899],{"type":51,"value":10900},"  functionName",{"type":46,"tag":470,"props":10902,"children":10903},{"style":531},[10904],{"type":51,"value":417},{"type":46,"tag":470,"props":10906,"children":10907},{"style":531},[10908],{"type":51,"value":555},{"type":46,"tag":470,"props":10910,"children":10911},{"style":483},[10912],{"type":51,"value":10913},"allowance",{"type":46,"tag":470,"props":10915,"children":10916},{"style":531},[10917],{"type":51,"value":565},{"type":46,"tag":470,"props":10919,"children":10920},{"style":531},[10921],{"type":51,"value":1007},{"type":46,"tag":470,"props":10923,"children":10924},{"class":472,"line":1705},[10925,10930,10934,10939,10943,10948,10952,10957],{"type":46,"tag":470,"props":10926,"children":10927},{"style":2780},[10928],{"type":51,"value":10929},"  args",{"type":46,"tag":470,"props":10931,"children":10932},{"style":531},[10933],{"type":51,"value":417},{"type":46,"tag":470,"props":10935,"children":10936},{"style":537},[10937],{"type":51,"value":10938}," [userAddress",{"type":46,"tag":470,"props":10940,"children":10941},{"style":531},[10942],{"type":51,"value":604},{"type":46,"tag":470,"props":10944,"children":10945},{"style":537},[10946],{"type":51,"value":10947}," tokenAddress",{"type":46,"tag":470,"props":10949,"children":10950},{"style":531},[10951],{"type":51,"value":604},{"type":46,"tag":470,"props":10953,"children":10954},{"style":537},[10955],{"type":51,"value":10956}," spenderAddress]",{"type":46,"tag":470,"props":10958,"children":10959},{"style":531},[10960],{"type":51,"value":1007},{"type":46,"tag":470,"props":10962,"children":10963},{"class":472,"line":1740},[10964,10968,10972],{"type":46,"tag":470,"props":10965,"children":10966},{"style":531},[10967],{"type":51,"value":614},{"type":46,"tag":470,"props":10969,"children":10970},{"style":537},[10971],{"type":51,"value":842},{"type":46,"tag":470,"props":10973,"children":10974},{"style":531},[10975],{"type":51,"value":570},{"type":46,"tag":470,"props":10977,"children":10978},{"class":472,"line":2421},[10979],{"type":46,"tag":470,"props":10980,"children":10981},{"emptyLinePlaceholder":577},[10982],{"type":51,"value":580},{"type":46,"tag":470,"props":10984,"children":10985},{"class":472,"line":2447},[10986],{"type":46,"tag":470,"props":10987,"children":10988},{"style":3418},[10989],{"type":51,"value":10990},"\u002F\u002F If not approved, user must approve Permit2 first\n",{"type":46,"tag":470,"props":10992,"children":10993},{"class":472,"line":2877},[10994,10998,11003,11007,11012,11016,11021],{"type":46,"tag":470,"props":10995,"children":10996},{"style":525},[10997],{"type":51,"value":3741},{"type":46,"tag":470,"props":10999,"children":11000},{"style":537},[11001],{"type":51,"value":11002}," (allowance",{"type":46,"tag":470,"props":11004,"children":11005},{"style":531},[11006],{"type":51,"value":628},{"type":46,"tag":470,"props":11008,"children":11009},{"style":537},[11010],{"type":51,"value":11011},"amount ",{"type":46,"tag":470,"props":11013,"children":11014},{"style":531},[11015],{"type":51,"value":856},{"type":46,"tag":470,"props":11017,"children":11018},{"style":537},[11019],{"type":51,"value":11020}," requiredAmount) ",{"type":46,"tag":470,"props":11022,"children":11023},{"style":531},[11024],{"type":51,"value":967},{"type":46,"tag":470,"props":11026,"children":11027},{"class":472,"line":2886},[11028,11032,11037,11041,11045,11050,11054,11058,11062],{"type":46,"tag":470,"props":11029,"children":11030},{"style":587},[11031],{"type":51,"value":5252},{"type":46,"tag":470,"props":11033,"children":11034},{"style":537},[11035],{"type":51,"value":11036}," hash",{"type":46,"tag":470,"props":11038,"children":11039},{"style":531},[11040],{"type":51,"value":619},{"type":46,"tag":470,"props":11042,"children":11043},{"style":525},[11044],{"type":51,"value":3443},{"type":46,"tag":470,"props":11046,"children":11047},{"style":537},[11048],{"type":51,"value":11049}," walletClient",{"type":46,"tag":470,"props":11051,"children":11052},{"style":531},[11053],{"type":51,"value":628},{"type":46,"tag":470,"props":11055,"children":11056},{"style":631},[11057],{"type":51,"value":905},{"type":46,"tag":470,"props":11059,"children":11060},{"style":2780},[11061],{"type":51,"value":835},{"type":46,"tag":470,"props":11063,"children":11064},{"style":531},[11065],{"type":51,"value":967},{"type":46,"tag":470,"props":11067,"children":11068},{"class":472,"line":2912},[11069,11074,11078,11082],{"type":46,"tag":470,"props":11070,"children":11071},{"style":2780},[11072],{"type":51,"value":11073},"    address",{"type":46,"tag":470,"props":11075,"children":11076},{"style":531},[11077],{"type":51,"value":417},{"type":46,"tag":470,"props":11079,"children":11080},{"style":537},[11081],{"type":51,"value":10947},{"type":46,"tag":470,"props":11083,"children":11084},{"style":531},[11085],{"type":51,"value":1007},{"type":46,"tag":470,"props":11087,"children":11088},{"class":472,"line":2921},[11089,11094,11098,11103],{"type":46,"tag":470,"props":11090,"children":11091},{"style":2780},[11092],{"type":51,"value":11093},"    abi",{"type":46,"tag":470,"props":11095,"children":11096},{"style":531},[11097],{"type":51,"value":417},{"type":46,"tag":470,"props":11099,"children":11100},{"style":537},[11101],{"type":51,"value":11102}," erc20Abi",{"type":46,"tag":470,"props":11104,"children":11105},{"style":531},[11106],{"type":51,"value":1007},{"type":46,"tag":470,"props":11108,"children":11109},{"class":472,"line":2958},[11110,11115,11119,11123,11128,11132],{"type":46,"tag":470,"props":11111,"children":11112},{"style":2780},[11113],{"type":51,"value":11114},"    functionName",{"type":46,"tag":470,"props":11116,"children":11117},{"style":531},[11118],{"type":51,"value":417},{"type":46,"tag":470,"props":11120,"children":11121},{"style":531},[11122],{"type":51,"value":555},{"type":46,"tag":470,"props":11124,"children":11125},{"style":483},[11126],{"type":51,"value":11127},"approve",{"type":46,"tag":470,"props":11129,"children":11130},{"style":531},[11131],{"type":51,"value":565},{"type":46,"tag":470,"props":11133,"children":11134},{"style":531},[11135],{"type":51,"value":1007},{"type":46,"tag":470,"props":11137,"children":11138},{"class":472,"line":2994},[11139,11144,11148,11152,11157,11161,11165,11169],{"type":46,"tag":470,"props":11140,"children":11141},{"style":2780},[11142],{"type":51,"value":11143},"    args",{"type":46,"tag":470,"props":11145,"children":11146},{"style":531},[11147],{"type":51,"value":417},{"type":46,"tag":470,"props":11149,"children":11150},{"style":2780},[11151],{"type":51,"value":7102},{"type":46,"tag":470,"props":11153,"children":11154},{"style":537},[11155],{"type":51,"value":11156},"PERMIT2_ADDRESS",{"type":46,"tag":470,"props":11158,"children":11159},{"style":531},[11160],{"type":51,"value":604},{"type":46,"tag":470,"props":11162,"children":11163},{"style":537},[11164],{"type":51,"value":10705},{"type":46,"tag":470,"props":11166,"children":11167},{"style":2780},[11168],{"type":51,"value":7119},{"type":46,"tag":470,"props":11170,"children":11171},{"style":531},[11172],{"type":51,"value":1007},{"type":46,"tag":470,"props":11174,"children":11175},{"class":472,"line":3031},[11176,11180,11184],{"type":46,"tag":470,"props":11177,"children":11178},{"style":531},[11179],{"type":51,"value":5596},{"type":46,"tag":470,"props":11181,"children":11182},{"style":2780},[11183],{"type":51,"value":842},{"type":46,"tag":470,"props":11185,"children":11186},{"style":531},[11187],{"type":51,"value":570},{"type":46,"tag":470,"props":11189,"children":11190},{"class":472,"line":3064},[11191,11196,11200,11204,11209,11213,11218,11222,11226,11230],{"type":46,"tag":470,"props":11192,"children":11193},{"style":525},[11194],{"type":51,"value":11195},"  await",{"type":46,"tag":470,"props":11197,"children":11198},{"style":537},[11199],{"type":51,"value":10833},{"type":46,"tag":470,"props":11201,"children":11202},{"style":531},[11203],{"type":51,"value":628},{"type":46,"tag":470,"props":11205,"children":11206},{"style":631},[11207],{"type":51,"value":11208},"waitForTransactionReceipt",{"type":46,"tag":470,"props":11210,"children":11211},{"style":2780},[11212],{"type":51,"value":835},{"type":46,"tag":470,"props":11214,"children":11215},{"style":531},[11216],{"type":51,"value":11217},"{",{"type":46,"tag":470,"props":11219,"children":11220},{"style":537},[11221],{"type":51,"value":11036},{"type":46,"tag":470,"props":11223,"children":11224},{"style":531},[11225],{"type":51,"value":545},{"type":46,"tag":470,"props":11227,"children":11228},{"style":2780},[11229],{"type":51,"value":842},{"type":46,"tag":470,"props":11231,"children":11232},{"style":531},[11233],{"type":51,"value":570},{"type":46,"tag":470,"props":11235,"children":11236},{"class":472,"line":3073},[11237],{"type":46,"tag":470,"props":11238,"children":11239},{"style":531},[11240],{"type":51,"value":1117},{"type":46,"tag":470,"props":11242,"children":11243},{"class":472,"line":3082},[11244],{"type":46,"tag":470,"props":11245,"children":11246},{"emptyLinePlaceholder":577},[11247],{"type":51,"value":580},{"type":46,"tag":470,"props":11249,"children":11250},{"class":472,"line":3106},[11251],{"type":46,"tag":470,"props":11252,"children":11253},{"style":3418},[11254],{"type":51,"value":11255},"\u002F\u002F Then sign permit for the swap\n",{"type":46,"tag":470,"props":11257,"children":11258},{"class":472,"line":3115},[11259,11263,11268,11272,11276,11281,11285,11289,11293],{"type":46,"tag":470,"props":11260,"children":11261},{"style":587},[11262],{"type":51,"value":590},{"type":46,"tag":470,"props":11264,"children":11265},{"style":537},[11266],{"type":51,"value":11267}," permitSignature ",{"type":46,"tag":470,"props":11269,"children":11270},{"style":531},[11271],{"type":51,"value":3438},{"type":46,"tag":470,"props":11273,"children":11274},{"style":525},[11275],{"type":51,"value":3443},{"type":46,"tag":470,"props":11277,"children":11278},{"style":631},[11279],{"type":51,"value":11280}," signPermit",{"type":46,"tag":470,"props":11282,"children":11283},{"style":537},[11284],{"type":51,"value":835},{"type":46,"tag":470,"props":11286,"children":11287},{"style":531},[11288],{"type":51,"value":2673},{"type":46,"tag":470,"props":11290,"children":11291},{"style":537},[11292],{"type":51,"value":842},{"type":46,"tag":470,"props":11294,"children":11295},{"style":531},[11296],{"type":51,"value":570},{"type":46,"tag":704,"props":11298,"children":11299},{},[],{"type":46,"tag":60,"props":11301,"children":11303},{"id":11302},"uniswapx-auction-types",[11304],{"type":51,"value":4898},{"type":46,"tag":54,"props":11306,"children":11307},{},[11308],{"type":51,"value":11309},"UniswapX routes swaps through off-chain fillers who compete to execute orders at better prices than on-chain AMMs. The auction mechanism varies by chain.",{"type":46,"tag":172,"props":11311,"children":11313},{"id":11312},"exclusive-dutch-auction-ethereum",[11314],{"type":51,"value":11315},"Exclusive Dutch Auction (Ethereum)",{"type":46,"tag":719,"props":11317,"children":11318},{},[11319,11324,11336,11341],{"type":46,"tag":723,"props":11320,"children":11321},{},[11322],{"type":51,"value":11323},"Starts with an RFQ (Request for Quote) phase where permissioned quoters compete",{"type":46,"tag":723,"props":11325,"children":11326},{},[11327,11329,11334],{"type":51,"value":11328},"Winning quoter receives ",{"type":46,"tag":72,"props":11330,"children":11331},{},[11332],{"type":51,"value":11333},"exclusive filling rights",{"type":51,"value":11335}," for a set period",{"type":46,"tag":723,"props":11337,"children":11338},{},[11339],{"type":51,"value":11340},"If the exclusive filler doesn't execute, falls back to an open Dutch auction where the price decays each block",{"type":46,"tag":723,"props":11342,"children":11343},{},[11344],{"type":51,"value":11345},"Best for large swaps where MEV protection matters most",{"type":46,"tag":54,"props":11347,"children":11348},{},[11349,11354,11355,11360,11361],{"type":46,"tag":72,"props":11350,"children":11351},{},[11352],{"type":51,"value":11353},"Trading API routing type",{"type":51,"value":334},{"type":46,"tag":80,"props":11356,"children":11358},{"className":11357},[],[11359],{"type":51,"value":230},{"type":51,"value":1837},{"type":46,"tag":80,"props":11362,"children":11364},{"className":11363},[],[11365],{"type":51,"value":3683},{"type":46,"tag":172,"props":11367,"children":11369},{"id":11368},"open-dutch-auction-arbitrum",[11370],{"type":51,"value":11371},"Open Dutch Auction (Arbitrum)",{"type":46,"tag":719,"props":11373,"children":11374},{},[11375,11380,11385,11390],{"type":46,"tag":723,"props":11376,"children":11377},{},[11378],{"type":51,"value":11379},"Direct open auction without an RFQ phase",{"type":46,"tag":723,"props":11381,"children":11382},{},[11383],{"type":51,"value":11384},"Fillers compete on-chain through a descending price mechanism",{"type":46,"tag":723,"props":11386,"children":11387},{},[11388],{"type":51,"value":11389},"Leverages Arbitrum's fast 0.25-second block times for rapid price discovery",{"type":46,"tag":723,"props":11391,"children":11392},{},[11393,11394,11399],{"type":51,"value":4930},{"type":46,"tag":72,"props":11395,"children":11396},{},[11397],{"type":51,"value":11398},"Unimind algorithm",{"type":51,"value":11400}," sets auction parameters based on historical pair performance",{"type":46,"tag":54,"props":11402,"children":11403},{},[11404,11408,11409],{"type":46,"tag":72,"props":11405,"children":11406},{},[11407],{"type":51,"value":11353},{"type":51,"value":334},{"type":46,"tag":80,"props":11410,"children":11412},{"className":11411},[],[11413],{"type":51,"value":230},{"type":46,"tag":172,"props":11415,"children":11417},{"id":11416},"priority-gas-auction-base-unichain",[11418],{"type":51,"value":11419},"Priority Gas Auction (Base, Unichain)",{"type":46,"tag":719,"props":11421,"children":11422},{},[11423,11435,11440,11445],{"type":46,"tag":723,"props":11424,"children":11425},{},[11426,11428,11433],{"type":51,"value":11427},"Fillers bid by submitting transactions with varying ",{"type":46,"tag":72,"props":11429,"children":11430},{},[11431],{"type":51,"value":11432},"priority fees",{"type":51,"value":11434}," at a target block",{"type":46,"tag":723,"props":11436,"children":11437},{},[11438],{"type":51,"value":11439},"Highest priority fee wins the right to fill the order",{"type":46,"tag":723,"props":11441,"children":11442},{},[11443],{"type":51,"value":11444},"Exploits OP Stack's priority ordering mechanism",{"type":46,"tag":723,"props":11446,"children":11447},{},[11448],{"type":51,"value":11449},"Effective on chains where block builders respect priority ordering",{"type":46,"tag":54,"props":11451,"children":11452},{},[11453,11457,11458],{"type":46,"tag":72,"props":11454,"children":11455},{},[11456],{"type":51,"value":11353},{"type":51,"value":334},{"type":46,"tag":80,"props":11459,"children":11461},{"className":11460},[],[11462],{"type":51,"value":248},{"type":46,"tag":172,"props":11464,"children":11466},{"id":11465},"key-properties-all-auction-types",[11467],{"type":51,"value":11468},"Key Properties (All Auction Types)",{"type":46,"tag":719,"props":11470,"children":11471},{},[11472,11482,11492,11502],{"type":46,"tag":723,"props":11473,"children":11474},{},[11475,11480],{"type":46,"tag":72,"props":11476,"children":11477},{},[11478],{"type":51,"value":11479},"Gasless for users",{"type":51,"value":11481}," — fillers pay gas fees, incorporated into final pricing",{"type":46,"tag":723,"props":11483,"children":11484},{},[11485,11490],{"type":46,"tag":72,"props":11486,"children":11487},{},[11488],{"type":51,"value":11489},"No cost on failure",{"type":51,"value":11491}," — if a swap doesn't fill, the user pays nothing",{"type":46,"tag":723,"props":11493,"children":11494},{},[11495,11500],{"type":46,"tag":72,"props":11496,"children":11497},{},[11498],{"type":51,"value":11499},"MEV protection",{"type":51,"value":11501}," — auction mechanics prevent frontrunning and sandwich attacks",{"type":46,"tag":723,"props":11503,"children":11504},{},[11505],{"type":51,"value":11506},"UniswapX V2 is currently supported on Ethereum (1), Arbitrum (42161), Base (8453), and Unichain (130)",{"type":46,"tag":54,"props":11508,"children":11509},{},[11510,11512,11519],{"type":51,"value":11511},"For more detail, see the ",{"type":46,"tag":300,"props":11513,"children":11516},{"href":11514,"rel":11515},"https:\u002F\u002Fdocs.uniswap.org\u002Fcontracts\u002Funiswapx\u002Fauctiontypes",[372],[11517],{"type":51,"value":11518},"UniswapX Auction Types documentation",{"type":51,"value":628},{"type":46,"tag":172,"props":11521,"children":11523},{"id":11522},"uniswapx-signing-vs-submission-flow",[11524],{"type":51,"value":11525},"UniswapX: Signing vs. Submission Flow",{"type":46,"tag":54,"props":11527,"children":11528},{},[11529,11530,11535,11537,11543,11545,11550],{"type":51,"value":4930},{"type":46,"tag":80,"props":11531,"children":11533},{"className":11532},[],[11534],{"type":51,"value":2431},{"type":51,"value":11536}," field in the quote response serves different purposes depending on the routing type. Conflating the two causes ",{"type":46,"tag":80,"props":11538,"children":11540},{"className":11539},[],[11541],{"type":51,"value":11542},"RequestValidationError",{"type":51,"value":11544}," on ",{"type":46,"tag":80,"props":11546,"children":11548},{"className":11547},[],[11549],{"type":51,"value":4066},{"type":51,"value":628},{"type":46,"tag":54,"props":11552,"children":11553},{},[11554,11559,11561,11566],{"type":46,"tag":72,"props":11555,"children":11556},{},[11557],{"type":51,"value":11558},"CLASSIC flow",{"type":51,"value":11560}," — ",{"type":46,"tag":80,"props":11562,"children":11564},{"className":11563},[],[11565],{"type":51,"value":2431},{"type":51,"value":11567}," goes to the server:",{"type":46,"tag":10532,"props":11569,"children":11570},{},[11571,11589,11606],{"type":46,"tag":723,"props":11572,"children":11573},{},[11574,11580,11582,11587],{"type":46,"tag":80,"props":11575,"children":11577},{"className":11576},[],[11578],{"type":51,"value":11579},"\u002Fquote",{"type":51,"value":11581}," returns ",{"type":46,"tag":80,"props":11583,"children":11585},{"className":11584},[],[11586],{"type":51,"value":2431},{"type":51,"value":11588}," (EIP-712 typed data for the Permit2 allowance)",{"type":46,"tag":723,"props":11590,"children":11591},{},[11592,11594,11599,11601],{"type":51,"value":11593},"User signs ",{"type":46,"tag":80,"props":11595,"children":11597},{"className":11596},[],[11598],{"type":51,"value":2431},{"type":51,"value":11600}," locally → produces ",{"type":46,"tag":80,"props":11602,"children":11604},{"className":11603},[],[11605],{"type":51,"value":3795},{"type":46,"tag":723,"props":11607,"children":11608},{},[11609,11614,11616,11621,11623,11628,11629,11634,11636,11641],{"type":46,"tag":80,"props":11610,"children":11612},{"className":11611},[],[11613],{"type":51,"value":4066},{"type":51,"value":11615}," body includes ",{"type":46,"tag":72,"props":11617,"children":11618},{},[11619],{"type":51,"value":11620},"both",{"type":51,"value":11622}," ",{"type":46,"tag":80,"props":11624,"children":11626},{"className":11625},[],[11627],{"type":51,"value":3795},{"type":51,"value":1764},{"type":46,"tag":80,"props":11630,"children":11632},{"className":11631},[],[11633],{"type":51,"value":2431},{"type":51,"value":11635}," — the Universal Router contract needs ",{"type":46,"tag":80,"props":11637,"children":11639},{"className":11638},[],[11640],{"type":51,"value":2431},{"type":51,"value":11642}," to reconstruct and verify the Permit2 authorization on-chain",{"type":46,"tag":54,"props":11644,"children":11645},{},[11646,11651,11652,11657],{"type":46,"tag":72,"props":11647,"children":11648},{},[11649],{"type":51,"value":11650},"UniswapX flow (DUTCH_V2\u002FV3\u002FPRIORITY)",{"type":51,"value":11560},{"type":46,"tag":80,"props":11653,"children":11655},{"className":11654},[],[11656],{"type":51,"value":2431},{"type":51,"value":11658}," stays local:",{"type":46,"tag":10532,"props":11660,"children":11661},{},[11662,11678,11693],{"type":46,"tag":723,"props":11663,"children":11664},{},[11665,11670,11671,11676],{"type":46,"tag":80,"props":11666,"children":11668},{"className":11667},[],[11669],{"type":51,"value":11579},{"type":51,"value":11581},{"type":46,"tag":80,"props":11672,"children":11674},{"className":11673},[],[11675],{"type":51,"value":2431},{"type":51,"value":11677}," (EIP-712 typed data for the Dutch order)",{"type":46,"tag":723,"props":11679,"children":11680},{},[11681,11682,11687,11688],{"type":51,"value":11593},{"type":46,"tag":80,"props":11683,"children":11685},{"className":11684},[],[11686],{"type":51,"value":2431},{"type":51,"value":11600},{"type":46,"tag":80,"props":11689,"children":11691},{"className":11690},[],[11692],{"type":51,"value":3795},{"type":46,"tag":723,"props":11694,"children":11695},{},[11696,11701,11702,11707,11708,11713,11715,11721,11723,11728,11730,11735],{"type":46,"tag":80,"props":11697,"children":11699},{"className":11698},[],[11700],{"type":51,"value":4066},{"type":51,"value":11615},{"type":46,"tag":72,"props":11703,"children":11704},{},[11705],{"type":51,"value":11706},"only",{"type":51,"value":11622},{"type":46,"tag":80,"props":11709,"children":11711},{"className":11710},[],[11712],{"type":51,"value":3795},{"type":51,"value":11714}," — the order is already fully encoded in ",{"type":46,"tag":80,"props":11716,"children":11718},{"className":11717},[],[11719],{"type":51,"value":11720},"quote.encodedOrder",{"type":51,"value":11722},", which the off-chain filler system reads directly. Sending ",{"type":46,"tag":80,"props":11724,"children":11726},{"className":11725},[],[11727],{"type":51,"value":2431},{"type":51,"value":11729}," to ",{"type":46,"tag":80,"props":11731,"children":11733},{"className":11732},[],[11734],{"type":51,"value":4066},{"type":51,"value":11736}," causes a schema validation error.",{"type":46,"tag":93,"props":11738,"children":11739},{},[11740,11796],{"type":46,"tag":97,"props":11741,"children":11742},{},[11743],{"type":46,"tag":101,"props":11744,"children":11745},{},[11746,11751,11763,11780],{"type":46,"tag":105,"props":11747,"children":11748},{},[11749],{"type":51,"value":11750},"Route Type",{"type":46,"tag":105,"props":11752,"children":11753},{},[11754,11756,11761],{"type":51,"value":11755},"Sign with ",{"type":46,"tag":80,"props":11757,"children":11759},{"className":11758},[],[11760],{"type":51,"value":2431},{"type":51,"value":11762},"?",{"type":46,"tag":105,"props":11764,"children":11765},{},[11766,11768,11773,11774,11779],{"type":51,"value":11767},"Send ",{"type":46,"tag":80,"props":11769,"children":11771},{"className":11770},[],[11772],{"type":51,"value":2431},{"type":51,"value":11729},{"type":46,"tag":80,"props":11775,"children":11777},{"className":11776},[],[11778],{"type":51,"value":4066},{"type":51,"value":11762},{"type":46,"tag":105,"props":11781,"children":11782},{},[11783,11784,11789,11790,11795],{"type":51,"value":11767},{"type":46,"tag":80,"props":11785,"children":11787},{"className":11786},[],[11788],{"type":51,"value":3795},{"type":51,"value":11729},{"type":46,"tag":80,"props":11791,"children":11793},{"className":11792},[],[11794],{"type":51,"value":4066},{"type":51,"value":11762},{"type":46,"tag":116,"props":11797,"children":11798},{},[11799,11825],{"type":46,"tag":101,"props":11800,"children":11801},{},[11802,11806,11811,11820],{"type":46,"tag":123,"props":11803,"children":11804},{},[11805],{"type":51,"value":212},{"type":46,"tag":123,"props":11807,"children":11808},{},[11809],{"type":51,"value":11810},"Yes",{"type":46,"tag":123,"props":11812,"children":11813},{},[11814,11818],{"type":46,"tag":72,"props":11815,"children":11816},{},[11817],{"type":51,"value":11810},{"type":51,"value":11819}," (router needs it)",{"type":46,"tag":123,"props":11821,"children":11822},{},[11823],{"type":51,"value":11824},"Yes (if using Permit2)",{"type":46,"tag":101,"props":11826,"children":11827},{},[11828,11833,11837,11847],{"type":46,"tag":123,"props":11829,"children":11830},{},[11831],{"type":51,"value":11832},"DUTCH_V2\u002FV3\u002FPRIORITY",{"type":46,"tag":123,"props":11834,"children":11835},{},[11836],{"type":51,"value":11810},{"type":46,"tag":123,"props":11838,"children":11839},{},[11840,11845],{"type":46,"tag":72,"props":11841,"children":11842},{},[11843],{"type":51,"value":11844},"No",{"type":51,"value":11846}," (schema rejects it)",{"type":46,"tag":123,"props":11848,"children":11849},{},[11850],{"type":51,"value":11810},{"type":46,"tag":880,"props":11852,"children":11853},{},[11854],{"type":46,"tag":54,"props":11855,"children":11856},{},[11857,11862,11864,11870,11872,11877,11879,11884,11886,11891,11893,11899,11901,11907],{"type":46,"tag":72,"props":11858,"children":11859},{},[11860],{"type":51,"value":11861},"Common mistake",{"type":51,"value":11863},": The API error ",{"type":46,"tag":80,"props":11865,"children":11867},{"className":11866},[],[11868],{"type":51,"value":11869},"\"quote\" does not match any of the allowed types",{"type":51,"value":11871}," often points at the ",{"type":46,"tag":80,"props":11873,"children":11875},{"className":11874},[],[11876],{"type":51,"value":2060},{"type":51,"value":11878}," field, but the actual cause is ",{"type":46,"tag":80,"props":11880,"children":11882},{"className":11881},[],[11883],{"type":51,"value":2431},{"type":51,"value":11885}," being present for a UniswapX route. Strip ",{"type":46,"tag":80,"props":11887,"children":11889},{"className":11888},[],[11890],{"type":51,"value":2431},{"type":51,"value":11892}," before submitting — see the routing-aware ",{"type":46,"tag":80,"props":11894,"children":11896},{"className":11895},[],[11897],{"type":51,"value":11898},"prepareSwapRequest",{"type":51,"value":11900}," in ",{"type":46,"tag":300,"props":11902,"children":11904},{"href":11903},"#2-null-field-handling",[11905],{"type":51,"value":11906},"Null Field Handling",{"type":51,"value":628},{"type":46,"tag":704,"props":11909,"children":11910},{},[],{"type":46,"tag":60,"props":11912,"children":11914},{"id":11913},"direct-universal-router-integration-sdk",[11915],{"type":51,"value":11916},"Direct Universal Router Integration (SDK)",{"type":46,"tag":54,"props":11918,"children":11919},{},[11920],{"type":51,"value":11921},"For direct Universal Router integration without the Trading API, use the SDK's high-level API.",{"type":46,"tag":172,"props":11923,"children":11925},{"id":11924},"installation",[11926],{"type":51,"value":458},{"type":46,"tag":397,"props":11928,"children":11930},{"className":462,"code":11929,"language":464,"meta":402,"style":402},"npm install @uniswap\u002Funiversal-router-sdk @uniswap\u002Frouter-sdk @uniswap\u002Fsdk-core @uniswap\u002Fv3-sdk viem\n",[11931],{"type":46,"tag":80,"props":11932,"children":11933},{"__ignoreMap":402},[11934],{"type":46,"tag":470,"props":11935,"children":11936},{"class":472,"line":473},[11937,11941,11945,11949,11954,11958,11963],{"type":46,"tag":470,"props":11938,"children":11939},{"style":477},[11940],{"type":51,"value":480},{"type":46,"tag":470,"props":11942,"children":11943},{"style":483},[11944],{"type":51,"value":486},{"type":46,"tag":470,"props":11946,"children":11947},{"style":483},[11948],{"type":51,"value":491},{"type":46,"tag":470,"props":11950,"children":11951},{"style":483},[11952],{"type":51,"value":11953}," @uniswap\u002Frouter-sdk",{"type":46,"tag":470,"props":11955,"children":11956},{"style":483},[11957],{"type":51,"value":496},{"type":46,"tag":470,"props":11959,"children":11960},{"style":483},[11961],{"type":51,"value":11962}," @uniswap\u002Fv3-sdk",{"type":46,"tag":470,"props":11964,"children":11965},{"style":483},[11966],{"type":51,"value":11967}," viem\n",{"type":46,"tag":172,"props":11969,"children":11971},{"id":11970},"high-level-approach-recommended",[11972],{"type":51,"value":11973},"High-Level Approach (Recommended)",{"type":46,"tag":54,"props":11975,"children":11976},{},[11977,11979,11985,11987,11993],{"type":51,"value":11978},"Use ",{"type":46,"tag":80,"props":11980,"children":11982},{"className":11981},[],[11983],{"type":51,"value":11984},"RouterTrade",{"type":51,"value":11986}," + ",{"type":46,"tag":80,"props":11988,"children":11990},{"className":11989},[],[11991],{"type":51,"value":11992},"SwapRouter.swapCallParameters()",{"type":51,"value":11994}," for automatic command building:",{"type":46,"tag":397,"props":11996,"children":11998},{"className":513,"code":11997,"language":515,"meta":402,"style":402},"import { SwapRouter } from '@uniswap\u002Funiversal-router-sdk';\nimport { Trade as RouterTrade } from '@uniswap\u002Frouter-sdk';\nimport { TradeType, Percent } from '@uniswap\u002Fsdk-core';\nimport { Route as V3Route, Pool } from '@uniswap\u002Fv3-sdk';\n\n\u002F\u002F 1. Fetch pool data (required to construct routes)\n\u002F\u002F Using viem to read on-chain pool state:\nconst slot0 = await publicClient.readContract({\n  address: poolAddress,\n  abi: [\n    {\n      name: 'slot0',\n      type: 'function',\n      stateMutability: 'view',\n      inputs: [],\n      outputs: [\n        { name: 'sqrtPriceX96', type: 'uint160' },\n        { name: 'tick', type: 'int24' },\n        { name: 'observationIndex', type: 'uint16' },\n        { name: 'observationCardinality', type: 'uint16' },\n        { name: 'observationCardinalityNext', type: 'uint16' },\n        { name: 'feeProtocol', type: 'uint8' },\n        { name: 'unlocked', type: 'bool' },\n      ],\n    },\n  ],\n  functionName: 'slot0',\n});\nconst liquidity = await publicClient.readContract({\n  address: poolAddress,\n  abi: [\n    {\n      name: 'liquidity',\n      type: 'function',\n      stateMutability: 'view',\n      inputs: [],\n      outputs: [{ type: 'uint128' }],\n    },\n  ],\n  functionName: 'liquidity',\n});\n\nconst pool = new Pool(tokenIn, tokenOut, fee, slot0[0].toString(), liquidity.toString(), slot0[1]);\n\n\u002F\u002F 2. Build route and trade\nconst route = new V3Route([pool], tokenIn, tokenOut);\nconst trade = RouterTrade.createUncheckedTrade({\n  route,\n  inputAmount: amountIn,\n  outputAmount: expectedOut,\n  tradeType: TradeType.EXACT_INPUT,\n});\n\n\u002F\u002F 3. Get calldata\nconst { calldata, value } = SwapRouter.swapCallParameters(trade, {\n  slippageTolerance: new Percent(50, 10000), \u002F\u002F 0.5%\n  recipient: walletAddress,\n  deadline: Math.floor(Date.now() \u002F 1000) + 1800,\n});\n\n\u002F\u002F 4. Execute with viem\nconst hash = await walletClient.sendTransaction({\n  to: UNIVERSAL_ROUTER_ADDRESS,\n  data: calldata,\n  value: BigInt(value),\n});\n",[11999],{"type":46,"tag":80,"props":12000,"children":12001},{"__ignoreMap":402},[12002,12041,12090,12137,12196,12203,12211,12219,12259,12279,12294,12301,12330,12358,12387,12408,12423,12482,12539,12596,12652,12708,12765,12822,12834,12841,12853,12880,12895,12935,12954,12969,12976,13004,13031,13058,13077,13129,13136,13147,13174,13189,13196,13315,13322,13330,13381,13417,13429,13450,13471,13498,13513,13520,13528,13584,13632,13652,13717,13733,13741,13750,13791,13811,13831,13858],{"type":46,"tag":470,"props":12003,"children":12004},{"class":472,"line":473},[12005,12009,12013,12017,12021,12025,12029,12033,12037],{"type":46,"tag":470,"props":12006,"children":12007},{"style":525},[12008],{"type":51,"value":528},{"type":46,"tag":470,"props":12010,"children":12011},{"style":531},[12012],{"type":51,"value":534},{"type":46,"tag":470,"props":12014,"children":12015},{"style":537},[12016],{"type":51,"value":540},{"type":46,"tag":470,"props":12018,"children":12019},{"style":531},[12020],{"type":51,"value":545},{"type":46,"tag":470,"props":12022,"children":12023},{"style":525},[12024],{"type":51,"value":550},{"type":46,"tag":470,"props":12026,"children":12027},{"style":531},[12028],{"type":51,"value":555},{"type":46,"tag":470,"props":12030,"children":12031},{"style":483},[12032],{"type":51,"value":560},{"type":46,"tag":470,"props":12034,"children":12035},{"style":531},[12036],{"type":51,"value":565},{"type":46,"tag":470,"props":12038,"children":12039},{"style":531},[12040],{"type":51,"value":570},{"type":46,"tag":470,"props":12042,"children":12043},{"class":472,"line":573},[12044,12048,12052,12057,12061,12065,12069,12073,12077,12082,12086],{"type":46,"tag":470,"props":12045,"children":12046},{"style":525},[12047],{"type":51,"value":528},{"type":46,"tag":470,"props":12049,"children":12050},{"style":531},[12051],{"type":51,"value":534},{"type":46,"tag":470,"props":12053,"children":12054},{"style":537},[12055],{"type":51,"value":12056}," Trade",{"type":46,"tag":470,"props":12058,"children":12059},{"style":525},[12060],{"type":51,"value":10784},{"type":46,"tag":470,"props":12062,"children":12063},{"style":537},[12064],{"type":51,"value":9992},{"type":46,"tag":470,"props":12066,"children":12067},{"style":531},[12068],{"type":51,"value":545},{"type":46,"tag":470,"props":12070,"children":12071},{"style":525},[12072],{"type":51,"value":550},{"type":46,"tag":470,"props":12074,"children":12075},{"style":531},[12076],{"type":51,"value":555},{"type":46,"tag":470,"props":12078,"children":12079},{"style":483},[12080],{"type":51,"value":12081},"@uniswap\u002Frouter-sdk",{"type":46,"tag":470,"props":12083,"children":12084},{"style":531},[12085],{"type":51,"value":565},{"type":46,"tag":470,"props":12087,"children":12088},{"style":531},[12089],{"type":51,"value":570},{"type":46,"tag":470,"props":12091,"children":12092},{"class":472,"line":583},[12093,12097,12101,12105,12109,12113,12117,12121,12125,12129,12133],{"type":46,"tag":470,"props":12094,"children":12095},{"style":525},[12096],{"type":51,"value":528},{"type":46,"tag":470,"props":12098,"children":12099},{"style":531},[12100],{"type":51,"value":534},{"type":46,"tag":470,"props":12102,"children":12103},{"style":537},[12104],{"type":51,"value":9931},{"type":46,"tag":470,"props":12106,"children":12107},{"style":531},[12108],{"type":51,"value":604},{"type":46,"tag":470,"props":12110,"children":12111},{"style":537},[12112],{"type":51,"value":10156},{"type":46,"tag":470,"props":12114,"children":12115},{"style":531},[12116],{"type":51,"value":545},{"type":46,"tag":470,"props":12118,"children":12119},{"style":525},[12120],{"type":51,"value":550},{"type":46,"tag":470,"props":12122,"children":12123},{"style":531},[12124],{"type":51,"value":555},{"type":46,"tag":470,"props":12126,"children":12127},{"style":483},[12128],{"type":51,"value":9948},{"type":46,"tag":470,"props":12130,"children":12131},{"style":531},[12132],{"type":51,"value":565},{"type":46,"tag":470,"props":12134,"children":12135},{"style":531},[12136],{"type":51,"value":570},{"type":46,"tag":470,"props":12138,"children":12139},{"class":472,"line":1046},[12140,12144,12148,12153,12157,12162,12166,12171,12175,12179,12183,12188,12192],{"type":46,"tag":470,"props":12141,"children":12142},{"style":525},[12143],{"type":51,"value":528},{"type":46,"tag":470,"props":12145,"children":12146},{"style":531},[12147],{"type":51,"value":534},{"type":46,"tag":470,"props":12149,"children":12150},{"style":537},[12151],{"type":51,"value":12152}," Route",{"type":46,"tag":470,"props":12154,"children":12155},{"style":525},[12156],{"type":51,"value":10784},{"type":46,"tag":470,"props":12158,"children":12159},{"style":537},[12160],{"type":51,"value":12161}," V3Route",{"type":46,"tag":470,"props":12163,"children":12164},{"style":531},[12165],{"type":51,"value":604},{"type":46,"tag":470,"props":12167,"children":12168},{"style":537},[12169],{"type":51,"value":12170}," Pool",{"type":46,"tag":470,"props":12172,"children":12173},{"style":531},[12174],{"type":51,"value":545},{"type":46,"tag":470,"props":12176,"children":12177},{"style":525},[12178],{"type":51,"value":550},{"type":46,"tag":470,"props":12180,"children":12181},{"style":531},[12182],{"type":51,"value":555},{"type":46,"tag":470,"props":12184,"children":12185},{"style":483},[12186],{"type":51,"value":12187},"@uniswap\u002Fv3-sdk",{"type":46,"tag":470,"props":12189,"children":12190},{"style":531},[12191],{"type":51,"value":565},{"type":46,"tag":470,"props":12193,"children":12194},{"style":531},[12195],{"type":51,"value":570},{"type":46,"tag":470,"props":12197,"children":12198},{"class":472,"line":1084},[12199],{"type":46,"tag":470,"props":12200,"children":12201},{"emptyLinePlaceholder":577},[12202],{"type":51,"value":580},{"type":46,"tag":470,"props":12204,"children":12205},{"class":472,"line":1111},[12206],{"type":46,"tag":470,"props":12207,"children":12208},{"style":3418},[12209],{"type":51,"value":12210},"\u002F\u002F 1. Fetch pool data (required to construct routes)\n",{"type":46,"tag":470,"props":12212,"children":12213},{"class":472,"line":1314},[12214],{"type":46,"tag":470,"props":12215,"children":12216},{"style":3418},[12217],{"type":51,"value":12218},"\u002F\u002F Using viem to read on-chain pool state:\n",{"type":46,"tag":470,"props":12220,"children":12221},{"class":472,"line":1338},[12222,12226,12231,12235,12239,12243,12247,12251,12255],{"type":46,"tag":470,"props":12223,"children":12224},{"style":587},[12225],{"type":51,"value":590},{"type":46,"tag":470,"props":12227,"children":12228},{"style":537},[12229],{"type":51,"value":12230}," slot0 ",{"type":46,"tag":470,"props":12232,"children":12233},{"style":531},[12234],{"type":51,"value":3438},{"type":46,"tag":470,"props":12236,"children":12237},{"style":525},[12238],{"type":51,"value":3443},{"type":46,"tag":470,"props":12240,"children":12241},{"style":537},[12242],{"type":51,"value":10833},{"type":46,"tag":470,"props":12244,"children":12245},{"style":531},[12246],{"type":51,"value":628},{"type":46,"tag":470,"props":12248,"children":12249},{"style":631},[12250],{"type":51,"value":10842},{"type":46,"tag":470,"props":12252,"children":12253},{"style":537},[12254],{"type":51,"value":835},{"type":46,"tag":470,"props":12256,"children":12257},{"style":531},[12258],{"type":51,"value":967},{"type":46,"tag":470,"props":12260,"children":12261},{"class":472,"line":1347},[12262,12266,12270,12275],{"type":46,"tag":470,"props":12263,"children":12264},{"style":2780},[12265],{"type":51,"value":10858},{"type":46,"tag":470,"props":12267,"children":12268},{"style":531},[12269],{"type":51,"value":417},{"type":46,"tag":470,"props":12271,"children":12272},{"style":537},[12273],{"type":51,"value":12274}," poolAddress",{"type":46,"tag":470,"props":12276,"children":12277},{"style":531},[12278],{"type":51,"value":1007},{"type":46,"tag":470,"props":12280,"children":12281},{"class":472,"line":1705},[12282,12286,12290],{"type":46,"tag":470,"props":12283,"children":12284},{"style":2780},[12285],{"type":51,"value":10879},{"type":46,"tag":470,"props":12287,"children":12288},{"style":531},[12289],{"type":51,"value":417},{"type":46,"tag":470,"props":12291,"children":12292},{"style":537},[12293],{"type":51,"value":2909},{"type":46,"tag":470,"props":12295,"children":12296},{"class":472,"line":1740},[12297],{"type":46,"tag":470,"props":12298,"children":12299},{"style":531},[12300],{"type":51,"value":7634},{"type":46,"tag":470,"props":12302,"children":12303},{"class":472,"line":2421},[12304,12309,12313,12317,12322,12326],{"type":46,"tag":470,"props":12305,"children":12306},{"style":2780},[12307],{"type":51,"value":12308},"      name",{"type":46,"tag":470,"props":12310,"children":12311},{"style":531},[12312],{"type":51,"value":417},{"type":46,"tag":470,"props":12314,"children":12315},{"style":531},[12316],{"type":51,"value":555},{"type":46,"tag":470,"props":12318,"children":12319},{"style":483},[12320],{"type":51,"value":12321},"slot0",{"type":46,"tag":470,"props":12323,"children":12324},{"style":531},[12325],{"type":51,"value":565},{"type":46,"tag":470,"props":12327,"children":12328},{"style":531},[12329],{"type":51,"value":1007},{"type":46,"tag":470,"props":12331,"children":12332},{"class":472,"line":2447},[12333,12338,12342,12346,12350,12354],{"type":46,"tag":470,"props":12334,"children":12335},{"style":2780},[12336],{"type":51,"value":12337},"      type",{"type":46,"tag":470,"props":12339,"children":12340},{"style":531},[12341],{"type":51,"value":417},{"type":46,"tag":470,"props":12343,"children":12344},{"style":531},[12345],{"type":51,"value":555},{"type":46,"tag":470,"props":12347,"children":12348},{"style":483},[12349],{"type":51,"value":4362},{"type":46,"tag":470,"props":12351,"children":12352},{"style":531},[12353],{"type":51,"value":565},{"type":46,"tag":470,"props":12355,"children":12356},{"style":531},[12357],{"type":51,"value":1007},{"type":46,"tag":470,"props":12359,"children":12360},{"class":472,"line":2877},[12361,12366,12370,12374,12379,12383],{"type":46,"tag":470,"props":12362,"children":12363},{"style":2780},[12364],{"type":51,"value":12365},"      stateMutability",{"type":46,"tag":470,"props":12367,"children":12368},{"style":531},[12369],{"type":51,"value":417},{"type":46,"tag":470,"props":12371,"children":12372},{"style":531},[12373],{"type":51,"value":555},{"type":46,"tag":470,"props":12375,"children":12376},{"style":483},[12377],{"type":51,"value":12378},"view",{"type":46,"tag":470,"props":12380,"children":12381},{"style":531},[12382],{"type":51,"value":565},{"type":46,"tag":470,"props":12384,"children":12385},{"style":531},[12386],{"type":51,"value":1007},{"type":46,"tag":470,"props":12388,"children":12389},{"class":472,"line":2886},[12390,12395,12399,12404],{"type":46,"tag":470,"props":12391,"children":12392},{"style":2780},[12393],{"type":51,"value":12394},"      inputs",{"type":46,"tag":470,"props":12396,"children":12397},{"style":531},[12398],{"type":51,"value":417},{"type":46,"tag":470,"props":12400,"children":12401},{"style":537},[12402],{"type":51,"value":12403}," []",{"type":46,"tag":470,"props":12405,"children":12406},{"style":531},[12407],{"type":51,"value":1007},{"type":46,"tag":470,"props":12409,"children":12410},{"class":472,"line":2912},[12411,12415,12419],{"type":46,"tag":470,"props":12412,"children":12413},{"style":2780},[12414],{"type":51,"value":8618},{"type":46,"tag":470,"props":12416,"children":12417},{"style":531},[12418],{"type":51,"value":417},{"type":46,"tag":470,"props":12420,"children":12421},{"style":537},[12422],{"type":51,"value":2909},{"type":46,"tag":470,"props":12424,"children":12425},{"class":472,"line":2921},[12426,12431,12436,12440,12444,12449,12453,12457,12461,12465,12469,12474,12478],{"type":46,"tag":470,"props":12427,"children":12428},{"style":531},[12429],{"type":51,"value":12430},"        {",{"type":46,"tag":470,"props":12432,"children":12433},{"style":2780},[12434],{"type":51,"value":12435}," name",{"type":46,"tag":470,"props":12437,"children":12438},{"style":531},[12439],{"type":51,"value":417},{"type":46,"tag":470,"props":12441,"children":12442},{"style":531},[12443],{"type":51,"value":555},{"type":46,"tag":470,"props":12445,"children":12446},{"style":483},[12447],{"type":51,"value":12448},"sqrtPriceX96",{"type":46,"tag":470,"props":12450,"children":12451},{"style":531},[12452],{"type":51,"value":565},{"type":46,"tag":470,"props":12454,"children":12455},{"style":531},[12456],{"type":51,"value":604},{"type":46,"tag":470,"props":12458,"children":12459},{"style":2780},[12460],{"type":51,"value":10714},{"type":46,"tag":470,"props":12462,"children":12463},{"style":531},[12464],{"type":51,"value":417},{"type":46,"tag":470,"props":12466,"children":12467},{"style":531},[12468],{"type":51,"value":555},{"type":46,"tag":470,"props":12470,"children":12471},{"style":483},[12472],{"type":51,"value":12473},"uint160",{"type":46,"tag":470,"props":12475,"children":12476},{"style":531},[12477],{"type":51,"value":565},{"type":46,"tag":470,"props":12479,"children":12480},{"style":531},[12481],{"type":51,"value":2161},{"type":46,"tag":470,"props":12483,"children":12484},{"class":472,"line":2958},[12485,12489,12493,12497,12501,12506,12510,12514,12518,12522,12526,12531,12535],{"type":46,"tag":470,"props":12486,"children":12487},{"style":531},[12488],{"type":51,"value":12430},{"type":46,"tag":470,"props":12490,"children":12491},{"style":2780},[12492],{"type":51,"value":12435},{"type":46,"tag":470,"props":12494,"children":12495},{"style":531},[12496],{"type":51,"value":417},{"type":46,"tag":470,"props":12498,"children":12499},{"style":531},[12500],{"type":51,"value":555},{"type":46,"tag":470,"props":12502,"children":12503},{"style":483},[12504],{"type":51,"value":12505},"tick",{"type":46,"tag":470,"props":12507,"children":12508},{"style":531},[12509],{"type":51,"value":565},{"type":46,"tag":470,"props":12511,"children":12512},{"style":531},[12513],{"type":51,"value":604},{"type":46,"tag":470,"props":12515,"children":12516},{"style":2780},[12517],{"type":51,"value":10714},{"type":46,"tag":470,"props":12519,"children":12520},{"style":531},[12521],{"type":51,"value":417},{"type":46,"tag":470,"props":12523,"children":12524},{"style":531},[12525],{"type":51,"value":555},{"type":46,"tag":470,"props":12527,"children":12528},{"style":483},[12529],{"type":51,"value":12530},"int24",{"type":46,"tag":470,"props":12532,"children":12533},{"style":531},[12534],{"type":51,"value":565},{"type":46,"tag":470,"props":12536,"children":12537},{"style":531},[12538],{"type":51,"value":2161},{"type":46,"tag":470,"props":12540,"children":12541},{"class":472,"line":2994},[12542,12546,12550,12554,12558,12563,12567,12571,12575,12579,12583,12588,12592],{"type":46,"tag":470,"props":12543,"children":12544},{"style":531},[12545],{"type":51,"value":12430},{"type":46,"tag":470,"props":12547,"children":12548},{"style":2780},[12549],{"type":51,"value":12435},{"type":46,"tag":470,"props":12551,"children":12552},{"style":531},[12553],{"type":51,"value":417},{"type":46,"tag":470,"props":12555,"children":12556},{"style":531},[12557],{"type":51,"value":555},{"type":46,"tag":470,"props":12559,"children":12560},{"style":483},[12561],{"type":51,"value":12562},"observationIndex",{"type":46,"tag":470,"props":12564,"children":12565},{"style":531},[12566],{"type":51,"value":565},{"type":46,"tag":470,"props":12568,"children":12569},{"style":531},[12570],{"type":51,"value":604},{"type":46,"tag":470,"props":12572,"children":12573},{"style":2780},[12574],{"type":51,"value":10714},{"type":46,"tag":470,"props":12576,"children":12577},{"style":531},[12578],{"type":51,"value":417},{"type":46,"tag":470,"props":12580,"children":12581},{"style":531},[12582],{"type":51,"value":555},{"type":46,"tag":470,"props":12584,"children":12585},{"style":483},[12586],{"type":51,"value":12587},"uint16",{"type":46,"tag":470,"props":12589,"children":12590},{"style":531},[12591],{"type":51,"value":565},{"type":46,"tag":470,"props":12593,"children":12594},{"style":531},[12595],{"type":51,"value":2161},{"type":46,"tag":470,"props":12597,"children":12598},{"class":472,"line":3031},[12599,12603,12607,12611,12615,12620,12624,12628,12632,12636,12640,12644,12648],{"type":46,"tag":470,"props":12600,"children":12601},{"style":531},[12602],{"type":51,"value":12430},{"type":46,"tag":470,"props":12604,"children":12605},{"style":2780},[12606],{"type":51,"value":12435},{"type":46,"tag":470,"props":12608,"children":12609},{"style":531},[12610],{"type":51,"value":417},{"type":46,"tag":470,"props":12612,"children":12613},{"style":531},[12614],{"type":51,"value":555},{"type":46,"tag":470,"props":12616,"children":12617},{"style":483},[12618],{"type":51,"value":12619},"observationCardinality",{"type":46,"tag":470,"props":12621,"children":12622},{"style":531},[12623],{"type":51,"value":565},{"type":46,"tag":470,"props":12625,"children":12626},{"style":531},[12627],{"type":51,"value":604},{"type":46,"tag":470,"props":12629,"children":12630},{"style":2780},[12631],{"type":51,"value":10714},{"type":46,"tag":470,"props":12633,"children":12634},{"style":531},[12635],{"type":51,"value":417},{"type":46,"tag":470,"props":12637,"children":12638},{"style":531},[12639],{"type":51,"value":555},{"type":46,"tag":470,"props":12641,"children":12642},{"style":483},[12643],{"type":51,"value":12587},{"type":46,"tag":470,"props":12645,"children":12646},{"style":531},[12647],{"type":51,"value":565},{"type":46,"tag":470,"props":12649,"children":12650},{"style":531},[12651],{"type":51,"value":2161},{"type":46,"tag":470,"props":12653,"children":12654},{"class":472,"line":3064},[12655,12659,12663,12667,12671,12676,12680,12684,12688,12692,12696,12700,12704],{"type":46,"tag":470,"props":12656,"children":12657},{"style":531},[12658],{"type":51,"value":12430},{"type":46,"tag":470,"props":12660,"children":12661},{"style":2780},[12662],{"type":51,"value":12435},{"type":46,"tag":470,"props":12664,"children":12665},{"style":531},[12666],{"type":51,"value":417},{"type":46,"tag":470,"props":12668,"children":12669},{"style":531},[12670],{"type":51,"value":555},{"type":46,"tag":470,"props":12672,"children":12673},{"style":483},[12674],{"type":51,"value":12675},"observationCardinalityNext",{"type":46,"tag":470,"props":12677,"children":12678},{"style":531},[12679],{"type":51,"value":565},{"type":46,"tag":470,"props":12681,"children":12682},{"style":531},[12683],{"type":51,"value":604},{"type":46,"tag":470,"props":12685,"children":12686},{"style":2780},[12687],{"type":51,"value":10714},{"type":46,"tag":470,"props":12689,"children":12690},{"style":531},[12691],{"type":51,"value":417},{"type":46,"tag":470,"props":12693,"children":12694},{"style":531},[12695],{"type":51,"value":555},{"type":46,"tag":470,"props":12697,"children":12698},{"style":483},[12699],{"type":51,"value":12587},{"type":46,"tag":470,"props":12701,"children":12702},{"style":531},[12703],{"type":51,"value":565},{"type":46,"tag":470,"props":12705,"children":12706},{"style":531},[12707],{"type":51,"value":2161},{"type":46,"tag":470,"props":12709,"children":12710},{"class":472,"line":3073},[12711,12715,12719,12723,12727,12732,12736,12740,12744,12748,12752,12757,12761],{"type":46,"tag":470,"props":12712,"children":12713},{"style":531},[12714],{"type":51,"value":12430},{"type":46,"tag":470,"props":12716,"children":12717},{"style":2780},[12718],{"type":51,"value":12435},{"type":46,"tag":470,"props":12720,"children":12721},{"style":531},[12722],{"type":51,"value":417},{"type":46,"tag":470,"props":12724,"children":12725},{"style":531},[12726],{"type":51,"value":555},{"type":46,"tag":470,"props":12728,"children":12729},{"style":483},[12730],{"type":51,"value":12731},"feeProtocol",{"type":46,"tag":470,"props":12733,"children":12734},{"style":531},[12735],{"type":51,"value":565},{"type":46,"tag":470,"props":12737,"children":12738},{"style":531},[12739],{"type":51,"value":604},{"type":46,"tag":470,"props":12741,"children":12742},{"style":2780},[12743],{"type":51,"value":10714},{"type":46,"tag":470,"props":12745,"children":12746},{"style":531},[12747],{"type":51,"value":417},{"type":46,"tag":470,"props":12749,"children":12750},{"style":531},[12751],{"type":51,"value":555},{"type":46,"tag":470,"props":12753,"children":12754},{"style":483},[12755],{"type":51,"value":12756},"uint8",{"type":46,"tag":470,"props":12758,"children":12759},{"style":531},[12760],{"type":51,"value":565},{"type":46,"tag":470,"props":12762,"children":12763},{"style":531},[12764],{"type":51,"value":2161},{"type":46,"tag":470,"props":12766,"children":12767},{"class":472,"line":3082},[12768,12772,12776,12780,12784,12789,12793,12797,12801,12805,12809,12814,12818],{"type":46,"tag":470,"props":12769,"children":12770},{"style":531},[12771],{"type":51,"value":12430},{"type":46,"tag":470,"props":12773,"children":12774},{"style":2780},[12775],{"type":51,"value":12435},{"type":46,"tag":470,"props":12777,"children":12778},{"style":531},[12779],{"type":51,"value":417},{"type":46,"tag":470,"props":12781,"children":12782},{"style":531},[12783],{"type":51,"value":555},{"type":46,"tag":470,"props":12785,"children":12786},{"style":483},[12787],{"type":51,"value":12788},"unlocked",{"type":46,"tag":470,"props":12790,"children":12791},{"style":531},[12792],{"type":51,"value":565},{"type":46,"tag":470,"props":12794,"children":12795},{"style":531},[12796],{"type":51,"value":604},{"type":46,"tag":470,"props":12798,"children":12799},{"style":2780},[12800],{"type":51,"value":10714},{"type":46,"tag":470,"props":12802,"children":12803},{"style":531},[12804],{"type":51,"value":417},{"type":46,"tag":470,"props":12806,"children":12807},{"style":531},[12808],{"type":51,"value":555},{"type":46,"tag":470,"props":12810,"children":12811},{"style":483},[12812],{"type":51,"value":12813},"bool",{"type":46,"tag":470,"props":12815,"children":12816},{"style":531},[12817],{"type":51,"value":565},{"type":46,"tag":470,"props":12819,"children":12820},{"style":531},[12821],{"type":51,"value":2161},{"type":46,"tag":470,"props":12823,"children":12824},{"class":472,"line":3106},[12825,12830],{"type":46,"tag":470,"props":12826,"children":12827},{"style":537},[12828],{"type":51,"value":12829},"      ]",{"type":46,"tag":470,"props":12831,"children":12832},{"style":531},[12833],{"type":51,"value":1007},{"type":46,"tag":470,"props":12835,"children":12836},{"class":472,"line":3115},[12837],{"type":46,"tag":470,"props":12838,"children":12839},{"style":531},[12840],{"type":51,"value":3112},{"type":46,"tag":470,"props":12842,"children":12843},{"class":472,"line":3152},[12844,12849],{"type":46,"tag":470,"props":12845,"children":12846},{"style":537},[12847],{"type":51,"value":12848},"  ]",{"type":46,"tag":470,"props":12850,"children":12851},{"style":531},[12852],{"type":51,"value":1007},{"type":46,"tag":470,"props":12854,"children":12855},{"class":472,"line":3185},[12856,12860,12864,12868,12872,12876],{"type":46,"tag":470,"props":12857,"children":12858},{"style":2780},[12859],{"type":51,"value":10900},{"type":46,"tag":470,"props":12861,"children":12862},{"style":531},[12863],{"type":51,"value":417},{"type":46,"tag":470,"props":12865,"children":12866},{"style":531},[12867],{"type":51,"value":555},{"type":46,"tag":470,"props":12869,"children":12870},{"style":483},[12871],{"type":51,"value":12321},{"type":46,"tag":470,"props":12873,"children":12874},{"style":531},[12875],{"type":51,"value":565},{"type":46,"tag":470,"props":12877,"children":12878},{"style":531},[12879],{"type":51,"value":1007},{"type":46,"tag":470,"props":12881,"children":12882},{"class":472,"line":3193},[12883,12887,12891],{"type":46,"tag":470,"props":12884,"children":12885},{"style":531},[12886],{"type":51,"value":614},{"type":46,"tag":470,"props":12888,"children":12889},{"style":537},[12890],{"type":51,"value":842},{"type":46,"tag":470,"props":12892,"children":12893},{"style":531},[12894],{"type":51,"value":570},{"type":46,"tag":470,"props":12896,"children":12897},{"class":472,"line":3287},[12898,12902,12907,12911,12915,12919,12923,12927,12931],{"type":46,"tag":470,"props":12899,"children":12900},{"style":587},[12901],{"type":51,"value":590},{"type":46,"tag":470,"props":12903,"children":12904},{"style":537},[12905],{"type":51,"value":12906}," liquidity ",{"type":46,"tag":470,"props":12908,"children":12909},{"style":531},[12910],{"type":51,"value":3438},{"type":46,"tag":470,"props":12912,"children":12913},{"style":525},[12914],{"type":51,"value":3443},{"type":46,"tag":470,"props":12916,"children":12917},{"style":537},[12918],{"type":51,"value":10833},{"type":46,"tag":470,"props":12920,"children":12921},{"style":531},[12922],{"type":51,"value":628},{"type":46,"tag":470,"props":12924,"children":12925},{"style":631},[12926],{"type":51,"value":10842},{"type":46,"tag":470,"props":12928,"children":12929},{"style":537},[12930],{"type":51,"value":835},{"type":46,"tag":470,"props":12932,"children":12933},{"style":531},[12934],{"type":51,"value":967},{"type":46,"tag":470,"props":12936,"children":12937},{"class":472,"line":8743},[12938,12942,12946,12950],{"type":46,"tag":470,"props":12939,"children":12940},{"style":2780},[12941],{"type":51,"value":10858},{"type":46,"tag":470,"props":12943,"children":12944},{"style":531},[12945],{"type":51,"value":417},{"type":46,"tag":470,"props":12947,"children":12948},{"style":537},[12949],{"type":51,"value":12274},{"type":46,"tag":470,"props":12951,"children":12952},{"style":531},[12953],{"type":51,"value":1007},{"type":46,"tag":470,"props":12955,"children":12956},{"class":472,"line":8752},[12957,12961,12965],{"type":46,"tag":470,"props":12958,"children":12959},{"style":2780},[12960],{"type":51,"value":10879},{"type":46,"tag":470,"props":12962,"children":12963},{"style":531},[12964],{"type":51,"value":417},{"type":46,"tag":470,"props":12966,"children":12967},{"style":537},[12968],{"type":51,"value":2909},{"type":46,"tag":470,"props":12970,"children":12971},{"class":472,"line":8773},[12972],{"type":46,"tag":470,"props":12973,"children":12974},{"style":531},[12975],{"type":51,"value":7634},{"type":46,"tag":470,"props":12977,"children":12978},{"class":472,"line":8794},[12979,12983,12987,12991,12996,13000],{"type":46,"tag":470,"props":12980,"children":12981},{"style":2780},[12982],{"type":51,"value":12308},{"type":46,"tag":470,"props":12984,"children":12985},{"style":531},[12986],{"type":51,"value":417},{"type":46,"tag":470,"props":12988,"children":12989},{"style":531},[12990],{"type":51,"value":555},{"type":46,"tag":470,"props":12992,"children":12993},{"style":483},[12994],{"type":51,"value":12995},"liquidity",{"type":46,"tag":470,"props":12997,"children":12998},{"style":531},[12999],{"type":51,"value":565},{"type":46,"tag":470,"props":13001,"children":13002},{"style":531},[13003],{"type":51,"value":1007},{"type":46,"tag":470,"props":13005,"children":13006},{"class":472,"line":8802},[13007,13011,13015,13019,13023,13027],{"type":46,"tag":470,"props":13008,"children":13009},{"style":2780},[13010],{"type":51,"value":12337},{"type":46,"tag":470,"props":13012,"children":13013},{"style":531},[13014],{"type":51,"value":417},{"type":46,"tag":470,"props":13016,"children":13017},{"style":531},[13018],{"type":51,"value":555},{"type":46,"tag":470,"props":13020,"children":13021},{"style":483},[13022],{"type":51,"value":4362},{"type":46,"tag":470,"props":13024,"children":13025},{"style":531},[13026],{"type":51,"value":565},{"type":46,"tag":470,"props":13028,"children":13029},{"style":531},[13030],{"type":51,"value":1007},{"type":46,"tag":470,"props":13032,"children":13033},{"class":472,"line":29},[13034,13038,13042,13046,13050,13054],{"type":46,"tag":470,"props":13035,"children":13036},{"style":2780},[13037],{"type":51,"value":12365},{"type":46,"tag":470,"props":13039,"children":13040},{"style":531},[13041],{"type":51,"value":417},{"type":46,"tag":470,"props":13043,"children":13044},{"style":531},[13045],{"type":51,"value":555},{"type":46,"tag":470,"props":13047,"children":13048},{"style":483},[13049],{"type":51,"value":12378},{"type":46,"tag":470,"props":13051,"children":13052},{"style":531},[13053],{"type":51,"value":565},{"type":46,"tag":470,"props":13055,"children":13056},{"style":531},[13057],{"type":51,"value":1007},{"type":46,"tag":470,"props":13059,"children":13060},{"class":472,"line":8858},[13061,13065,13069,13073],{"type":46,"tag":470,"props":13062,"children":13063},{"style":2780},[13064],{"type":51,"value":12394},{"type":46,"tag":470,"props":13066,"children":13067},{"style":531},[13068],{"type":51,"value":417},{"type":46,"tag":470,"props":13070,"children":13071},{"style":537},[13072],{"type":51,"value":12403},{"type":46,"tag":470,"props":13074,"children":13075},{"style":531},[13076],{"type":51,"value":1007},{"type":46,"tag":470,"props":13078,"children":13079},{"class":472,"line":8866},[13080,13084,13088,13092,13096,13100,13104,13108,13113,13117,13121,13125],{"type":46,"tag":470,"props":13081,"children":13082},{"style":2780},[13083],{"type":51,"value":8618},{"type":46,"tag":470,"props":13085,"children":13086},{"style":531},[13087],{"type":51,"value":417},{"type":46,"tag":470,"props":13089,"children":13090},{"style":537},[13091],{"type":51,"value":7102},{"type":46,"tag":470,"props":13093,"children":13094},{"style":531},[13095],{"type":51,"value":11217},{"type":46,"tag":470,"props":13097,"children":13098},{"style":2780},[13099],{"type":51,"value":10714},{"type":46,"tag":470,"props":13101,"children":13102},{"style":531},[13103],{"type":51,"value":417},{"type":46,"tag":470,"props":13105,"children":13106},{"style":531},[13107],{"type":51,"value":555},{"type":46,"tag":470,"props":13109,"children":13110},{"style":483},[13111],{"type":51,"value":13112},"uint128",{"type":46,"tag":470,"props":13114,"children":13115},{"style":531},[13116],{"type":51,"value":565},{"type":46,"tag":470,"props":13118,"children":13119},{"style":531},[13120],{"type":51,"value":545},{"type":46,"tag":470,"props":13122,"children":13123},{"style":537},[13124],{"type":51,"value":7119},{"type":46,"tag":470,"props":13126,"children":13127},{"style":531},[13128],{"type":51,"value":1007},{"type":46,"tag":470,"props":13130,"children":13131},{"class":472,"line":8874},[13132],{"type":46,"tag":470,"props":13133,"children":13134},{"style":531},[13135],{"type":51,"value":3112},{"type":46,"tag":470,"props":13137,"children":13138},{"class":472,"line":8906},[13139,13143],{"type":46,"tag":470,"props":13140,"children":13141},{"style":537},[13142],{"type":51,"value":12848},{"type":46,"tag":470,"props":13144,"children":13145},{"style":531},[13146],{"type":51,"value":1007},{"type":46,"tag":470,"props":13148,"children":13149},{"class":472,"line":8914},[13150,13154,13158,13162,13166,13170],{"type":46,"tag":470,"props":13151,"children":13152},{"style":2780},[13153],{"type":51,"value":10900},{"type":46,"tag":470,"props":13155,"children":13156},{"style":531},[13157],{"type":51,"value":417},{"type":46,"tag":470,"props":13159,"children":13160},{"style":531},[13161],{"type":51,"value":555},{"type":46,"tag":470,"props":13163,"children":13164},{"style":483},[13165],{"type":51,"value":12995},{"type":46,"tag":470,"props":13167,"children":13168},{"style":531},[13169],{"type":51,"value":565},{"type":46,"tag":470,"props":13171,"children":13172},{"style":531},[13173],{"type":51,"value":1007},{"type":46,"tag":470,"props":13175,"children":13176},{"class":472,"line":8923},[13177,13181,13185],{"type":46,"tag":470,"props":13178,"children":13179},{"style":531},[13180],{"type":51,"value":614},{"type":46,"tag":470,"props":13182,"children":13183},{"style":537},[13184],{"type":51,"value":842},{"type":46,"tag":470,"props":13186,"children":13187},{"style":531},[13188],{"type":51,"value":570},{"type":46,"tag":470,"props":13190,"children":13191},{"class":472,"line":8975},[13192],{"type":46,"tag":470,"props":13193,"children":13194},{"emptyLinePlaceholder":577},[13195],{"type":51,"value":580},{"type":46,"tag":470,"props":13197,"children":13198},{"class":472,"line":9079},[13199,13203,13208,13212,13216,13220,13225,13229,13234,13238,13243,13247,13252,13256,13260,13264,13269,13273,13277,13282,13286,13290,13294,13298,13302,13306,13311],{"type":46,"tag":470,"props":13200,"children":13201},{"style":587},[13202],{"type":51,"value":590},{"type":46,"tag":470,"props":13204,"children":13205},{"style":537},[13206],{"type":51,"value":13207}," pool ",{"type":46,"tag":470,"props":13209,"children":13210},{"style":531},[13211],{"type":51,"value":3438},{"type":46,"tag":470,"props":13213,"children":13214},{"style":531},[13215],{"type":51,"value":4534},{"type":46,"tag":470,"props":13217,"children":13218},{"style":631},[13219],{"type":51,"value":12170},{"type":46,"tag":470,"props":13221,"children":13222},{"style":537},[13223],{"type":51,"value":13224},"(tokenIn",{"type":46,"tag":470,"props":13226,"children":13227},{"style":531},[13228],{"type":51,"value":604},{"type":46,"tag":470,"props":13230,"children":13231},{"style":537},[13232],{"type":51,"value":13233}," tokenOut",{"type":46,"tag":470,"props":13235,"children":13236},{"style":531},[13237],{"type":51,"value":604},{"type":46,"tag":470,"props":13239,"children":13240},{"style":537},[13241],{"type":51,"value":13242}," fee",{"type":46,"tag":470,"props":13244,"children":13245},{"style":531},[13246],{"type":51,"value":604},{"type":46,"tag":470,"props":13248,"children":13249},{"style":537},[13250],{"type":51,"value":13251}," slot0[",{"type":46,"tag":470,"props":13253,"children":13254},{"style":1105},[13255],{"type":51,"value":1303},{"type":46,"tag":470,"props":13257,"children":13258},{"style":537},[13259],{"type":51,"value":7119},{"type":46,"tag":470,"props":13261,"children":13262},{"style":531},[13263],{"type":51,"value":628},{"type":46,"tag":470,"props":13265,"children":13266},{"style":631},[13267],{"type":51,"value":13268},"toString",{"type":46,"tag":470,"props":13270,"children":13271},{"style":537},[13272],{"type":51,"value":7810},{"type":46,"tag":470,"props":13274,"children":13275},{"style":531},[13276],{"type":51,"value":604},{"type":46,"tag":470,"props":13278,"children":13279},{"style":537},[13280],{"type":51,"value":13281}," liquidity",{"type":46,"tag":470,"props":13283,"children":13284},{"style":531},[13285],{"type":51,"value":628},{"type":46,"tag":470,"props":13287,"children":13288},{"style":631},[13289],{"type":51,"value":13268},{"type":46,"tag":470,"props":13291,"children":13292},{"style":537},[13293],{"type":51,"value":7810},{"type":46,"tag":470,"props":13295,"children":13296},{"style":531},[13297],{"type":51,"value":604},{"type":46,"tag":470,"props":13299,"children":13300},{"style":537},[13301],{"type":51,"value":13251},{"type":46,"tag":470,"props":13303,"children":13304},{"style":1105},[13305],{"type":51,"value":1556},{"type":46,"tag":470,"props":13307,"children":13308},{"style":537},[13309],{"type":51,"value":13310},"])",{"type":46,"tag":470,"props":13312,"children":13313},{"style":531},[13314],{"type":51,"value":570},{"type":46,"tag":470,"props":13316,"children":13317},{"class":472,"line":9087},[13318],{"type":46,"tag":470,"props":13319,"children":13320},{"emptyLinePlaceholder":577},[13321],{"type":51,"value":580},{"type":46,"tag":470,"props":13323,"children":13324},{"class":472,"line":9095},[13325],{"type":46,"tag":470,"props":13326,"children":13327},{"style":3418},[13328],{"type":51,"value":13329},"\u002F\u002F 2. Build route and trade\n",{"type":46,"tag":470,"props":13331,"children":13332},{"class":472,"line":9104},[13333,13337,13342,13346,13350,13354,13359,13363,13368,13372,13377],{"type":46,"tag":470,"props":13334,"children":13335},{"style":587},[13336],{"type":51,"value":590},{"type":46,"tag":470,"props":13338,"children":13339},{"style":537},[13340],{"type":51,"value":13341}," route ",{"type":46,"tag":470,"props":13343,"children":13344},{"style":531},[13345],{"type":51,"value":3438},{"type":46,"tag":470,"props":13347,"children":13348},{"style":531},[13349],{"type":51,"value":4534},{"type":46,"tag":470,"props":13351,"children":13352},{"style":631},[13353],{"type":51,"value":12161},{"type":46,"tag":470,"props":13355,"children":13356},{"style":537},[13357],{"type":51,"value":13358},"([pool]",{"type":46,"tag":470,"props":13360,"children":13361},{"style":531},[13362],{"type":51,"value":604},{"type":46,"tag":470,"props":13364,"children":13365},{"style":537},[13366],{"type":51,"value":13367}," tokenIn",{"type":46,"tag":470,"props":13369,"children":13370},{"style":531},[13371],{"type":51,"value":604},{"type":46,"tag":470,"props":13373,"children":13374},{"style":537},[13375],{"type":51,"value":13376}," tokenOut)",{"type":46,"tag":470,"props":13378,"children":13379},{"style":531},[13380],{"type":51,"value":570},{"type":46,"tag":470,"props":13382,"children":13383},{"class":472,"line":9145},[13384,13388,13392,13396,13400,13404,13409,13413],{"type":46,"tag":470,"props":13385,"children":13386},{"style":587},[13387],{"type":51,"value":590},{"type":46,"tag":470,"props":13389,"children":13390},{"style":537},[13391],{"type":51,"value":9979},{"type":46,"tag":470,"props":13393,"children":13394},{"style":531},[13395],{"type":51,"value":3438},{"type":46,"tag":470,"props":13397,"children":13398},{"style":537},[13399],{"type":51,"value":9992},{"type":46,"tag":470,"props":13401,"children":13402},{"style":531},[13403],{"type":51,"value":628},{"type":46,"tag":470,"props":13405,"children":13406},{"style":631},[13407],{"type":51,"value":13408},"createUncheckedTrade",{"type":46,"tag":470,"props":13410,"children":13411},{"style":537},[13412],{"type":51,"value":835},{"type":46,"tag":470,"props":13414,"children":13415},{"style":531},[13416],{"type":51,"value":967},{"type":46,"tag":470,"props":13418,"children":13419},{"class":472,"line":9178},[13420,13425],{"type":46,"tag":470,"props":13421,"children":13422},{"style":537},[13423],{"type":51,"value":13424},"  route",{"type":46,"tag":470,"props":13426,"children":13427},{"style":531},[13428],{"type":51,"value":1007},{"type":46,"tag":470,"props":13430,"children":13431},{"class":472,"line":9241},[13432,13437,13441,13446],{"type":46,"tag":470,"props":13433,"children":13434},{"style":2780},[13435],{"type":51,"value":13436},"  inputAmount",{"type":46,"tag":470,"props":13438,"children":13439},{"style":531},[13440],{"type":51,"value":417},{"type":46,"tag":470,"props":13442,"children":13443},{"style":537},[13444],{"type":51,"value":13445}," amountIn",{"type":46,"tag":470,"props":13447,"children":13448},{"style":531},[13449],{"type":51,"value":1007},{"type":46,"tag":470,"props":13451,"children":13452},{"class":472,"line":9304},[13453,13458,13462,13467],{"type":46,"tag":470,"props":13454,"children":13455},{"style":2780},[13456],{"type":51,"value":13457},"  outputAmount",{"type":46,"tag":470,"props":13459,"children":13460},{"style":531},[13461],{"type":51,"value":417},{"type":46,"tag":470,"props":13463,"children":13464},{"style":537},[13465],{"type":51,"value":13466}," expectedOut",{"type":46,"tag":470,"props":13468,"children":13469},{"style":531},[13470],{"type":51,"value":1007},{"type":46,"tag":470,"props":13472,"children":13473},{"class":472,"line":9313},[13474,13478,13482,13486,13490,13494],{"type":46,"tag":470,"props":13475,"children":13476},{"style":2780},[13477],{"type":51,"value":10036},{"type":46,"tag":470,"props":13479,"children":13480},{"style":531},[13481],{"type":51,"value":417},{"type":46,"tag":470,"props":13483,"children":13484},{"style":537},[13485],{"type":51,"value":9931},{"type":46,"tag":470,"props":13487,"children":13488},{"style":531},[13489],{"type":51,"value":628},{"type":46,"tag":470,"props":13491,"children":13492},{"style":537},[13493],{"type":51,"value":1665},{"type":46,"tag":470,"props":13495,"children":13496},{"style":531},[13497],{"type":51,"value":1007},{"type":46,"tag":470,"props":13499,"children":13500},{"class":472,"line":9337},[13501,13505,13509],{"type":46,"tag":470,"props":13502,"children":13503},{"style":531},[13504],{"type":51,"value":614},{"type":46,"tag":470,"props":13506,"children":13507},{"style":537},[13508],{"type":51,"value":842},{"type":46,"tag":470,"props":13510,"children":13511},{"style":531},[13512],{"type":51,"value":570},{"type":46,"tag":470,"props":13514,"children":13515},{"class":472,"line":9345},[13516],{"type":46,"tag":470,"props":13517,"children":13518},{"emptyLinePlaceholder":577},[13519],{"type":51,"value":580},{"type":46,"tag":470,"props":13521,"children":13522},{"class":472,"line":9385},[13523],{"type":46,"tag":470,"props":13524,"children":13525},{"style":3418},[13526],{"type":51,"value":13527},"\u002F\u002F 3. Get calldata\n",{"type":46,"tag":470,"props":13529,"children":13531},{"class":472,"line":13530},55,[13532,13536,13540,13544,13548,13552,13556,13560,13564,13568,13572,13576,13580],{"type":46,"tag":470,"props":13533,"children":13534},{"style":587},[13535],{"type":51,"value":590},{"type":46,"tag":470,"props":13537,"children":13538},{"style":531},[13539],{"type":51,"value":534},{"type":46,"tag":470,"props":13541,"children":13542},{"style":537},[13543],{"type":51,"value":599},{"type":46,"tag":470,"props":13545,"children":13546},{"style":531},[13547],{"type":51,"value":604},{"type":46,"tag":470,"props":13549,"children":13550},{"style":537},[13551],{"type":51,"value":609},{"type":46,"tag":470,"props":13553,"children":13554},{"style":531},[13555],{"type":51,"value":614},{"type":46,"tag":470,"props":13557,"children":13558},{"style":531},[13559],{"type":51,"value":619},{"type":46,"tag":470,"props":13561,"children":13562},{"style":537},[13563],{"type":51,"value":540},{"type":46,"tag":470,"props":13565,"children":13566},{"style":531},[13567],{"type":51,"value":628},{"type":46,"tag":470,"props":13569,"children":13570},{"style":631},[13571],{"type":51,"value":634},{"type":46,"tag":470,"props":13573,"children":13574},{"style":537},[13575],{"type":51,"value":639},{"type":46,"tag":470,"props":13577,"children":13578},{"style":531},[13579],{"type":51,"value":604},{"type":46,"tag":470,"props":13581,"children":13582},{"style":531},[13583],{"type":51,"value":1165},{"type":46,"tag":470,"props":13585,"children":13587},{"class":472,"line":13586},56,[13588,13592,13596,13600,13604,13608,13612,13616,13620,13624,13628],{"type":46,"tag":470,"props":13589,"children":13590},{"style":2780},[13591],{"type":51,"value":10143},{"type":46,"tag":470,"props":13593,"children":13594},{"style":531},[13595],{"type":51,"value":417},{"type":46,"tag":470,"props":13597,"children":13598},{"style":531},[13599],{"type":51,"value":4534},{"type":46,"tag":470,"props":13601,"children":13602},{"style":631},[13603],{"type":51,"value":10156},{"type":46,"tag":470,"props":13605,"children":13606},{"style":537},[13607],{"type":51,"value":835},{"type":46,"tag":470,"props":13609,"children":13610},{"style":1105},[13611],{"type":51,"value":10165},{"type":46,"tag":470,"props":13613,"children":13614},{"style":531},[13615],{"type":51,"value":604},{"type":46,"tag":470,"props":13617,"children":13618},{"style":1105},[13619],{"type":51,"value":10174},{"type":46,"tag":470,"props":13621,"children":13622},{"style":537},[13623],{"type":51,"value":842},{"type":46,"tag":470,"props":13625,"children":13626},{"style":531},[13627],{"type":51,"value":604},{"type":46,"tag":470,"props":13629,"children":13630},{"style":3418},[13631],{"type":51,"value":10187},{"type":46,"tag":470,"props":13633,"children":13635},{"class":472,"line":13634},57,[13636,13640,13644,13648],{"type":46,"tag":470,"props":13637,"children":13638},{"style":2780},[13639],{"type":51,"value":8474},{"type":46,"tag":470,"props":13641,"children":13642},{"style":531},[13643],{"type":51,"value":417},{"type":46,"tag":470,"props":13645,"children":13646},{"style":537},[13647],{"type":51,"value":10203},{"type":46,"tag":470,"props":13649,"children":13650},{"style":531},[13651],{"type":51,"value":1007},{"type":46,"tag":470,"props":13653,"children":13655},{"class":472,"line":13654},58,[13656,13660,13664,13668,13672,13676,13680,13684,13688,13692,13696,13700,13704,13708,13713],{"type":46,"tag":470,"props":13657,"children":13658},{"style":2780},[13659],{"type":51,"value":10215},{"type":46,"tag":470,"props":13661,"children":13662},{"style":531},[13663],{"type":51,"value":417},{"type":46,"tag":470,"props":13665,"children":13666},{"style":537},[13667],{"type":51,"value":10224},{"type":46,"tag":470,"props":13669,"children":13670},{"style":531},[13671],{"type":51,"value":628},{"type":46,"tag":470,"props":13673,"children":13674},{"style":631},[13675],{"type":51,"value":10233},{"type":46,"tag":470,"props":13677,"children":13678},{"style":537},[13679],{"type":51,"value":10238},{"type":46,"tag":470,"props":13681,"children":13682},{"style":531},[13683],{"type":51,"value":628},{"type":46,"tag":470,"props":13685,"children":13686},{"style":631},[13687],{"type":51,"value":10247},{"type":46,"tag":470,"props":13689,"children":13690},{"style":537},[13691],{"type":51,"value":10252},{"type":46,"tag":470,"props":13693,"children":13694},{"style":531},[13695],{"type":51,"value":7480},{"type":46,"tag":470,"props":13697,"children":13698},{"style":1105},[13699],{"type":51,"value":10261},{"type":46,"tag":470,"props":13701,"children":13702},{"style":537},[13703],{"type":51,"value":3781},{"type":46,"tag":470,"props":13705,"children":13706},{"style":531},[13707],{"type":51,"value":10270},{"type":46,"tag":470,"props":13709,"children":13710},{"style":1105},[13711],{"type":51,"value":13712}," 1800",{"type":46,"tag":470,"props":13714,"children":13715},{"style":531},[13716],{"type":51,"value":1007},{"type":46,"tag":470,"props":13718,"children":13720},{"class":472,"line":13719},59,[13721,13725,13729],{"type":46,"tag":470,"props":13722,"children":13723},{"style":531},[13724],{"type":51,"value":614},{"type":46,"tag":470,"props":13726,"children":13727},{"style":537},[13728],{"type":51,"value":842},{"type":46,"tag":470,"props":13730,"children":13731},{"style":531},[13732],{"type":51,"value":570},{"type":46,"tag":470,"props":13734,"children":13736},{"class":472,"line":13735},60,[13737],{"type":46,"tag":470,"props":13738,"children":13739},{"emptyLinePlaceholder":577},[13740],{"type":51,"value":580},{"type":46,"tag":470,"props":13742,"children":13744},{"class":472,"line":13743},61,[13745],{"type":46,"tag":470,"props":13746,"children":13747},{"style":3418},[13748],{"type":51,"value":13749},"\u002F\u002F 4. Execute with viem\n",{"type":46,"tag":470,"props":13751,"children":13753},{"class":472,"line":13752},62,[13754,13758,13763,13767,13771,13775,13779,13783,13787],{"type":46,"tag":470,"props":13755,"children":13756},{"style":587},[13757],{"type":51,"value":590},{"type":46,"tag":470,"props":13759,"children":13760},{"style":537},[13761],{"type":51,"value":13762}," hash ",{"type":46,"tag":470,"props":13764,"children":13765},{"style":531},[13766],{"type":51,"value":3438},{"type":46,"tag":470,"props":13768,"children":13769},{"style":525},[13770],{"type":51,"value":3443},{"type":46,"tag":470,"props":13772,"children":13773},{"style":537},[13774],{"type":51,"value":11049},{"type":46,"tag":470,"props":13776,"children":13777},{"style":531},[13778],{"type":51,"value":628},{"type":46,"tag":470,"props":13780,"children":13781},{"style":631},[13782],{"type":51,"value":898},{"type":46,"tag":470,"props":13784,"children":13785},{"style":537},[13786],{"type":51,"value":835},{"type":46,"tag":470,"props":13788,"children":13789},{"style":531},[13790],{"type":51,"value":967},{"type":46,"tag":470,"props":13792,"children":13794},{"class":472,"line":13793},63,[13795,13799,13803,13807],{"type":46,"tag":470,"props":13796,"children":13797},{"style":2780},[13798],{"type":51,"value":10355},{"type":46,"tag":470,"props":13800,"children":13801},{"style":531},[13802],{"type":51,"value":417},{"type":46,"tag":470,"props":13804,"children":13805},{"style":537},[13806],{"type":51,"value":10364},{"type":46,"tag":470,"props":13808,"children":13809},{"style":531},[13810],{"type":51,"value":1007},{"type":46,"tag":470,"props":13812,"children":13814},{"class":472,"line":13813},64,[13815,13819,13823,13827],{"type":46,"tag":470,"props":13816,"children":13817},{"style":2780},[13818],{"type":51,"value":10376},{"type":46,"tag":470,"props":13820,"children":13821},{"style":531},[13822],{"type":51,"value":417},{"type":46,"tag":470,"props":13824,"children":13825},{"style":537},[13826],{"type":51,"value":599},{"type":46,"tag":470,"props":13828,"children":13829},{"style":531},[13830],{"type":51,"value":1007},{"type":46,"tag":470,"props":13832,"children":13834},{"class":472,"line":13833},65,[13835,13840,13844,13849,13854],{"type":46,"tag":470,"props":13836,"children":13837},{"style":2780},[13838],{"type":51,"value":13839},"  value",{"type":46,"tag":470,"props":13841,"children":13842},{"style":531},[13843],{"type":51,"value":417},{"type":46,"tag":470,"props":13845,"children":13846},{"style":631},[13847],{"type":51,"value":13848}," BigInt",{"type":46,"tag":470,"props":13850,"children":13851},{"style":537},[13852],{"type":51,"value":13853},"(value)",{"type":46,"tag":470,"props":13855,"children":13856},{"style":531},[13857],{"type":51,"value":1007},{"type":46,"tag":470,"props":13859,"children":13861},{"class":472,"line":13860},66,[13862,13866,13870],{"type":46,"tag":470,"props":13863,"children":13864},{"style":531},[13865],{"type":51,"value":614},{"type":46,"tag":470,"props":13867,"children":13868},{"style":537},[13869],{"type":51,"value":842},{"type":46,"tag":470,"props":13871,"children":13872},{"style":531},[13873],{"type":51,"value":570},{"type":46,"tag":172,"props":13875,"children":13877},{"id":13876},"low-level-approach-manual-commands",[13878],{"type":51,"value":13879},"Low-Level Approach (Manual Commands)",{"type":46,"tag":54,"props":13881,"children":13882},{},[13883,13885,13891],{"type":51,"value":13884},"For custom flows (fee collection, complex routing), use ",{"type":46,"tag":80,"props":13886,"children":13888},{"className":13887},[],[13889],{"type":51,"value":13890},"RoutePlanner",{"type":51,"value":13892}," directly:",{"type":46,"tag":397,"props":13894,"children":13896},{"className":513,"code":13895,"language":515,"meta":402,"style":402},"import { RoutePlanner, CommandType, ROUTER_AS_RECIPIENT } from '@uniswap\u002Funiversal-router-sdk';\nimport { encodeRouteToPath } from '@uniswap\u002Fv3-sdk';\n\n\u002F\u002F Special addresses\nconst MSG_SENDER = '0x0000000000000000000000000000000000000001';\nconst ADDRESS_THIS = '0x0000000000000000000000000000000000000002';\n",[13897],{"type":46,"tag":80,"props":13898,"children":13899},{"__ignoreMap":402},[13900,13958,13998,14005,14013,14046],{"type":46,"tag":470,"props":13901,"children":13902},{"class":472,"line":473},[13903,13907,13911,13916,13920,13925,13929,13934,13938,13942,13946,13950,13954],{"type":46,"tag":470,"props":13904,"children":13905},{"style":525},[13906],{"type":51,"value":528},{"type":46,"tag":470,"props":13908,"children":13909},{"style":531},[13910],{"type":51,"value":534},{"type":46,"tag":470,"props":13912,"children":13913},{"style":537},[13914],{"type":51,"value":13915}," RoutePlanner",{"type":46,"tag":470,"props":13917,"children":13918},{"style":531},[13919],{"type":51,"value":604},{"type":46,"tag":470,"props":13921,"children":13922},{"style":537},[13923],{"type":51,"value":13924}," CommandType",{"type":46,"tag":470,"props":13926,"children":13927},{"style":531},[13928],{"type":51,"value":604},{"type":46,"tag":470,"props":13930,"children":13931},{"style":537},[13932],{"type":51,"value":13933}," ROUTER_AS_RECIPIENT",{"type":46,"tag":470,"props":13935,"children":13936},{"style":531},[13937],{"type":51,"value":545},{"type":46,"tag":470,"props":13939,"children":13940},{"style":525},[13941],{"type":51,"value":550},{"type":46,"tag":470,"props":13943,"children":13944},{"style":531},[13945],{"type":51,"value":555},{"type":46,"tag":470,"props":13947,"children":13948},{"style":483},[13949],{"type":51,"value":560},{"type":46,"tag":470,"props":13951,"children":13952},{"style":531},[13953],{"type":51,"value":565},{"type":46,"tag":470,"props":13955,"children":13956},{"style":531},[13957],{"type":51,"value":570},{"type":46,"tag":470,"props":13959,"children":13960},{"class":472,"line":573},[13961,13965,13969,13974,13978,13982,13986,13990,13994],{"type":46,"tag":470,"props":13962,"children":13963},{"style":525},[13964],{"type":51,"value":528},{"type":46,"tag":470,"props":13966,"children":13967},{"style":531},[13968],{"type":51,"value":534},{"type":46,"tag":470,"props":13970,"children":13971},{"style":537},[13972],{"type":51,"value":13973}," encodeRouteToPath",{"type":46,"tag":470,"props":13975,"children":13976},{"style":531},[13977],{"type":51,"value":545},{"type":46,"tag":470,"props":13979,"children":13980},{"style":525},[13981],{"type":51,"value":550},{"type":46,"tag":470,"props":13983,"children":13984},{"style":531},[13985],{"type":51,"value":555},{"type":46,"tag":470,"props":13987,"children":13988},{"style":483},[13989],{"type":51,"value":12187},{"type":46,"tag":470,"props":13991,"children":13992},{"style":531},[13993],{"type":51,"value":565},{"type":46,"tag":470,"props":13995,"children":13996},{"style":531},[13997],{"type":51,"value":570},{"type":46,"tag":470,"props":13999,"children":14000},{"class":472,"line":583},[14001],{"type":46,"tag":470,"props":14002,"children":14003},{"emptyLinePlaceholder":577},[14004],{"type":51,"value":580},{"type":46,"tag":470,"props":14006,"children":14007},{"class":472,"line":1046},[14008],{"type":46,"tag":470,"props":14009,"children":14010},{"style":3418},[14011],{"type":51,"value":14012},"\u002F\u002F Special addresses\n",{"type":46,"tag":470,"props":14014,"children":14015},{"class":472,"line":1084},[14016,14020,14025,14029,14033,14038,14042],{"type":46,"tag":470,"props":14017,"children":14018},{"style":587},[14019],{"type":51,"value":590},{"type":46,"tag":470,"props":14021,"children":14022},{"style":537},[14023],{"type":51,"value":14024}," MSG_SENDER ",{"type":46,"tag":470,"props":14026,"children":14027},{"style":531},[14028],{"type":51,"value":3438},{"type":46,"tag":470,"props":14030,"children":14031},{"style":531},[14032],{"type":51,"value":555},{"type":46,"tag":470,"props":14034,"children":14035},{"style":483},[14036],{"type":51,"value":14037},"0x0000000000000000000000000000000000000001",{"type":46,"tag":470,"props":14039,"children":14040},{"style":531},[14041],{"type":51,"value":565},{"type":46,"tag":470,"props":14043,"children":14044},{"style":531},[14045],{"type":51,"value":570},{"type":46,"tag":470,"props":14047,"children":14048},{"class":472,"line":1111},[14049,14053,14058,14062,14066,14071,14075],{"type":46,"tag":470,"props":14050,"children":14051},{"style":587},[14052],{"type":51,"value":590},{"type":46,"tag":470,"props":14054,"children":14055},{"style":537},[14056],{"type":51,"value":14057}," ADDRESS_THIS ",{"type":46,"tag":470,"props":14059,"children":14060},{"style":531},[14061],{"type":51,"value":3438},{"type":46,"tag":470,"props":14063,"children":14064},{"style":531},[14065],{"type":51,"value":555},{"type":46,"tag":470,"props":14067,"children":14068},{"style":483},[14069],{"type":51,"value":14070},"0x0000000000000000000000000000000000000002",{"type":46,"tag":470,"props":14072,"children":14073},{"style":531},[14074],{"type":51,"value":565},{"type":46,"tag":470,"props":14076,"children":14077},{"style":531},[14078],{"type":51,"value":570},{"type":46,"tag":172,"props":14080,"children":14082},{"id":14081},"example-v3-swap-with-manual-commands",[14083],{"type":51,"value":14084},"Example: V3 Swap with Manual Commands",{"type":46,"tag":397,"props":14086,"children":14088},{"className":513,"code":14087,"language":515,"meta":402,"style":402},"import { RoutePlanner, CommandType } from '@uniswap\u002Funiversal-router-sdk';\nimport { encodeRouteToPath, Route } from '@uniswap\u002Fv3-sdk';\n\nasync function swapV3Manual(route: Route, amountIn: bigint, amountOutMin: bigint) {\n  const planner = new RoutePlanner();\n\n  \u002F\u002F Encode V3 path from route\n  const path = encodeRouteToPath(route, false); \u002F\u002F false = exactInput\n\n  planner.addCommand(CommandType.V3_SWAP_EXACT_IN, [\n    MSG_SENDER, \u002F\u002F recipient\n    amountIn, \u002F\u002F amountIn\n    amountOutMin, \u002F\u002F amountOutMin\n    path, \u002F\u002F encoded path\n    true, \u002F\u002F payerIsUser\n  ]);\n\n  return executeRoute(planner);\n}\n",[14089],{"type":46,"tag":80,"props":14090,"children":14091},{"__ignoreMap":402},[14092,14139,14186,14193,14269,14301,14308,14316,14365,14372,14414,14431,14448,14465,14482,14499,14511,14518,14547],{"type":46,"tag":470,"props":14093,"children":14094},{"class":472,"line":473},[14095,14099,14103,14107,14111,14115,14119,14123,14127,14131,14135],{"type":46,"tag":470,"props":14096,"children":14097},{"style":525},[14098],{"type":51,"value":528},{"type":46,"tag":470,"props":14100,"children":14101},{"style":531},[14102],{"type":51,"value":534},{"type":46,"tag":470,"props":14104,"children":14105},{"style":537},[14106],{"type":51,"value":13915},{"type":46,"tag":470,"props":14108,"children":14109},{"style":531},[14110],{"type":51,"value":604},{"type":46,"tag":470,"props":14112,"children":14113},{"style":537},[14114],{"type":51,"value":13924},{"type":46,"tag":470,"props":14116,"children":14117},{"style":531},[14118],{"type":51,"value":545},{"type":46,"tag":470,"props":14120,"children":14121},{"style":525},[14122],{"type":51,"value":550},{"type":46,"tag":470,"props":14124,"children":14125},{"style":531},[14126],{"type":51,"value":555},{"type":46,"tag":470,"props":14128,"children":14129},{"style":483},[14130],{"type":51,"value":560},{"type":46,"tag":470,"props":14132,"children":14133},{"style":531},[14134],{"type":51,"value":565},{"type":46,"tag":470,"props":14136,"children":14137},{"style":531},[14138],{"type":51,"value":570},{"type":46,"tag":470,"props":14140,"children":14141},{"class":472,"line":573},[14142,14146,14150,14154,14158,14162,14166,14170,14174,14178,14182],{"type":46,"tag":470,"props":14143,"children":14144},{"style":525},[14145],{"type":51,"value":528},{"type":46,"tag":470,"props":14147,"children":14148},{"style":531},[14149],{"type":51,"value":534},{"type":46,"tag":470,"props":14151,"children":14152},{"style":537},[14153],{"type":51,"value":13973},{"type":46,"tag":470,"props":14155,"children":14156},{"style":531},[14157],{"type":51,"value":604},{"type":46,"tag":470,"props":14159,"children":14160},{"style":537},[14161],{"type":51,"value":12152},{"type":46,"tag":470,"props":14163,"children":14164},{"style":531},[14165],{"type":51,"value":545},{"type":46,"tag":470,"props":14167,"children":14168},{"style":525},[14169],{"type":51,"value":550},{"type":46,"tag":470,"props":14171,"children":14172},{"style":531},[14173],{"type":51,"value":555},{"type":46,"tag":470,"props":14175,"children":14176},{"style":483},[14177],{"type":51,"value":12187},{"type":46,"tag":470,"props":14179,"children":14180},{"style":531},[14181],{"type":51,"value":565},{"type":46,"tag":470,"props":14183,"children":14184},{"style":531},[14185],{"type":51,"value":570},{"type":46,"tag":470,"props":14187,"children":14188},{"class":472,"line":583},[14189],{"type":46,"tag":470,"props":14190,"children":14191},{"emptyLinePlaceholder":577},[14192],{"type":51,"value":580},{"type":46,"tag":470,"props":14194,"children":14195},{"class":472,"line":1046},[14196,14201,14206,14211,14215,14219,14223,14227,14231,14235,14239,14244,14248,14253,14257,14261,14265],{"type":46,"tag":470,"props":14197,"children":14198},{"style":587},[14199],{"type":51,"value":14200},"async",{"type":46,"tag":470,"props":14202,"children":14203},{"style":587},[14204],{"type":51,"value":14205}," function",{"type":46,"tag":470,"props":14207,"children":14208},{"style":631},[14209],{"type":51,"value":14210}," swapV3Manual",{"type":46,"tag":470,"props":14212,"children":14213},{"style":531},[14214],{"type":51,"value":835},{"type":46,"tag":470,"props":14216,"children":14217},{"style":4374},[14218],{"type":51,"value":2290},{"type":46,"tag":470,"props":14220,"children":14221},{"style":531},[14222],{"type":51,"value":417},{"type":46,"tag":470,"props":14224,"children":14225},{"style":477},[14226],{"type":51,"value":12152},{"type":46,"tag":470,"props":14228,"children":14229},{"style":531},[14230],{"type":51,"value":604},{"type":46,"tag":470,"props":14232,"children":14233},{"style":4374},[14234],{"type":51,"value":13445},{"type":46,"tag":470,"props":14236,"children":14237},{"style":531},[14238],{"type":51,"value":417},{"type":46,"tag":470,"props":14240,"children":14241},{"style":477},[14242],{"type":51,"value":14243}," bigint",{"type":46,"tag":470,"props":14245,"children":14246},{"style":531},[14247],{"type":51,"value":604},{"type":46,"tag":470,"props":14249,"children":14250},{"style":4374},[14251],{"type":51,"value":14252}," amountOutMin",{"type":46,"tag":470,"props":14254,"children":14255},{"style":531},[14256],{"type":51,"value":417},{"type":46,"tag":470,"props":14258,"children":14259},{"style":477},[14260],{"type":51,"value":14243},{"type":46,"tag":470,"props":14262,"children":14263},{"style":531},[14264],{"type":51,"value":842},{"type":46,"tag":470,"props":14266,"children":14267},{"style":531},[14268],{"type":51,"value":1165},{"type":46,"tag":470,"props":14270,"children":14271},{"class":472,"line":1084},[14272,14276,14281,14285,14289,14293,14297],{"type":46,"tag":470,"props":14273,"children":14274},{"style":587},[14275],{"type":51,"value":5252},{"type":46,"tag":470,"props":14277,"children":14278},{"style":537},[14279],{"type":51,"value":14280}," planner",{"type":46,"tag":470,"props":14282,"children":14283},{"style":531},[14284],{"type":51,"value":619},{"type":46,"tag":470,"props":14286,"children":14287},{"style":531},[14288],{"type":51,"value":4534},{"type":46,"tag":470,"props":14290,"children":14291},{"style":631},[14292],{"type":51,"value":13915},{"type":46,"tag":470,"props":14294,"children":14295},{"style":2780},[14296],{"type":51,"value":7810},{"type":46,"tag":470,"props":14298,"children":14299},{"style":531},[14300],{"type":51,"value":570},{"type":46,"tag":470,"props":14302,"children":14303},{"class":472,"line":1111},[14304],{"type":46,"tag":470,"props":14305,"children":14306},{"emptyLinePlaceholder":577},[14307],{"type":51,"value":580},{"type":46,"tag":470,"props":14309,"children":14310},{"class":472,"line":1314},[14311],{"type":46,"tag":470,"props":14312,"children":14313},{"style":3418},[14314],{"type":51,"value":14315},"  \u002F\u002F Encode V3 path from route\n",{"type":46,"tag":470,"props":14317,"children":14318},{"class":472,"line":1338},[14319,14323,14327,14331,14335,14339,14343,14347,14352,14356,14360],{"type":46,"tag":470,"props":14320,"children":14321},{"style":587},[14322],{"type":51,"value":5252},{"type":46,"tag":470,"props":14324,"children":14325},{"style":537},[14326],{"type":51,"value":7462},{"type":46,"tag":470,"props":14328,"children":14329},{"style":531},[14330],{"type":51,"value":619},{"type":46,"tag":470,"props":14332,"children":14333},{"style":631},[14334],{"type":51,"value":13973},{"type":46,"tag":470,"props":14336,"children":14337},{"style":2780},[14338],{"type":51,"value":835},{"type":46,"tag":470,"props":14340,"children":14341},{"style":537},[14342],{"type":51,"value":2290},{"type":46,"tag":470,"props":14344,"children":14345},{"style":531},[14346],{"type":51,"value":604},{"type":46,"tag":470,"props":14348,"children":14349},{"style":7420},[14350],{"type":51,"value":14351}," false",{"type":46,"tag":470,"props":14353,"children":14354},{"style":2780},[14355],{"type":51,"value":842},{"type":46,"tag":470,"props":14357,"children":14358},{"style":531},[14359],{"type":51,"value":799},{"type":46,"tag":470,"props":14361,"children":14362},{"style":3418},[14363],{"type":51,"value":14364}," \u002F\u002F false = exactInput\n",{"type":46,"tag":470,"props":14366,"children":14367},{"class":472,"line":1347},[14368],{"type":46,"tag":470,"props":14369,"children":14370},{"emptyLinePlaceholder":577},[14371],{"type":51,"value":580},{"type":46,"tag":470,"props":14373,"children":14374},{"class":472,"line":1705},[14375,14380,14384,14389,14393,14398,14402,14406,14410],{"type":46,"tag":470,"props":14376,"children":14377},{"style":537},[14378],{"type":51,"value":14379},"  planner",{"type":46,"tag":470,"props":14381,"children":14382},{"style":531},[14383],{"type":51,"value":628},{"type":46,"tag":470,"props":14385,"children":14386},{"style":631},[14387],{"type":51,"value":14388},"addCommand",{"type":46,"tag":470,"props":14390,"children":14391},{"style":2780},[14392],{"type":51,"value":835},{"type":46,"tag":470,"props":14394,"children":14395},{"style":537},[14396],{"type":51,"value":14397},"CommandType",{"type":46,"tag":470,"props":14399,"children":14400},{"style":531},[14401],{"type":51,"value":628},{"type":46,"tag":470,"props":14403,"children":14404},{"style":537},[14405],{"type":51,"value":9594},{"type":46,"tag":470,"props":14407,"children":14408},{"style":531},[14409],{"type":51,"value":604},{"type":46,"tag":470,"props":14411,"children":14412},{"style":2780},[14413],{"type":51,"value":2909},{"type":46,"tag":470,"props":14415,"children":14416},{"class":472,"line":1740},[14417,14422,14426],{"type":46,"tag":470,"props":14418,"children":14419},{"style":537},[14420],{"type":51,"value":14421},"    MSG_SENDER",{"type":46,"tag":470,"props":14423,"children":14424},{"style":531},[14425],{"type":51,"value":604},{"type":46,"tag":470,"props":14427,"children":14428},{"style":3418},[14429],{"type":51,"value":14430}," \u002F\u002F recipient\n",{"type":46,"tag":470,"props":14432,"children":14433},{"class":472,"line":2421},[14434,14439,14443],{"type":46,"tag":470,"props":14435,"children":14436},{"style":537},[14437],{"type":51,"value":14438},"    amountIn",{"type":46,"tag":470,"props":14440,"children":14441},{"style":531},[14442],{"type":51,"value":604},{"type":46,"tag":470,"props":14444,"children":14445},{"style":3418},[14446],{"type":51,"value":14447}," \u002F\u002F amountIn\n",{"type":46,"tag":470,"props":14449,"children":14450},{"class":472,"line":2447},[14451,14456,14460],{"type":46,"tag":470,"props":14452,"children":14453},{"style":537},[14454],{"type":51,"value":14455},"    amountOutMin",{"type":46,"tag":470,"props":14457,"children":14458},{"style":531},[14459],{"type":51,"value":604},{"type":46,"tag":470,"props":14461,"children":14462},{"style":3418},[14463],{"type":51,"value":14464}," \u002F\u002F amountOutMin\n",{"type":46,"tag":470,"props":14466,"children":14467},{"class":472,"line":2877},[14468,14473,14477],{"type":46,"tag":470,"props":14469,"children":14470},{"style":537},[14471],{"type":51,"value":14472},"    path",{"type":46,"tag":470,"props":14474,"children":14475},{"style":531},[14476],{"type":51,"value":604},{"type":46,"tag":470,"props":14478,"children":14479},{"style":3418},[14480],{"type":51,"value":14481}," \u002F\u002F encoded path\n",{"type":46,"tag":470,"props":14483,"children":14484},{"class":472,"line":2886},[14485,14490,14494],{"type":46,"tag":470,"props":14486,"children":14487},{"style":7420},[14488],{"type":51,"value":14489},"    true",{"type":46,"tag":470,"props":14491,"children":14492},{"style":531},[14493],{"type":51,"value":604},{"type":46,"tag":470,"props":14495,"children":14496},{"style":3418},[14497],{"type":51,"value":14498}," \u002F\u002F payerIsUser\n",{"type":46,"tag":470,"props":14500,"children":14501},{"class":472,"line":2912},[14502,14507],{"type":46,"tag":470,"props":14503,"children":14504},{"style":2780},[14505],{"type":51,"value":14506},"  ])",{"type":46,"tag":470,"props":14508,"children":14509},{"style":531},[14510],{"type":51,"value":570},{"type":46,"tag":470,"props":14512,"children":14513},{"class":472,"line":2921},[14514],{"type":46,"tag":470,"props":14515,"children":14516},{"emptyLinePlaceholder":577},[14517],{"type":51,"value":580},{"type":46,"tag":470,"props":14519,"children":14520},{"class":472,"line":2958},[14521,14525,14530,14534,14539,14543],{"type":46,"tag":470,"props":14522,"children":14523},{"style":525},[14524],{"type":51,"value":5772},{"type":46,"tag":470,"props":14526,"children":14527},{"style":631},[14528],{"type":51,"value":14529}," executeRoute",{"type":46,"tag":470,"props":14531,"children":14532},{"style":2780},[14533],{"type":51,"value":835},{"type":46,"tag":470,"props":14535,"children":14536},{"style":537},[14537],{"type":51,"value":14538},"planner",{"type":46,"tag":470,"props":14540,"children":14541},{"style":2780},[14542],{"type":51,"value":842},{"type":46,"tag":470,"props":14544,"children":14545},{"style":531},[14546],{"type":51,"value":570},{"type":46,"tag":470,"props":14548,"children":14549},{"class":472,"line":2994},[14550],{"type":46,"tag":470,"props":14551,"children":14552},{"style":531},[14553],{"type":51,"value":1117},{"type":46,"tag":172,"props":14555,"children":14557},{"id":14556},"example-eth-to-token-wrap-swap",[14558],{"type":51,"value":14559},"Example: ETH to Token (Wrap + Swap)",{"type":46,"tag":397,"props":14561,"children":14563},{"className":513,"code":14562,"language":515,"meta":402,"style":402},"async function swapEthToToken(route: Route, amountIn: bigint, amountOutMin: bigint) {\n  const planner = new RoutePlanner();\n  const path = encodeRouteToPath(route, false);\n\n  \u002F\u002F 1. Wrap ETH to WETH (keep in router)\n  planner.addCommand(CommandType.WRAP_ETH, [ADDRESS_THIS, amountIn]);\n\n  \u002F\u002F 2. Swap WETH → Token (payerIsUser = false since using router's WETH)\n  planner.addCommand(CommandType.V3_SWAP_EXACT_IN, [\n    MSG_SENDER,\n    amountIn,\n    amountOutMin,\n    path,\n    false,\n  ]);\n\n  return executeRoute(planner, { value: amountIn });\n}\n",[14564],{"type":46,"tag":80,"props":14565,"children":14566},{"__ignoreMap":402},[14567,14639,14670,14713,14720,14728,14788,14795,14803,14842,14853,14864,14875,14886,14898,14909,14916,14968],{"type":46,"tag":470,"props":14568,"children":14569},{"class":472,"line":473},[14570,14574,14578,14583,14587,14591,14595,14599,14603,14607,14611,14615,14619,14623,14627,14631,14635],{"type":46,"tag":470,"props":14571,"children":14572},{"style":587},[14573],{"type":51,"value":14200},{"type":46,"tag":470,"props":14575,"children":14576},{"style":587},[14577],{"type":51,"value":14205},{"type":46,"tag":470,"props":14579,"children":14580},{"style":631},[14581],{"type":51,"value":14582}," swapEthToToken",{"type":46,"tag":470,"props":14584,"children":14585},{"style":531},[14586],{"type":51,"value":835},{"type":46,"tag":470,"props":14588,"children":14589},{"style":4374},[14590],{"type":51,"value":2290},{"type":46,"tag":470,"props":14592,"children":14593},{"style":531},[14594],{"type":51,"value":417},{"type":46,"tag":470,"props":14596,"children":14597},{"style":477},[14598],{"type":51,"value":12152},{"type":46,"tag":470,"props":14600,"children":14601},{"style":531},[14602],{"type":51,"value":604},{"type":46,"tag":470,"props":14604,"children":14605},{"style":4374},[14606],{"type":51,"value":13445},{"type":46,"tag":470,"props":14608,"children":14609},{"style":531},[14610],{"type":51,"value":417},{"type":46,"tag":470,"props":14612,"children":14613},{"style":477},[14614],{"type":51,"value":14243},{"type":46,"tag":470,"props":14616,"children":14617},{"style":531},[14618],{"type":51,"value":604},{"type":46,"tag":470,"props":14620,"children":14621},{"style":4374},[14622],{"type":51,"value":14252},{"type":46,"tag":470,"props":14624,"children":14625},{"style":531},[14626],{"type":51,"value":417},{"type":46,"tag":470,"props":14628,"children":14629},{"style":477},[14630],{"type":51,"value":14243},{"type":46,"tag":470,"props":14632,"children":14633},{"style":531},[14634],{"type":51,"value":842},{"type":46,"tag":470,"props":14636,"children":14637},{"style":531},[14638],{"type":51,"value":1165},{"type":46,"tag":470,"props":14640,"children":14641},{"class":472,"line":573},[14642,14646,14650,14654,14658,14662,14666],{"type":46,"tag":470,"props":14643,"children":14644},{"style":587},[14645],{"type":51,"value":5252},{"type":46,"tag":470,"props":14647,"children":14648},{"style":537},[14649],{"type":51,"value":14280},{"type":46,"tag":470,"props":14651,"children":14652},{"style":531},[14653],{"type":51,"value":619},{"type":46,"tag":470,"props":14655,"children":14656},{"style":531},[14657],{"type":51,"value":4534},{"type":46,"tag":470,"props":14659,"children":14660},{"style":631},[14661],{"type":51,"value":13915},{"type":46,"tag":470,"props":14663,"children":14664},{"style":2780},[14665],{"type":51,"value":7810},{"type":46,"tag":470,"props":14667,"children":14668},{"style":531},[14669],{"type":51,"value":570},{"type":46,"tag":470,"props":14671,"children":14672},{"class":472,"line":583},[14673,14677,14681,14685,14689,14693,14697,14701,14705,14709],{"type":46,"tag":470,"props":14674,"children":14675},{"style":587},[14676],{"type":51,"value":5252},{"type":46,"tag":470,"props":14678,"children":14679},{"style":537},[14680],{"type":51,"value":7462},{"type":46,"tag":470,"props":14682,"children":14683},{"style":531},[14684],{"type":51,"value":619},{"type":46,"tag":470,"props":14686,"children":14687},{"style":631},[14688],{"type":51,"value":13973},{"type":46,"tag":470,"props":14690,"children":14691},{"style":2780},[14692],{"type":51,"value":835},{"type":46,"tag":470,"props":14694,"children":14695},{"style":537},[14696],{"type":51,"value":2290},{"type":46,"tag":470,"props":14698,"children":14699},{"style":531},[14700],{"type":51,"value":604},{"type":46,"tag":470,"props":14702,"children":14703},{"style":7420},[14704],{"type":51,"value":14351},{"type":46,"tag":470,"props":14706,"children":14707},{"style":2780},[14708],{"type":51,"value":842},{"type":46,"tag":470,"props":14710,"children":14711},{"style":531},[14712],{"type":51,"value":570},{"type":46,"tag":470,"props":14714,"children":14715},{"class":472,"line":1046},[14716],{"type":46,"tag":470,"props":14717,"children":14718},{"emptyLinePlaceholder":577},[14719],{"type":51,"value":580},{"type":46,"tag":470,"props":14721,"children":14722},{"class":472,"line":1084},[14723],{"type":46,"tag":470,"props":14724,"children":14725},{"style":3418},[14726],{"type":51,"value":14727},"  \u002F\u002F 1. Wrap ETH to WETH (keep in router)\n",{"type":46,"tag":470,"props":14729,"children":14730},{"class":472,"line":1111},[14731,14735,14739,14743,14747,14751,14755,14759,14763,14767,14772,14776,14780,14784],{"type":46,"tag":470,"props":14732,"children":14733},{"style":537},[14734],{"type":51,"value":14379},{"type":46,"tag":470,"props":14736,"children":14737},{"style":531},[14738],{"type":51,"value":628},{"type":46,"tag":470,"props":14740,"children":14741},{"style":631},[14742],{"type":51,"value":14388},{"type":46,"tag":470,"props":14744,"children":14745},{"style":2780},[14746],{"type":51,"value":835},{"type":46,"tag":470,"props":14748,"children":14749},{"style":537},[14750],{"type":51,"value":14397},{"type":46,"tag":470,"props":14752,"children":14753},{"style":531},[14754],{"type":51,"value":628},{"type":46,"tag":470,"props":14756,"children":14757},{"style":537},[14758],{"type":51,"value":9750},{"type":46,"tag":470,"props":14760,"children":14761},{"style":531},[14762],{"type":51,"value":604},{"type":46,"tag":470,"props":14764,"children":14765},{"style":2780},[14766],{"type":51,"value":7102},{"type":46,"tag":470,"props":14768,"children":14769},{"style":537},[14770],{"type":51,"value":14771},"ADDRESS_THIS",{"type":46,"tag":470,"props":14773,"children":14774},{"style":531},[14775],{"type":51,"value":604},{"type":46,"tag":470,"props":14777,"children":14778},{"style":537},[14779],{"type":51,"value":13445},{"type":46,"tag":470,"props":14781,"children":14782},{"style":2780},[14783],{"type":51,"value":13310},{"type":46,"tag":470,"props":14785,"children":14786},{"style":531},[14787],{"type":51,"value":570},{"type":46,"tag":470,"props":14789,"children":14790},{"class":472,"line":1314},[14791],{"type":46,"tag":470,"props":14792,"children":14793},{"emptyLinePlaceholder":577},[14794],{"type":51,"value":580},{"type":46,"tag":470,"props":14796,"children":14797},{"class":472,"line":1338},[14798],{"type":46,"tag":470,"props":14799,"children":14800},{"style":3418},[14801],{"type":51,"value":14802},"  \u002F\u002F 2. Swap WETH → Token (payerIsUser = false since using router's WETH)\n",{"type":46,"tag":470,"props":14804,"children":14805},{"class":472,"line":1347},[14806,14810,14814,14818,14822,14826,14830,14834,14838],{"type":46,"tag":470,"props":14807,"children":14808},{"style":537},[14809],{"type":51,"value":14379},{"type":46,"tag":470,"props":14811,"children":14812},{"style":531},[14813],{"type":51,"value":628},{"type":46,"tag":470,"props":14815,"children":14816},{"style":631},[14817],{"type":51,"value":14388},{"type":46,"tag":470,"props":14819,"children":14820},{"style":2780},[14821],{"type":51,"value":835},{"type":46,"tag":470,"props":14823,"children":14824},{"style":537},[14825],{"type":51,"value":14397},{"type":46,"tag":470,"props":14827,"children":14828},{"style":531},[14829],{"type":51,"value":628},{"type":46,"tag":470,"props":14831,"children":14832},{"style":537},[14833],{"type":51,"value":9594},{"type":46,"tag":470,"props":14835,"children":14836},{"style":531},[14837],{"type":51,"value":604},{"type":46,"tag":470,"props":14839,"children":14840},{"style":2780},[14841],{"type":51,"value":2909},{"type":46,"tag":470,"props":14843,"children":14844},{"class":472,"line":1705},[14845,14849],{"type":46,"tag":470,"props":14846,"children":14847},{"style":537},[14848],{"type":51,"value":14421},{"type":46,"tag":470,"props":14850,"children":14851},{"style":531},[14852],{"type":51,"value":1007},{"type":46,"tag":470,"props":14854,"children":14855},{"class":472,"line":1740},[14856,14860],{"type":46,"tag":470,"props":14857,"children":14858},{"style":537},[14859],{"type":51,"value":14438},{"type":46,"tag":470,"props":14861,"children":14862},{"style":531},[14863],{"type":51,"value":1007},{"type":46,"tag":470,"props":14865,"children":14866},{"class":472,"line":2421},[14867,14871],{"type":46,"tag":470,"props":14868,"children":14869},{"style":537},[14870],{"type":51,"value":14455},{"type":46,"tag":470,"props":14872,"children":14873},{"style":531},[14874],{"type":51,"value":1007},{"type":46,"tag":470,"props":14876,"children":14877},{"class":472,"line":2447},[14878,14882],{"type":46,"tag":470,"props":14879,"children":14880},{"style":537},[14881],{"type":51,"value":14472},{"type":46,"tag":470,"props":14883,"children":14884},{"style":531},[14885],{"type":51,"value":1007},{"type":46,"tag":470,"props":14887,"children":14888},{"class":472,"line":2877},[14889,14894],{"type":46,"tag":470,"props":14890,"children":14891},{"style":7420},[14892],{"type":51,"value":14893},"    false",{"type":46,"tag":470,"props":14895,"children":14896},{"style":531},[14897],{"type":51,"value":1007},{"type":46,"tag":470,"props":14899,"children":14900},{"class":472,"line":2886},[14901,14905],{"type":46,"tag":470,"props":14902,"children":14903},{"style":2780},[14904],{"type":51,"value":14506},{"type":46,"tag":470,"props":14906,"children":14907},{"style":531},[14908],{"type":51,"value":570},{"type":46,"tag":470,"props":14910,"children":14911},{"class":472,"line":2912},[14912],{"type":46,"tag":470,"props":14913,"children":14914},{"emptyLinePlaceholder":577},[14915],{"type":51,"value":580},{"type":46,"tag":470,"props":14917,"children":14918},{"class":472,"line":2921},[14919,14923,14927,14931,14935,14939,14943,14948,14952,14956,14960,14964],{"type":46,"tag":470,"props":14920,"children":14921},{"style":525},[14922],{"type":51,"value":5772},{"type":46,"tag":470,"props":14924,"children":14925},{"style":631},[14926],{"type":51,"value":14529},{"type":46,"tag":470,"props":14928,"children":14929},{"style":2780},[14930],{"type":51,"value":835},{"type":46,"tag":470,"props":14932,"children":14933},{"style":537},[14934],{"type":51,"value":14538},{"type":46,"tag":470,"props":14936,"children":14937},{"style":531},[14938],{"type":51,"value":604},{"type":46,"tag":470,"props":14940,"children":14941},{"style":531},[14942],{"type":51,"value":534},{"type":46,"tag":470,"props":14944,"children":14945},{"style":2780},[14946],{"type":51,"value":14947}," value",{"type":46,"tag":470,"props":14949,"children":14950},{"style":531},[14951],{"type":51,"value":417},{"type":46,"tag":470,"props":14953,"children":14954},{"style":537},[14955],{"type":51,"value":13445},{"type":46,"tag":470,"props":14957,"children":14958},{"style":531},[14959],{"type":51,"value":545},{"type":46,"tag":470,"props":14961,"children":14962},{"style":2780},[14963],{"type":51,"value":842},{"type":46,"tag":470,"props":14965,"children":14966},{"style":531},[14967],{"type":51,"value":570},{"type":46,"tag":470,"props":14969,"children":14970},{"class":472,"line":2958},[14971],{"type":46,"tag":470,"props":14972,"children":14973},{"style":531},[14974],{"type":51,"value":1117},{"type":46,"tag":172,"props":14976,"children":14978},{"id":14977},"example-token-to-eth-swap-unwrap",[14979],{"type":51,"value":14980},"Example: Token to ETH (Swap + Unwrap)",{"type":46,"tag":397,"props":14982,"children":14984},{"className":513,"code":14983,"language":515,"meta":402,"style":402},"async function swapTokenToEth(route: Route, amountIn: bigint, amountOutMin: bigint) {\n  const planner = new RoutePlanner();\n  const path = encodeRouteToPath(route, false);\n\n  \u002F\u002F 1. Swap Token → WETH (output to router)\n  planner.addCommand(CommandType.V3_SWAP_EXACT_IN, [\n    ADDRESS_THIS,\n    amountIn,\n    amountOutMin,\n    path,\n    true,\n  ]);\n\n  \u002F\u002F 2. Unwrap WETH to ETH\n  planner.addCommand(CommandType.UNWRAP_WETH, [MSG_SENDER, amountOutMin]);\n\n  return executeRoute(planner);\n}\n",[14985],{"type":46,"tag":80,"props":14986,"children":14987},{"__ignoreMap":402},[14988,15060,15091,15134,15141,15149,15188,15200,15211,15222,15233,15244,15255,15262,15270,15330,15337,15364],{"type":46,"tag":470,"props":14989,"children":14990},{"class":472,"line":473},[14991,14995,14999,15004,15008,15012,15016,15020,15024,15028,15032,15036,15040,15044,15048,15052,15056],{"type":46,"tag":470,"props":14992,"children":14993},{"style":587},[14994],{"type":51,"value":14200},{"type":46,"tag":470,"props":14996,"children":14997},{"style":587},[14998],{"type":51,"value":14205},{"type":46,"tag":470,"props":15000,"children":15001},{"style":631},[15002],{"type":51,"value":15003}," swapTokenToEth",{"type":46,"tag":470,"props":15005,"children":15006},{"style":531},[15007],{"type":51,"value":835},{"type":46,"tag":470,"props":15009,"children":15010},{"style":4374},[15011],{"type":51,"value":2290},{"type":46,"tag":470,"props":15013,"children":15014},{"style":531},[15015],{"type":51,"value":417},{"type":46,"tag":470,"props":15017,"children":15018},{"style":477},[15019],{"type":51,"value":12152},{"type":46,"tag":470,"props":15021,"children":15022},{"style":531},[15023],{"type":51,"value":604},{"type":46,"tag":470,"props":15025,"children":15026},{"style":4374},[15027],{"type":51,"value":13445},{"type":46,"tag":470,"props":15029,"children":15030},{"style":531},[15031],{"type":51,"value":417},{"type":46,"tag":470,"props":15033,"children":15034},{"style":477},[15035],{"type":51,"value":14243},{"type":46,"tag":470,"props":15037,"children":15038},{"style":531},[15039],{"type":51,"value":604},{"type":46,"tag":470,"props":15041,"children":15042},{"style":4374},[15043],{"type":51,"value":14252},{"type":46,"tag":470,"props":15045,"children":15046},{"style":531},[15047],{"type":51,"value":417},{"type":46,"tag":470,"props":15049,"children":15050},{"style":477},[15051],{"type":51,"value":14243},{"type":46,"tag":470,"props":15053,"children":15054},{"style":531},[15055],{"type":51,"value":842},{"type":46,"tag":470,"props":15057,"children":15058},{"style":531},[15059],{"type":51,"value":1165},{"type":46,"tag":470,"props":15061,"children":15062},{"class":472,"line":573},[15063,15067,15071,15075,15079,15083,15087],{"type":46,"tag":470,"props":15064,"children":15065},{"style":587},[15066],{"type":51,"value":5252},{"type":46,"tag":470,"props":15068,"children":15069},{"style":537},[15070],{"type":51,"value":14280},{"type":46,"tag":470,"props":15072,"children":15073},{"style":531},[15074],{"type":51,"value":619},{"type":46,"tag":470,"props":15076,"children":15077},{"style":531},[15078],{"type":51,"value":4534},{"type":46,"tag":470,"props":15080,"children":15081},{"style":631},[15082],{"type":51,"value":13915},{"type":46,"tag":470,"props":15084,"children":15085},{"style":2780},[15086],{"type":51,"value":7810},{"type":46,"tag":470,"props":15088,"children":15089},{"style":531},[15090],{"type":51,"value":570},{"type":46,"tag":470,"props":15092,"children":15093},{"class":472,"line":583},[15094,15098,15102,15106,15110,15114,15118,15122,15126,15130],{"type":46,"tag":470,"props":15095,"children":15096},{"style":587},[15097],{"type":51,"value":5252},{"type":46,"tag":470,"props":15099,"children":15100},{"style":537},[15101],{"type":51,"value":7462},{"type":46,"tag":470,"props":15103,"children":15104},{"style":531},[15105],{"type":51,"value":619},{"type":46,"tag":470,"props":15107,"children":15108},{"style":631},[15109],{"type":51,"value":13973},{"type":46,"tag":470,"props":15111,"children":15112},{"style":2780},[15113],{"type":51,"value":835},{"type":46,"tag":470,"props":15115,"children":15116},{"style":537},[15117],{"type":51,"value":2290},{"type":46,"tag":470,"props":15119,"children":15120},{"style":531},[15121],{"type":51,"value":604},{"type":46,"tag":470,"props":15123,"children":15124},{"style":7420},[15125],{"type":51,"value":14351},{"type":46,"tag":470,"props":15127,"children":15128},{"style":2780},[15129],{"type":51,"value":842},{"type":46,"tag":470,"props":15131,"children":15132},{"style":531},[15133],{"type":51,"value":570},{"type":46,"tag":470,"props":15135,"children":15136},{"class":472,"line":1046},[15137],{"type":46,"tag":470,"props":15138,"children":15139},{"emptyLinePlaceholder":577},[15140],{"type":51,"value":580},{"type":46,"tag":470,"props":15142,"children":15143},{"class":472,"line":1084},[15144],{"type":46,"tag":470,"props":15145,"children":15146},{"style":3418},[15147],{"type":51,"value":15148},"  \u002F\u002F 1. Swap Token → WETH (output to router)\n",{"type":46,"tag":470,"props":15150,"children":15151},{"class":472,"line":1111},[15152,15156,15160,15164,15168,15172,15176,15180,15184],{"type":46,"tag":470,"props":15153,"children":15154},{"style":537},[15155],{"type":51,"value":14379},{"type":46,"tag":470,"props":15157,"children":15158},{"style":531},[15159],{"type":51,"value":628},{"type":46,"tag":470,"props":15161,"children":15162},{"style":631},[15163],{"type":51,"value":14388},{"type":46,"tag":470,"props":15165,"children":15166},{"style":2780},[15167],{"type":51,"value":835},{"type":46,"tag":470,"props":15169,"children":15170},{"style":537},[15171],{"type":51,"value":14397},{"type":46,"tag":470,"props":15173,"children":15174},{"style":531},[15175],{"type":51,"value":628},{"type":46,"tag":470,"props":15177,"children":15178},{"style":537},[15179],{"type":51,"value":9594},{"type":46,"tag":470,"props":15181,"children":15182},{"style":531},[15183],{"type":51,"value":604},{"type":46,"tag":470,"props":15185,"children":15186},{"style":2780},[15187],{"type":51,"value":2909},{"type":46,"tag":470,"props":15189,"children":15190},{"class":472,"line":1314},[15191,15196],{"type":46,"tag":470,"props":15192,"children":15193},{"style":537},[15194],{"type":51,"value":15195},"    ADDRESS_THIS",{"type":46,"tag":470,"props":15197,"children":15198},{"style":531},[15199],{"type":51,"value":1007},{"type":46,"tag":470,"props":15201,"children":15202},{"class":472,"line":1338},[15203,15207],{"type":46,"tag":470,"props":15204,"children":15205},{"style":537},[15206],{"type":51,"value":14438},{"type":46,"tag":470,"props":15208,"children":15209},{"style":531},[15210],{"type":51,"value":1007},{"type":46,"tag":470,"props":15212,"children":15213},{"class":472,"line":1347},[15214,15218],{"type":46,"tag":470,"props":15215,"children":15216},{"style":537},[15217],{"type":51,"value":14455},{"type":46,"tag":470,"props":15219,"children":15220},{"style":531},[15221],{"type":51,"value":1007},{"type":46,"tag":470,"props":15223,"children":15224},{"class":472,"line":1705},[15225,15229],{"type":46,"tag":470,"props":15226,"children":15227},{"style":537},[15228],{"type":51,"value":14472},{"type":46,"tag":470,"props":15230,"children":15231},{"style":531},[15232],{"type":51,"value":1007},{"type":46,"tag":470,"props":15234,"children":15235},{"class":472,"line":1740},[15236,15240],{"type":46,"tag":470,"props":15237,"children":15238},{"style":7420},[15239],{"type":51,"value":14489},{"type":46,"tag":470,"props":15241,"children":15242},{"style":531},[15243],{"type":51,"value":1007},{"type":46,"tag":470,"props":15245,"children":15246},{"class":472,"line":2421},[15247,15251],{"type":46,"tag":470,"props":15248,"children":15249},{"style":2780},[15250],{"type":51,"value":14506},{"type":46,"tag":470,"props":15252,"children":15253},{"style":531},[15254],{"type":51,"value":570},{"type":46,"tag":470,"props":15256,"children":15257},{"class":472,"line":2447},[15258],{"type":46,"tag":470,"props":15259,"children":15260},{"emptyLinePlaceholder":577},[15261],{"type":51,"value":580},{"type":46,"tag":470,"props":15263,"children":15264},{"class":472,"line":2877},[15265],{"type":46,"tag":470,"props":15266,"children":15267},{"style":3418},[15268],{"type":51,"value":15269},"  \u002F\u002F 2. Unwrap WETH to ETH\n",{"type":46,"tag":470,"props":15271,"children":15272},{"class":472,"line":2886},[15273,15277,15281,15285,15289,15293,15297,15301,15305,15309,15314,15318,15322,15326],{"type":46,"tag":470,"props":15274,"children":15275},{"style":537},[15276],{"type":51,"value":14379},{"type":46,"tag":470,"props":15278,"children":15279},{"style":531},[15280],{"type":51,"value":628},{"type":46,"tag":470,"props":15282,"children":15283},{"style":631},[15284],{"type":51,"value":14388},{"type":46,"tag":470,"props":15286,"children":15287},{"style":2780},[15288],{"type":51,"value":835},{"type":46,"tag":470,"props":15290,"children":15291},{"style":537},[15292],{"type":51,"value":14397},{"type":46,"tag":470,"props":15294,"children":15295},{"style":531},[15296],{"type":51,"value":628},{"type":46,"tag":470,"props":15298,"children":15299},{"style":537},[15300],{"type":51,"value":9768},{"type":46,"tag":470,"props":15302,"children":15303},{"style":531},[15304],{"type":51,"value":604},{"type":46,"tag":470,"props":15306,"children":15307},{"style":2780},[15308],{"type":51,"value":7102},{"type":46,"tag":470,"props":15310,"children":15311},{"style":537},[15312],{"type":51,"value":15313},"MSG_SENDER",{"type":46,"tag":470,"props":15315,"children":15316},{"style":531},[15317],{"type":51,"value":604},{"type":46,"tag":470,"props":15319,"children":15320},{"style":537},[15321],{"type":51,"value":14252},{"type":46,"tag":470,"props":15323,"children":15324},{"style":2780},[15325],{"type":51,"value":13310},{"type":46,"tag":470,"props":15327,"children":15328},{"style":531},[15329],{"type":51,"value":570},{"type":46,"tag":470,"props":15331,"children":15332},{"class":472,"line":2912},[15333],{"type":46,"tag":470,"props":15334,"children":15335},{"emptyLinePlaceholder":577},[15336],{"type":51,"value":580},{"type":46,"tag":470,"props":15338,"children":15339},{"class":472,"line":2921},[15340,15344,15348,15352,15356,15360],{"type":46,"tag":470,"props":15341,"children":15342},{"style":525},[15343],{"type":51,"value":5772},{"type":46,"tag":470,"props":15345,"children":15346},{"style":631},[15347],{"type":51,"value":14529},{"type":46,"tag":470,"props":15349,"children":15350},{"style":2780},[15351],{"type":51,"value":835},{"type":46,"tag":470,"props":15353,"children":15354},{"style":537},[15355],{"type":51,"value":14538},{"type":46,"tag":470,"props":15357,"children":15358},{"style":2780},[15359],{"type":51,"value":842},{"type":46,"tag":470,"props":15361,"children":15362},{"style":531},[15363],{"type":51,"value":570},{"type":46,"tag":470,"props":15365,"children":15366},{"class":472,"line":2958},[15367],{"type":46,"tag":470,"props":15368,"children":15369},{"style":531},[15370],{"type":51,"value":1117},{"type":46,"tag":172,"props":15372,"children":15374},{"id":15373},"example-fee-collection-with-pay_portion",[15375],{"type":51,"value":15376},"Example: Fee Collection with PAY_PORTION",{"type":46,"tag":397,"props":15378,"children":15380},{"className":513,"code":15379,"language":515,"meta":402,"style":402},"async function swapWithFee(route: Route, amountIn: bigint, feeRecipient: Address, feeBips: number) {\n  const planner = new RoutePlanner();\n  const path = encodeRouteToPath(route, false);\n  const outputToken = route.output.wrapped.address;\n\n  \u002F\u002F Swap to router (ADDRESS_THIS)\n  planner.addCommand(CommandType.V3_SWAP_EXACT_IN, [ADDRESS_THIS, amountIn, 0n, path, true]);\n\n  \u002F\u002F Pay fee portion (e.g., 30 bips = 0.3%)\n  planner.addCommand(CommandType.PAY_PORTION, [outputToken, feeRecipient, feeBips]);\n\n  \u002F\u002F Sweep remainder to user\n  planner.addCommand(CommandType.SWEEP, [outputToken, MSG_SENDER, 0n]);\n\n  return executeRoute(planner);\n}\n",[15381],{"type":46,"tag":80,"props":15382,"children":15383},{"__ignoreMap":402},[15384,15474,15505,15548,15599,15606,15614,15703,15710,15718,15787,15794,15802,15874,15881,15908],{"type":46,"tag":470,"props":15385,"children":15386},{"class":472,"line":473},[15387,15391,15395,15400,15404,15408,15412,15416,15420,15424,15428,15432,15436,15441,15445,15449,15453,15458,15462,15466,15470],{"type":46,"tag":470,"props":15388,"children":15389},{"style":587},[15390],{"type":51,"value":14200},{"type":46,"tag":470,"props":15392,"children":15393},{"style":587},[15394],{"type":51,"value":14205},{"type":46,"tag":470,"props":15396,"children":15397},{"style":631},[15398],{"type":51,"value":15399}," swapWithFee",{"type":46,"tag":470,"props":15401,"children":15402},{"style":531},[15403],{"type":51,"value":835},{"type":46,"tag":470,"props":15405,"children":15406},{"style":4374},[15407],{"type":51,"value":2290},{"type":46,"tag":470,"props":15409,"children":15410},{"style":531},[15411],{"type":51,"value":417},{"type":46,"tag":470,"props":15413,"children":15414},{"style":477},[15415],{"type":51,"value":12152},{"type":46,"tag":470,"props":15417,"children":15418},{"style":531},[15419],{"type":51,"value":604},{"type":46,"tag":470,"props":15421,"children":15422},{"style":4374},[15423],{"type":51,"value":13445},{"type":46,"tag":470,"props":15425,"children":15426},{"style":531},[15427],{"type":51,"value":417},{"type":46,"tag":470,"props":15429,"children":15430},{"style":477},[15431],{"type":51,"value":14243},{"type":46,"tag":470,"props":15433,"children":15434},{"style":531},[15435],{"type":51,"value":604},{"type":46,"tag":470,"props":15437,"children":15438},{"style":4374},[15439],{"type":51,"value":15440}," feeRecipient",{"type":46,"tag":470,"props":15442,"children":15443},{"style":531},[15444],{"type":51,"value":417},{"type":46,"tag":470,"props":15446,"children":15447},{"style":477},[15448],{"type":51,"value":10719},{"type":46,"tag":470,"props":15450,"children":15451},{"style":531},[15452],{"type":51,"value":604},{"type":46,"tag":470,"props":15454,"children":15455},{"style":4374},[15456],{"type":51,"value":15457}," feeBips",{"type":46,"tag":470,"props":15459,"children":15460},{"style":531},[15461],{"type":51,"value":417},{"type":46,"tag":470,"props":15463,"children":15464},{"style":477},[15465],{"type":51,"value":8227},{"type":46,"tag":470,"props":15467,"children":15468},{"style":531},[15469],{"type":51,"value":842},{"type":46,"tag":470,"props":15471,"children":15472},{"style":531},[15473],{"type":51,"value":1165},{"type":46,"tag":470,"props":15475,"children":15476},{"class":472,"line":573},[15477,15481,15485,15489,15493,15497,15501],{"type":46,"tag":470,"props":15478,"children":15479},{"style":587},[15480],{"type":51,"value":5252},{"type":46,"tag":470,"props":15482,"children":15483},{"style":537},[15484],{"type":51,"value":14280},{"type":46,"tag":470,"props":15486,"children":15487},{"style":531},[15488],{"type":51,"value":619},{"type":46,"tag":470,"props":15490,"children":15491},{"style":531},[15492],{"type":51,"value":4534},{"type":46,"tag":470,"props":15494,"children":15495},{"style":631},[15496],{"type":51,"value":13915},{"type":46,"tag":470,"props":15498,"children":15499},{"style":2780},[15500],{"type":51,"value":7810},{"type":46,"tag":470,"props":15502,"children":15503},{"style":531},[15504],{"type":51,"value":570},{"type":46,"tag":470,"props":15506,"children":15507},{"class":472,"line":583},[15508,15512,15516,15520,15524,15528,15532,15536,15540,15544],{"type":46,"tag":470,"props":15509,"children":15510},{"style":587},[15511],{"type":51,"value":5252},{"type":46,"tag":470,"props":15513,"children":15514},{"style":537},[15515],{"type":51,"value":7462},{"type":46,"tag":470,"props":15517,"children":15518},{"style":531},[15519],{"type":51,"value":619},{"type":46,"tag":470,"props":15521,"children":15522},{"style":631},[15523],{"type":51,"value":13973},{"type":46,"tag":470,"props":15525,"children":15526},{"style":2780},[15527],{"type":51,"value":835},{"type":46,"tag":470,"props":15529,"children":15530},{"style":537},[15531],{"type":51,"value":2290},{"type":46,"tag":470,"props":15533,"children":15534},{"style":531},[15535],{"type":51,"value":604},{"type":46,"tag":470,"props":15537,"children":15538},{"style":7420},[15539],{"type":51,"value":14351},{"type":46,"tag":470,"props":15541,"children":15542},{"style":2780},[15543],{"type":51,"value":842},{"type":46,"tag":470,"props":15545,"children":15546},{"style":531},[15547],{"type":51,"value":570},{"type":46,"tag":470,"props":15549,"children":15550},{"class":472,"line":1046},[15551,15555,15560,15564,15569,15573,15577,15581,15586,15590,15595],{"type":46,"tag":470,"props":15552,"children":15553},{"style":587},[15554],{"type":51,"value":5252},{"type":46,"tag":470,"props":15556,"children":15557},{"style":537},[15558],{"type":51,"value":15559}," outputToken",{"type":46,"tag":470,"props":15561,"children":15562},{"style":531},[15563],{"type":51,"value":619},{"type":46,"tag":470,"props":15565,"children":15566},{"style":537},[15567],{"type":51,"value":15568}," route",{"type":46,"tag":470,"props":15570,"children":15571},{"style":531},[15572],{"type":51,"value":628},{"type":46,"tag":470,"props":15574,"children":15575},{"style":537},[15576],{"type":51,"value":2173},{"type":46,"tag":470,"props":15578,"children":15579},{"style":531},[15580],{"type":51,"value":628},{"type":46,"tag":470,"props":15582,"children":15583},{"style":537},[15584],{"type":51,"value":15585},"wrapped",{"type":46,"tag":470,"props":15587,"children":15588},{"style":531},[15589],{"type":51,"value":628},{"type":46,"tag":470,"props":15591,"children":15592},{"style":537},[15593],{"type":51,"value":15594},"address",{"type":46,"tag":470,"props":15596,"children":15597},{"style":531},[15598],{"type":51,"value":570},{"type":46,"tag":470,"props":15600,"children":15601},{"class":472,"line":1084},[15602],{"type":46,"tag":470,"props":15603,"children":15604},{"emptyLinePlaceholder":577},[15605],{"type":51,"value":580},{"type":46,"tag":470,"props":15607,"children":15608},{"class":472,"line":1111},[15609],{"type":46,"tag":470,"props":15610,"children":15611},{"style":3418},[15612],{"type":51,"value":15613},"  \u002F\u002F Swap to router (ADDRESS_THIS)\n",{"type":46,"tag":470,"props":15615,"children":15616},{"class":472,"line":1314},[15617,15621,15625,15629,15633,15637,15641,15645,15649,15653,15657,15661,15665,15669,15674,15679,15683,15687,15691,15695,15699],{"type":46,"tag":470,"props":15618,"children":15619},{"style":537},[15620],{"type":51,"value":14379},{"type":46,"tag":470,"props":15622,"children":15623},{"style":531},[15624],{"type":51,"value":628},{"type":46,"tag":470,"props":15626,"children":15627},{"style":631},[15628],{"type":51,"value":14388},{"type":46,"tag":470,"props":15630,"children":15631},{"style":2780},[15632],{"type":51,"value":835},{"type":46,"tag":470,"props":15634,"children":15635},{"style":537},[15636],{"type":51,"value":14397},{"type":46,"tag":470,"props":15638,"children":15639},{"style":531},[15640],{"type":51,"value":628},{"type":46,"tag":470,"props":15642,"children":15643},{"style":537},[15644],{"type":51,"value":9594},{"type":46,"tag":470,"props":15646,"children":15647},{"style":531},[15648],{"type":51,"value":604},{"type":46,"tag":470,"props":15650,"children":15651},{"style":2780},[15652],{"type":51,"value":7102},{"type":46,"tag":470,"props":15654,"children":15655},{"style":537},[15656],{"type":51,"value":14771},{"type":46,"tag":470,"props":15658,"children":15659},{"style":531},[15660],{"type":51,"value":604},{"type":46,"tag":470,"props":15662,"children":15663},{"style":537},[15664],{"type":51,"value":13445},{"type":46,"tag":470,"props":15666,"children":15667},{"style":531},[15668],{"type":51,"value":604},{"type":46,"tag":470,"props":15670,"children":15671},{"style":1105},[15672],{"type":51,"value":15673}," 0",{"type":46,"tag":470,"props":15675,"children":15676},{"style":587},[15677],{"type":51,"value":15678},"n",{"type":46,"tag":470,"props":15680,"children":15681},{"style":531},[15682],{"type":51,"value":604},{"type":46,"tag":470,"props":15684,"children":15685},{"style":537},[15686],{"type":51,"value":7462},{"type":46,"tag":470,"props":15688,"children":15689},{"style":531},[15690],{"type":51,"value":604},{"type":46,"tag":470,"props":15692,"children":15693},{"style":7420},[15694],{"type":51,"value":7423},{"type":46,"tag":470,"props":15696,"children":15697},{"style":2780},[15698],{"type":51,"value":13310},{"type":46,"tag":470,"props":15700,"children":15701},{"style":531},[15702],{"type":51,"value":570},{"type":46,"tag":470,"props":15704,"children":15705},{"class":472,"line":1338},[15706],{"type":46,"tag":470,"props":15707,"children":15708},{"emptyLinePlaceholder":577},[15709],{"type":51,"value":580},{"type":46,"tag":470,"props":15711,"children":15712},{"class":472,"line":1347},[15713],{"type":46,"tag":470,"props":15714,"children":15715},{"style":3418},[15716],{"type":51,"value":15717},"  \u002F\u002F Pay fee portion (e.g., 30 bips = 0.3%)\n",{"type":46,"tag":470,"props":15719,"children":15720},{"class":472,"line":1705},[15721,15725,15729,15733,15737,15741,15745,15750,15754,15758,15763,15767,15771,15775,15779,15783],{"type":46,"tag":470,"props":15722,"children":15723},{"style":537},[15724],{"type":51,"value":14379},{"type":46,"tag":470,"props":15726,"children":15727},{"style":531},[15728],{"type":51,"value":628},{"type":46,"tag":470,"props":15730,"children":15731},{"style":631},[15732],{"type":51,"value":14388},{"type":46,"tag":470,"props":15734,"children":15735},{"style":2780},[15736],{"type":51,"value":835},{"type":46,"tag":470,"props":15738,"children":15739},{"style":537},[15740],{"type":51,"value":14397},{"type":46,"tag":470,"props":15742,"children":15743},{"style":531},[15744],{"type":51,"value":628},{"type":46,"tag":470,"props":15746,"children":15747},{"style":537},[15748],{"type":51,"value":15749},"PAY_PORTION",{"type":46,"tag":470,"props":15751,"children":15752},{"style":531},[15753],{"type":51,"value":604},{"type":46,"tag":470,"props":15755,"children":15756},{"style":2780},[15757],{"type":51,"value":7102},{"type":46,"tag":470,"props":15759,"children":15760},{"style":537},[15761],{"type":51,"value":15762},"outputToken",{"type":46,"tag":470,"props":15764,"children":15765},{"style":531},[15766],{"type":51,"value":604},{"type":46,"tag":470,"props":15768,"children":15769},{"style":537},[15770],{"type":51,"value":15440},{"type":46,"tag":470,"props":15772,"children":15773},{"style":531},[15774],{"type":51,"value":604},{"type":46,"tag":470,"props":15776,"children":15777},{"style":537},[15778],{"type":51,"value":15457},{"type":46,"tag":470,"props":15780,"children":15781},{"style":2780},[15782],{"type":51,"value":13310},{"type":46,"tag":470,"props":15784,"children":15785},{"style":531},[15786],{"type":51,"value":570},{"type":46,"tag":470,"props":15788,"children":15789},{"class":472,"line":1740},[15790],{"type":46,"tag":470,"props":15791,"children":15792},{"emptyLinePlaceholder":577},[15793],{"type":51,"value":580},{"type":46,"tag":470,"props":15795,"children":15796},{"class":472,"line":2421},[15797],{"type":46,"tag":470,"props":15798,"children":15799},{"style":3418},[15800],{"type":51,"value":15801},"  \u002F\u002F Sweep remainder to user\n",{"type":46,"tag":470,"props":15803,"children":15804},{"class":472,"line":2447},[15805,15809,15813,15817,15821,15825,15829,15833,15837,15841,15845,15849,15854,15858,15862,15866,15870],{"type":46,"tag":470,"props":15806,"children":15807},{"style":537},[15808],{"type":51,"value":14379},{"type":46,"tag":470,"props":15810,"children":15811},{"style":531},[15812],{"type":51,"value":628},{"type":46,"tag":470,"props":15814,"children":15815},{"style":631},[15816],{"type":51,"value":14388},{"type":46,"tag":470,"props":15818,"children":15819},{"style":2780},[15820],{"type":51,"value":835},{"type":46,"tag":470,"props":15822,"children":15823},{"style":537},[15824],{"type":51,"value":14397},{"type":46,"tag":470,"props":15826,"children":15827},{"style":531},[15828],{"type":51,"value":628},{"type":46,"tag":470,"props":15830,"children":15831},{"style":537},[15832],{"type":51,"value":9714},{"type":46,"tag":470,"props":15834,"children":15835},{"style":531},[15836],{"type":51,"value":604},{"type":46,"tag":470,"props":15838,"children":15839},{"style":2780},[15840],{"type":51,"value":7102},{"type":46,"tag":470,"props":15842,"children":15843},{"style":537},[15844],{"type":51,"value":15762},{"type":46,"tag":470,"props":15846,"children":15847},{"style":531},[15848],{"type":51,"value":604},{"type":46,"tag":470,"props":15850,"children":15851},{"style":537},[15852],{"type":51,"value":15853}," MSG_SENDER",{"type":46,"tag":470,"props":15855,"children":15856},{"style":531},[15857],{"type":51,"value":604},{"type":46,"tag":470,"props":15859,"children":15860},{"style":1105},[15861],{"type":51,"value":15673},{"type":46,"tag":470,"props":15863,"children":15864},{"style":587},[15865],{"type":51,"value":15678},{"type":46,"tag":470,"props":15867,"children":15868},{"style":2780},[15869],{"type":51,"value":13310},{"type":46,"tag":470,"props":15871,"children":15872},{"style":531},[15873],{"type":51,"value":570},{"type":46,"tag":470,"props":15875,"children":15876},{"class":472,"line":2877},[15877],{"type":46,"tag":470,"props":15878,"children":15879},{"emptyLinePlaceholder":577},[15880],{"type":51,"value":580},{"type":46,"tag":470,"props":15882,"children":15883},{"class":472,"line":2886},[15884,15888,15892,15896,15900,15904],{"type":46,"tag":470,"props":15885,"children":15886},{"style":525},[15887],{"type":51,"value":5772},{"type":46,"tag":470,"props":15889,"children":15890},{"style":631},[15891],{"type":51,"value":14529},{"type":46,"tag":470,"props":15893,"children":15894},{"style":2780},[15895],{"type":51,"value":835},{"type":46,"tag":470,"props":15897,"children":15898},{"style":537},[15899],{"type":51,"value":14538},{"type":46,"tag":470,"props":15901,"children":15902},{"style":2780},[15903],{"type":51,"value":842},{"type":46,"tag":470,"props":15905,"children":15906},{"style":531},[15907],{"type":51,"value":570},{"type":46,"tag":470,"props":15909,"children":15910},{"class":472,"line":2912},[15911],{"type":46,"tag":470,"props":15912,"children":15913},{"style":531},[15914],{"type":51,"value":1117},{"type":46,"tag":172,"props":15916,"children":15918},{"id":15917},"execute-route-helper",[15919],{"type":51,"value":15920},"Execute Route Helper",{"type":46,"tag":397,"props":15922,"children":15924},{"className":513,"code":15923,"language":515,"meta":402,"style":402},"import { UNIVERSAL_ROUTER_ADDRESS } from '@uniswap\u002Funiversal-router-sdk';\n\nconst ROUTER_ABI = [\n  {\n    name: 'execute',\n    type: 'function',\n    stateMutability: 'payable',\n    inputs: [\n      { name: 'commands', type: 'bytes' },\n      { name: 'inputs', type: 'bytes[]' },\n      { name: 'deadline', type: 'uint256' },\n    ],\n    outputs: [],\n  },\n] as const;\n\nasync function executeRoute(planner: RoutePlanner, options?: { value?: bigint }) {\n  const deadline = BigInt(Math.floor(Date.now() \u002F 1000) + 1800);\n  const routerAddress = UNIVERSAL_ROUTER_ADDRESS('2.0', 1); \u002F\u002F version, chainId\n\n  const { request } = await publicClient.simulateContract({\n    address: routerAddress,\n    abi: ROUTER_ABI,\n    functionName: 'execute',\n    args: [planner.commands, planner.inputs, deadline],\n    account,\n    value: options?.value ?? 0n,\n  });\n\n  return walletClient.writeContract(request);\n}\n",[15925],{"type":46,"tag":80,"props":15926,"children":15927},{"__ignoreMap":402},[15928,15967,15974,15994,16002,16031,16059,16088,16104,16162,16219,16275,16286,16306,16313,16334,16341,16410,16496,16554,16561,16609,16628,16648,16675,16734,16746,16787,16802,16809,16844],{"type":46,"tag":470,"props":15929,"children":15930},{"class":472,"line":473},[15931,15935,15939,15943,15947,15951,15955,15959,15963],{"type":46,"tag":470,"props":15932,"children":15933},{"style":525},[15934],{"type":51,"value":528},{"type":46,"tag":470,"props":15936,"children":15937},{"style":531},[15938],{"type":51,"value":534},{"type":46,"tag":470,"props":15940,"children":15941},{"style":537},[15942],{"type":51,"value":10364},{"type":46,"tag":470,"props":15944,"children":15945},{"style":531},[15946],{"type":51,"value":545},{"type":46,"tag":470,"props":15948,"children":15949},{"style":525},[15950],{"type":51,"value":550},{"type":46,"tag":470,"props":15952,"children":15953},{"style":531},[15954],{"type":51,"value":555},{"type":46,"tag":470,"props":15956,"children":15957},{"style":483},[15958],{"type":51,"value":560},{"type":46,"tag":470,"props":15960,"children":15961},{"style":531},[15962],{"type":51,"value":565},{"type":46,"tag":470,"props":15964,"children":15965},{"style":531},[15966],{"type":51,"value":570},{"type":46,"tag":470,"props":15968,"children":15969},{"class":472,"line":573},[15970],{"type":46,"tag":470,"props":15971,"children":15972},{"emptyLinePlaceholder":577},[15973],{"type":51,"value":580},{"type":46,"tag":470,"props":15975,"children":15976},{"class":472,"line":583},[15977,15981,15986,15990],{"type":46,"tag":470,"props":15978,"children":15979},{"style":587},[15980],{"type":51,"value":590},{"type":46,"tag":470,"props":15982,"children":15983},{"style":537},[15984],{"type":51,"value":15985}," ROUTER_ABI ",{"type":46,"tag":470,"props":15987,"children":15988},{"style":531},[15989],{"type":51,"value":3438},{"type":46,"tag":470,"props":15991,"children":15992},{"style":537},[15993],{"type":51,"value":2909},{"type":46,"tag":470,"props":15995,"children":15996},{"class":472,"line":1046},[15997],{"type":46,"tag":470,"props":15998,"children":15999},{"style":531},[16000],{"type":51,"value":16001},"  {\n",{"type":46,"tag":470,"props":16003,"children":16004},{"class":472,"line":1084},[16005,16010,16014,16018,16023,16027],{"type":46,"tag":470,"props":16006,"children":16007},{"style":2780},[16008],{"type":51,"value":16009},"    name",{"type":46,"tag":470,"props":16011,"children":16012},{"style":531},[16013],{"type":51,"value":417},{"type":46,"tag":470,"props":16015,"children":16016},{"style":531},[16017],{"type":51,"value":555},{"type":46,"tag":470,"props":16019,"children":16020},{"style":483},[16021],{"type":51,"value":16022},"execute",{"type":46,"tag":470,"props":16024,"children":16025},{"style":531},[16026],{"type":51,"value":565},{"type":46,"tag":470,"props":16028,"children":16029},{"style":531},[16030],{"type":51,"value":1007},{"type":46,"tag":470,"props":16032,"children":16033},{"class":472,"line":1111},[16034,16039,16043,16047,16051,16055],{"type":46,"tag":470,"props":16035,"children":16036},{"style":2780},[16037],{"type":51,"value":16038},"    type",{"type":46,"tag":470,"props":16040,"children":16041},{"style":531},[16042],{"type":51,"value":417},{"type":46,"tag":470,"props":16044,"children":16045},{"style":531},[16046],{"type":51,"value":555},{"type":46,"tag":470,"props":16048,"children":16049},{"style":483},[16050],{"type":51,"value":4362},{"type":46,"tag":470,"props":16052,"children":16053},{"style":531},[16054],{"type":51,"value":565},{"type":46,"tag":470,"props":16056,"children":16057},{"style":531},[16058],{"type":51,"value":1007},{"type":46,"tag":470,"props":16060,"children":16061},{"class":472,"line":1314},[16062,16067,16071,16075,16080,16084],{"type":46,"tag":470,"props":16063,"children":16064},{"style":2780},[16065],{"type":51,"value":16066},"    stateMutability",{"type":46,"tag":470,"props":16068,"children":16069},{"style":531},[16070],{"type":51,"value":417},{"type":46,"tag":470,"props":16072,"children":16073},{"style":531},[16074],{"type":51,"value":555},{"type":46,"tag":470,"props":16076,"children":16077},{"style":483},[16078],{"type":51,"value":16079},"payable",{"type":46,"tag":470,"props":16081,"children":16082},{"style":531},[16083],{"type":51,"value":565},{"type":46,"tag":470,"props":16085,"children":16086},{"style":531},[16087],{"type":51,"value":1007},{"type":46,"tag":470,"props":16089,"children":16090},{"class":472,"line":1338},[16091,16096,16100],{"type":46,"tag":470,"props":16092,"children":16093},{"style":2780},[16094],{"type":51,"value":16095},"    inputs",{"type":46,"tag":470,"props":16097,"children":16098},{"style":531},[16099],{"type":51,"value":417},{"type":46,"tag":470,"props":16101,"children":16102},{"style":537},[16103],{"type":51,"value":2909},{"type":46,"tag":470,"props":16105,"children":16106},{"class":472,"line":1347},[16107,16112,16116,16120,16124,16129,16133,16137,16141,16145,16149,16154,16158],{"type":46,"tag":470,"props":16108,"children":16109},{"style":531},[16110],{"type":51,"value":16111},"      {",{"type":46,"tag":470,"props":16113,"children":16114},{"style":2780},[16115],{"type":51,"value":12435},{"type":46,"tag":470,"props":16117,"children":16118},{"style":531},[16119],{"type":51,"value":417},{"type":46,"tag":470,"props":16121,"children":16122},{"style":531},[16123],{"type":51,"value":555},{"type":46,"tag":470,"props":16125,"children":16126},{"style":483},[16127],{"type":51,"value":16128},"commands",{"type":46,"tag":470,"props":16130,"children":16131},{"style":531},[16132],{"type":51,"value":565},{"type":46,"tag":470,"props":16134,"children":16135},{"style":531},[16136],{"type":51,"value":604},{"type":46,"tag":470,"props":16138,"children":16139},{"style":2780},[16140],{"type":51,"value":10714},{"type":46,"tag":470,"props":16142,"children":16143},{"style":531},[16144],{"type":51,"value":417},{"type":46,"tag":470,"props":16146,"children":16147},{"style":531},[16148],{"type":51,"value":555},{"type":46,"tag":470,"props":16150,"children":16151},{"style":483},[16152],{"type":51,"value":16153},"bytes",{"type":46,"tag":470,"props":16155,"children":16156},{"style":531},[16157],{"type":51,"value":565},{"type":46,"tag":470,"props":16159,"children":16160},{"style":531},[16161],{"type":51,"value":2161},{"type":46,"tag":470,"props":16163,"children":16164},{"class":472,"line":1705},[16165,16169,16173,16177,16181,16186,16190,16194,16198,16202,16206,16211,16215],{"type":46,"tag":470,"props":16166,"children":16167},{"style":531},[16168],{"type":51,"value":16111},{"type":46,"tag":470,"props":16170,"children":16171},{"style":2780},[16172],{"type":51,"value":12435},{"type":46,"tag":470,"props":16174,"children":16175},{"style":531},[16176],{"type":51,"value":417},{"type":46,"tag":470,"props":16178,"children":16179},{"style":531},[16180],{"type":51,"value":555},{"type":46,"tag":470,"props":16182,"children":16183},{"style":483},[16184],{"type":51,"value":16185},"inputs",{"type":46,"tag":470,"props":16187,"children":16188},{"style":531},[16189],{"type":51,"value":565},{"type":46,"tag":470,"props":16191,"children":16192},{"style":531},[16193],{"type":51,"value":604},{"type":46,"tag":470,"props":16195,"children":16196},{"style":2780},[16197],{"type":51,"value":10714},{"type":46,"tag":470,"props":16199,"children":16200},{"style":531},[16201],{"type":51,"value":417},{"type":46,"tag":470,"props":16203,"children":16204},{"style":531},[16205],{"type":51,"value":555},{"type":46,"tag":470,"props":16207,"children":16208},{"style":483},[16209],{"type":51,"value":16210},"bytes[]",{"type":46,"tag":470,"props":16212,"children":16213},{"style":531},[16214],{"type":51,"value":565},{"type":46,"tag":470,"props":16216,"children":16217},{"style":531},[16218],{"type":51,"value":2161},{"type":46,"tag":470,"props":16220,"children":16221},{"class":472,"line":1740},[16222,16226,16230,16234,16238,16242,16246,16250,16254,16258,16262,16267,16271],{"type":46,"tag":470,"props":16223,"children":16224},{"style":531},[16225],{"type":51,"value":16111},{"type":46,"tag":470,"props":16227,"children":16228},{"style":2780},[16229],{"type":51,"value":12435},{"type":46,"tag":470,"props":16231,"children":16232},{"style":531},[16233],{"type":51,"value":417},{"type":46,"tag":470,"props":16235,"children":16236},{"style":531},[16237],{"type":51,"value":555},{"type":46,"tag":470,"props":16239,"children":16240},{"style":483},[16241],{"type":51,"value":2693},{"type":46,"tag":470,"props":16243,"children":16244},{"style":531},[16245],{"type":51,"value":565},{"type":46,"tag":470,"props":16247,"children":16248},{"style":531},[16249],{"type":51,"value":604},{"type":46,"tag":470,"props":16251,"children":16252},{"style":2780},[16253],{"type":51,"value":10714},{"type":46,"tag":470,"props":16255,"children":16256},{"style":531},[16257],{"type":51,"value":417},{"type":46,"tag":470,"props":16259,"children":16260},{"style":531},[16261],{"type":51,"value":555},{"type":46,"tag":470,"props":16263,"children":16264},{"style":483},[16265],{"type":51,"value":16266},"uint256",{"type":46,"tag":470,"props":16268,"children":16269},{"style":531},[16270],{"type":51,"value":565},{"type":46,"tag":470,"props":16272,"children":16273},{"style":531},[16274],{"type":51,"value":2161},{"type":46,"tag":470,"props":16276,"children":16277},{"class":472,"line":2421},[16278,16282],{"type":46,"tag":470,"props":16279,"children":16280},{"style":537},[16281],{"type":51,"value":7905},{"type":46,"tag":470,"props":16283,"children":16284},{"style":531},[16285],{"type":51,"value":1007},{"type":46,"tag":470,"props":16287,"children":16288},{"class":472,"line":2447},[16289,16294,16298,16302],{"type":46,"tag":470,"props":16290,"children":16291},{"style":2780},[16292],{"type":51,"value":16293},"    outputs",{"type":46,"tag":470,"props":16295,"children":16296},{"style":531},[16297],{"type":51,"value":417},{"type":46,"tag":470,"props":16299,"children":16300},{"style":537},[16301],{"type":51,"value":12403},{"type":46,"tag":470,"props":16303,"children":16304},{"style":531},[16305],{"type":51,"value":1007},{"type":46,"tag":470,"props":16307,"children":16308},{"class":472,"line":2877},[16309],{"type":46,"tag":470,"props":16310,"children":16311},{"style":531},[16312],{"type":51,"value":2418},{"type":46,"tag":470,"props":16314,"children":16315},{"class":472,"line":2886},[16316,16321,16326,16330],{"type":46,"tag":470,"props":16317,"children":16318},{"style":537},[16319],{"type":51,"value":16320},"] ",{"type":46,"tag":470,"props":16322,"children":16323},{"style":525},[16324],{"type":51,"value":16325},"as",{"type":46,"tag":470,"props":16327,"children":16328},{"style":587},[16329],{"type":51,"value":10789},{"type":46,"tag":470,"props":16331,"children":16332},{"style":531},[16333],{"type":51,"value":570},{"type":46,"tag":470,"props":16335,"children":16336},{"class":472,"line":2912},[16337],{"type":46,"tag":470,"props":16338,"children":16339},{"emptyLinePlaceholder":577},[16340],{"type":51,"value":580},{"type":46,"tag":470,"props":16342,"children":16343},{"class":472,"line":2921},[16344,16348,16352,16356,16360,16364,16368,16372,16376,16381,16385,16389,16393,16397,16401,16406],{"type":46,"tag":470,"props":16345,"children":16346},{"style":587},[16347],{"type":51,"value":14200},{"type":46,"tag":470,"props":16349,"children":16350},{"style":587},[16351],{"type":51,"value":14205},{"type":46,"tag":470,"props":16353,"children":16354},{"style":631},[16355],{"type":51,"value":14529},{"type":46,"tag":470,"props":16357,"children":16358},{"style":531},[16359],{"type":51,"value":835},{"type":46,"tag":470,"props":16361,"children":16362},{"style":4374},[16363],{"type":51,"value":14538},{"type":46,"tag":470,"props":16365,"children":16366},{"style":531},[16367],{"type":51,"value":417},{"type":46,"tag":470,"props":16369,"children":16370},{"style":477},[16371],{"type":51,"value":13915},{"type":46,"tag":470,"props":16373,"children":16374},{"style":531},[16375],{"type":51,"value":604},{"type":46,"tag":470,"props":16377,"children":16378},{"style":4374},[16379],{"type":51,"value":16380}," options",{"type":46,"tag":470,"props":16382,"children":16383},{"style":531},[16384],{"type":51,"value":5218},{"type":46,"tag":470,"props":16386,"children":16387},{"style":531},[16388],{"type":51,"value":534},{"type":46,"tag":470,"props":16390,"children":16391},{"style":2780},[16392],{"type":51,"value":14947},{"type":46,"tag":470,"props":16394,"children":16395},{"style":531},[16396],{"type":51,"value":5218},{"type":46,"tag":470,"props":16398,"children":16399},{"style":477},[16400],{"type":51,"value":14243},{"type":46,"tag":470,"props":16402,"children":16403},{"style":531},[16404],{"type":51,"value":16405}," })",{"type":46,"tag":470,"props":16407,"children":16408},{"style":531},[16409],{"type":51,"value":1165},{"type":46,"tag":470,"props":16411,"children":16412},{"class":472,"line":2958},[16413,16417,16422,16426,16430,16434,16439,16443,16447,16451,16456,16460,16464,16468,16472,16476,16480,16484,16488,16492],{"type":46,"tag":470,"props":16414,"children":16415},{"style":587},[16416],{"type":51,"value":5252},{"type":46,"tag":470,"props":16418,"children":16419},{"style":537},[16420],{"type":51,"value":16421}," deadline",{"type":46,"tag":470,"props":16423,"children":16424},{"style":531},[16425],{"type":51,"value":619},{"type":46,"tag":470,"props":16427,"children":16428},{"style":631},[16429],{"type":51,"value":13848},{"type":46,"tag":470,"props":16431,"children":16432},{"style":2780},[16433],{"type":51,"value":835},{"type":46,"tag":470,"props":16435,"children":16436},{"style":537},[16437],{"type":51,"value":16438},"Math",{"type":46,"tag":470,"props":16440,"children":16441},{"style":531},[16442],{"type":51,"value":628},{"type":46,"tag":470,"props":16444,"children":16445},{"style":631},[16446],{"type":51,"value":10233},{"type":46,"tag":470,"props":16448,"children":16449},{"style":2780},[16450],{"type":51,"value":835},{"type":46,"tag":470,"props":16452,"children":16453},{"style":537},[16454],{"type":51,"value":16455},"Date",{"type":46,"tag":470,"props":16457,"children":16458},{"style":531},[16459],{"type":51,"value":628},{"type":46,"tag":470,"props":16461,"children":16462},{"style":631},[16463],{"type":51,"value":10247},{"type":46,"tag":470,"props":16465,"children":16466},{"style":2780},[16467],{"type":51,"value":10252},{"type":46,"tag":470,"props":16469,"children":16470},{"style":531},[16471],{"type":51,"value":7480},{"type":46,"tag":470,"props":16473,"children":16474},{"style":1105},[16475],{"type":51,"value":10261},{"type":46,"tag":470,"props":16477,"children":16478},{"style":2780},[16479],{"type":51,"value":3781},{"type":46,"tag":470,"props":16481,"children":16482},{"style":531},[16483],{"type":51,"value":10270},{"type":46,"tag":470,"props":16485,"children":16486},{"style":1105},[16487],{"type":51,"value":13712},{"type":46,"tag":470,"props":16489,"children":16490},{"style":2780},[16491],{"type":51,"value":842},{"type":46,"tag":470,"props":16493,"children":16494},{"style":531},[16495],{"type":51,"value":570},{"type":46,"tag":470,"props":16497,"children":16498},{"class":472,"line":2994},[16499,16503,16508,16512,16516,16520,16524,16529,16533,16537,16541,16545,16549],{"type":46,"tag":470,"props":16500,"children":16501},{"style":587},[16502],{"type":51,"value":5252},{"type":46,"tag":470,"props":16504,"children":16505},{"style":537},[16506],{"type":51,"value":16507}," routerAddress",{"type":46,"tag":470,"props":16509,"children":16510},{"style":531},[16511],{"type":51,"value":619},{"type":46,"tag":470,"props":16513,"children":16514},{"style":631},[16515],{"type":51,"value":10364},{"type":46,"tag":470,"props":16517,"children":16518},{"style":2780},[16519],{"type":51,"value":835},{"type":46,"tag":470,"props":16521,"children":16522},{"style":531},[16523],{"type":51,"value":565},{"type":46,"tag":470,"props":16525,"children":16526},{"style":483},[16527],{"type":51,"value":16528},"2.0",{"type":46,"tag":470,"props":16530,"children":16531},{"style":531},[16532],{"type":51,"value":565},{"type":46,"tag":470,"props":16534,"children":16535},{"style":531},[16536],{"type":51,"value":604},{"type":46,"tag":470,"props":16538,"children":16539},{"style":1105},[16540],{"type":51,"value":4286},{"type":46,"tag":470,"props":16542,"children":16543},{"style":2780},[16544],{"type":51,"value":842},{"type":46,"tag":470,"props":16546,"children":16547},{"style":531},[16548],{"type":51,"value":799},{"type":46,"tag":470,"props":16550,"children":16551},{"style":3418},[16552],{"type":51,"value":16553}," \u002F\u002F version, chainId\n",{"type":46,"tag":470,"props":16555,"children":16556},{"class":472,"line":3031},[16557],{"type":46,"tag":470,"props":16558,"children":16559},{"emptyLinePlaceholder":577},[16560],{"type":51,"value":580},{"type":46,"tag":470,"props":16562,"children":16563},{"class":472,"line":3064},[16564,16568,16572,16576,16580,16584,16588,16592,16596,16601,16605],{"type":46,"tag":470,"props":16565,"children":16566},{"style":587},[16567],{"type":51,"value":5252},{"type":46,"tag":470,"props":16569,"children":16570},{"style":531},[16571],{"type":51,"value":534},{"type":46,"tag":470,"props":16573,"children":16574},{"style":537},[16575],{"type":51,"value":5309},{"type":46,"tag":470,"props":16577,"children":16578},{"style":531},[16579],{"type":51,"value":545},{"type":46,"tag":470,"props":16581,"children":16582},{"style":531},[16583],{"type":51,"value":619},{"type":46,"tag":470,"props":16585,"children":16586},{"style":525},[16587],{"type":51,"value":3443},{"type":46,"tag":470,"props":16589,"children":16590},{"style":537},[16591],{"type":51,"value":10833},{"type":46,"tag":470,"props":16593,"children":16594},{"style":531},[16595],{"type":51,"value":628},{"type":46,"tag":470,"props":16597,"children":16598},{"style":631},[16599],{"type":51,"value":16600},"simulateContract",{"type":46,"tag":470,"props":16602,"children":16603},{"style":2780},[16604],{"type":51,"value":835},{"type":46,"tag":470,"props":16606,"children":16607},{"style":531},[16608],{"type":51,"value":967},{"type":46,"tag":470,"props":16610,"children":16611},{"class":472,"line":3073},[16612,16616,16620,16624],{"type":46,"tag":470,"props":16613,"children":16614},{"style":2780},[16615],{"type":51,"value":11073},{"type":46,"tag":470,"props":16617,"children":16618},{"style":531},[16619],{"type":51,"value":417},{"type":46,"tag":470,"props":16621,"children":16622},{"style":537},[16623],{"type":51,"value":16507},{"type":46,"tag":470,"props":16625,"children":16626},{"style":531},[16627],{"type":51,"value":1007},{"type":46,"tag":470,"props":16629,"children":16630},{"class":472,"line":3082},[16631,16635,16639,16644],{"type":46,"tag":470,"props":16632,"children":16633},{"style":2780},[16634],{"type":51,"value":11093},{"type":46,"tag":470,"props":16636,"children":16637},{"style":531},[16638],{"type":51,"value":417},{"type":46,"tag":470,"props":16640,"children":16641},{"style":537},[16642],{"type":51,"value":16643}," ROUTER_ABI",{"type":46,"tag":470,"props":16645,"children":16646},{"style":531},[16647],{"type":51,"value":1007},{"type":46,"tag":470,"props":16649,"children":16650},{"class":472,"line":3106},[16651,16655,16659,16663,16667,16671],{"type":46,"tag":470,"props":16652,"children":16653},{"style":2780},[16654],{"type":51,"value":11114},{"type":46,"tag":470,"props":16656,"children":16657},{"style":531},[16658],{"type":51,"value":417},{"type":46,"tag":470,"props":16660,"children":16661},{"style":531},[16662],{"type":51,"value":555},{"type":46,"tag":470,"props":16664,"children":16665},{"style":483},[16666],{"type":51,"value":16022},{"type":46,"tag":470,"props":16668,"children":16669},{"style":531},[16670],{"type":51,"value":565},{"type":46,"tag":470,"props":16672,"children":16673},{"style":531},[16674],{"type":51,"value":1007},{"type":46,"tag":470,"props":16676,"children":16677},{"class":472,"line":3115},[16678,16682,16686,16690,16694,16698,16702,16706,16710,16714,16718,16722,16726,16730],{"type":46,"tag":470,"props":16679,"children":16680},{"style":2780},[16681],{"type":51,"value":11143},{"type":46,"tag":470,"props":16683,"children":16684},{"style":531},[16685],{"type":51,"value":417},{"type":46,"tag":470,"props":16687,"children":16688},{"style":2780},[16689],{"type":51,"value":7102},{"type":46,"tag":470,"props":16691,"children":16692},{"style":537},[16693],{"type":51,"value":14538},{"type":46,"tag":470,"props":16695,"children":16696},{"style":531},[16697],{"type":51,"value":628},{"type":46,"tag":470,"props":16699,"children":16700},{"style":537},[16701],{"type":51,"value":16128},{"type":46,"tag":470,"props":16703,"children":16704},{"style":531},[16705],{"type":51,"value":604},{"type":46,"tag":470,"props":16707,"children":16708},{"style":537},[16709],{"type":51,"value":14280},{"type":46,"tag":470,"props":16711,"children":16712},{"style":531},[16713],{"type":51,"value":628},{"type":46,"tag":470,"props":16715,"children":16716},{"style":537},[16717],{"type":51,"value":16185},{"type":46,"tag":470,"props":16719,"children":16720},{"style":531},[16721],{"type":51,"value":604},{"type":46,"tag":470,"props":16723,"children":16724},{"style":537},[16725],{"type":51,"value":16421},{"type":46,"tag":470,"props":16727,"children":16728},{"style":2780},[16729],{"type":51,"value":7119},{"type":46,"tag":470,"props":16731,"children":16732},{"style":531},[16733],{"type":51,"value":1007},{"type":46,"tag":470,"props":16735,"children":16736},{"class":472,"line":3152},[16737,16742],{"type":46,"tag":470,"props":16738,"children":16739},{"style":537},[16740],{"type":51,"value":16741},"    account",{"type":46,"tag":470,"props":16743,"children":16744},{"style":531},[16745],{"type":51,"value":1007},{"type":46,"tag":470,"props":16747,"children":16748},{"class":472,"line":3185},[16749,16754,16758,16762,16766,16770,16775,16779,16783],{"type":46,"tag":470,"props":16750,"children":16751},{"style":2780},[16752],{"type":51,"value":16753},"    value",{"type":46,"tag":470,"props":16755,"children":16756},{"style":531},[16757],{"type":51,"value":417},{"type":46,"tag":470,"props":16759,"children":16760},{"style":537},[16761],{"type":51,"value":16380},{"type":46,"tag":470,"props":16763,"children":16764},{"style":531},[16765],{"type":51,"value":4433},{"type":46,"tag":470,"props":16767,"children":16768},{"style":537},[16769],{"type":51,"value":1286},{"type":46,"tag":470,"props":16771,"children":16772},{"style":531},[16773],{"type":51,"value":16774}," ??",{"type":46,"tag":470,"props":16776,"children":16777},{"style":1105},[16778],{"type":51,"value":15673},{"type":46,"tag":470,"props":16780,"children":16781},{"style":587},[16782],{"type":51,"value":15678},{"type":46,"tag":470,"props":16784,"children":16785},{"style":531},[16786],{"type":51,"value":1007},{"type":46,"tag":470,"props":16788,"children":16789},{"class":472,"line":3193},[16790,16794,16798],{"type":46,"tag":470,"props":16791,"children":16792},{"style":531},[16793],{"type":51,"value":5596},{"type":46,"tag":470,"props":16795,"children":16796},{"style":2780},[16797],{"type":51,"value":842},{"type":46,"tag":470,"props":16799,"children":16800},{"style":531},[16801],{"type":51,"value":570},{"type":46,"tag":470,"props":16803,"children":16804},{"class":472,"line":3287},[16805],{"type":46,"tag":470,"props":16806,"children":16807},{"emptyLinePlaceholder":577},[16808],{"type":51,"value":580},{"type":46,"tag":470,"props":16810,"children":16811},{"class":472,"line":8743},[16812,16816,16820,16824,16828,16832,16836,16840],{"type":46,"tag":470,"props":16813,"children":16814},{"style":525},[16815],{"type":51,"value":5772},{"type":46,"tag":470,"props":16817,"children":16818},{"style":537},[16819],{"type":51,"value":11049},{"type":46,"tag":470,"props":16821,"children":16822},{"style":531},[16823],{"type":51,"value":628},{"type":46,"tag":470,"props":16825,"children":16826},{"style":631},[16827],{"type":51,"value":905},{"type":46,"tag":470,"props":16829,"children":16830},{"style":2780},[16831],{"type":51,"value":835},{"type":46,"tag":470,"props":16833,"children":16834},{"style":537},[16835],{"type":51,"value":5568},{"type":46,"tag":470,"props":16837,"children":16838},{"style":2780},[16839],{"type":51,"value":842},{"type":46,"tag":470,"props":16841,"children":16842},{"style":531},[16843],{"type":51,"value":570},{"type":46,"tag":470,"props":16845,"children":16846},{"class":472,"line":8752},[16847],{"type":46,"tag":470,"props":16848,"children":16849},{"style":531},[16850],{"type":51,"value":1117},{"type":46,"tag":172,"props":16852,"children":16854},{"id":16853},"command-cheat-sheet",[16855],{"type":51,"value":16856},"Command Cheat Sheet",{"type":46,"tag":93,"props":16858,"children":16859},{},[16860,16875],{"type":46,"tag":97,"props":16861,"children":16862},{},[16863],{"type":46,"tag":101,"props":16864,"children":16865},{},[16866,16870],{"type":46,"tag":105,"props":16867,"children":16868},{},[16869],{"type":51,"value":9574},{"type":46,"tag":105,"props":16871,"children":16872},{},[16873],{"type":51,"value":16874},"Parameters",{"type":46,"tag":116,"props":16876,"children":16877},{},[16878,16890,16902,16919,16935,16947,16959,16971,16983],{"type":46,"tag":101,"props":16879,"children":16880},{},[16881,16885],{"type":46,"tag":123,"props":16882,"children":16883},{},[16884],{"type":51,"value":9594},{"type":46,"tag":123,"props":16886,"children":16887},{},[16888],{"type":51,"value":16889},"(recipient, amountIn, amountOutMin, path, payerIsUser)",{"type":46,"tag":101,"props":16891,"children":16892},{},[16893,16897],{"type":46,"tag":123,"props":16894,"children":16895},{},[16896],{"type":51,"value":9612},{"type":46,"tag":123,"props":16898,"children":16899},{},[16900],{"type":51,"value":16901},"(recipient, amountOut, amountInMax, path, payerIsUser)",{"type":46,"tag":101,"props":16903,"children":16904},{},[16905,16909],{"type":46,"tag":123,"props":16906,"children":16907},{},[16908],{"type":51,"value":9630},{"type":46,"tag":123,"props":16910,"children":16911},{},[16912,16914,16917],{"type":51,"value":16913},"(recipient, amountIn, amountOutMin, path",{"type":46,"tag":470,"props":16915,"children":16916},{},[],{"type":51,"value":16918},", payerIsUser)",{"type":46,"tag":101,"props":16920,"children":16921},{},[16922,16926],{"type":46,"tag":123,"props":16923,"children":16924},{},[16925],{"type":51,"value":9648},{"type":46,"tag":123,"props":16927,"children":16928},{},[16929,16931,16934],{"type":51,"value":16930},"(recipient, amountOut, amountInMax, path",{"type":46,"tag":470,"props":16932,"children":16933},{},[],{"type":51,"value":16918},{"type":46,"tag":101,"props":16936,"children":16937},{},[16938,16942],{"type":46,"tag":123,"props":16939,"children":16940},{},[16941],{"type":51,"value":9750},{"type":46,"tag":123,"props":16943,"children":16944},{},[16945],{"type":51,"value":16946},"(recipient, amount)",{"type":46,"tag":101,"props":16948,"children":16949},{},[16950,16954],{"type":46,"tag":123,"props":16951,"children":16952},{},[16953],{"type":51,"value":9768},{"type":46,"tag":123,"props":16955,"children":16956},{},[16957],{"type":51,"value":16958},"(recipient, amountMin)",{"type":46,"tag":101,"props":16960,"children":16961},{},[16962,16966],{"type":46,"tag":123,"props":16963,"children":16964},{},[16965],{"type":51,"value":9714},{"type":46,"tag":123,"props":16967,"children":16968},{},[16969],{"type":51,"value":16970},"(token, recipient, amountMin)",{"type":46,"tag":101,"props":16972,"children":16973},{},[16974,16978],{"type":46,"tag":123,"props":16975,"children":16976},{},[16977],{"type":51,"value":9732},{"type":46,"tag":123,"props":16979,"children":16980},{},[16981],{"type":51,"value":16982},"(token, recipient, amount)",{"type":46,"tag":101,"props":16984,"children":16985},{},[16986,16990],{"type":46,"tag":123,"props":16987,"children":16988},{},[16989],{"type":51,"value":15749},{"type":46,"tag":123,"props":16991,"children":16992},{},[16993],{"type":51,"value":16994},"(token, recipient, bips)",{"type":46,"tag":172,"props":16996,"children":16998},{"id":16997},"fee-tiers",[16999],{"type":51,"value":17000},"Fee Tiers",{"type":46,"tag":93,"props":17002,"children":17003},{},[17004,17025],{"type":46,"tag":97,"props":17005,"children":17006},{},[17007],{"type":46,"tag":101,"props":17008,"children":17009},{},[17010,17015,17020],{"type":46,"tag":105,"props":17011,"children":17012},{},[17013],{"type":51,"value":17014},"Tier",{"type":46,"tag":105,"props":17016,"children":17017},{},[17018],{"type":51,"value":17019},"Value",{"type":46,"tag":105,"props":17021,"children":17022},{},[17023],{"type":51,"value":17024},"Percentage",{"type":46,"tag":116,"props":17026,"children":17027},{},[17028,17046,17064,17082],{"type":46,"tag":101,"props":17029,"children":17030},{},[17031,17036,17041],{"type":46,"tag":123,"props":17032,"children":17033},{},[17034],{"type":51,"value":17035},"LOWEST",{"type":46,"tag":123,"props":17037,"children":17038},{},[17039],{"type":51,"value":17040},"100",{"type":46,"tag":123,"props":17042,"children":17043},{},[17044],{"type":51,"value":17045},"0.01%",{"type":46,"tag":101,"props":17047,"children":17048},{},[17049,17054,17059],{"type":46,"tag":123,"props":17050,"children":17051},{},[17052],{"type":51,"value":17053},"LOW",{"type":46,"tag":123,"props":17055,"children":17056},{},[17057],{"type":51,"value":17058},"500",{"type":46,"tag":123,"props":17060,"children":17061},{},[17062],{"type":51,"value":17063},"0.05%",{"type":46,"tag":101,"props":17065,"children":17066},{},[17067,17072,17077],{"type":46,"tag":123,"props":17068,"children":17069},{},[17070],{"type":51,"value":17071},"MEDIUM",{"type":46,"tag":123,"props":17073,"children":17074},{},[17075],{"type":51,"value":17076},"3000",{"type":46,"tag":123,"props":17078,"children":17079},{},[17080],{"type":51,"value":17081},"0.30%",{"type":46,"tag":101,"props":17083,"children":17084},{},[17085,17090,17095],{"type":46,"tag":123,"props":17086,"children":17087},{},[17088],{"type":51,"value":17089},"HIGH",{"type":46,"tag":123,"props":17091,"children":17092},{},[17093],{"type":51,"value":17094},"10000",{"type":46,"tag":123,"props":17096,"children":17097},{},[17098],{"type":51,"value":17099},"1.00%",{"type":46,"tag":704,"props":17101,"children":17102},{},[],{"type":46,"tag":60,"props":17104,"children":17106},{"id":17105},"common-integration-patterns",[17107],{"type":51,"value":17108},"Common Integration Patterns",{"type":46,"tag":172,"props":17110,"children":17112},{"id":17111},"frontend-swap-hook-react",[17113],{"type":51,"value":17114},"Frontend Swap Hook (React)",{"type":46,"tag":54,"props":17116,"children":17117},{},[17118,17122,17124,17130,17132,17138],{"type":46,"tag":72,"props":17119,"children":17120},{},[17121],{"type":51,"value":1756},{"type":51,"value":17123},": Ensure you've set up the Buffer polyfill and CORS proxy (see Critical Implementation Notes). For wagmi v2 ",{"type":46,"tag":80,"props":17125,"children":17127},{"className":17126},[],[17128],{"type":51,"value":17129},"useWalletClient()",{"type":51,"value":17131}," pitfalls, see ",{"type":46,"tag":300,"props":17133,"children":17135},{"href":17134},"#wagmi-v2-integration-pitfalls",[17136],{"type":51,"value":17137},"wagmi v2 Integration Pitfalls",{"type":51,"value":4900},{"type":46,"tag":397,"props":17140,"children":17142},{"className":513,"code":17141,"language":515,"meta":402,"style":402},"import { isAddress, isHex } from 'viem';\nimport { useWalletClient } from 'wagmi';\n\n\u002F\u002F In browser apps, use your CORS proxy path instead (see CORS Proxy Configuration)\n\u002F\u002F e.g., const API_URL = '\u002Fapi\u002Funiswap';\nconst API_URL = 'https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1';\n\nfunction useSwap() {\n  const { data: walletClient } = useWalletClient();\n  const [quoteResponse, setQuoteResponse] = useState(null);\n  const [loading, setLoading] = useState(false);\n  const [error, setError] = useState(null);\n\n  const getQuote = async (params) => {\n    setLoading(true);\n    setError(null);\n    try {\n      const response = await fetch(`${API_URL}\u002Fquote`, {\n        method: 'POST',\n        headers: {\n          'Content-Type': 'application\u002Fjson',\n          'x-api-key': API_KEY,\n          'x-universal-router-version': '2.0',\n        },\n        body: JSON.stringify(params),\n      });\n      const data = await response.json();\n      if (!response.ok) throw new Error(data.detail || 'Quote failed');\n      setQuoteResponse(data); \u002F\u002F Store the FULL response, not just data.quote\n    } catch (err) {\n      setError(err.message);\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const executeSwap = async (permit2Signature?: string) => {\n    if (!quoteResponse) throw new Error('No quote available');\n\n    \u002F\u002F Strip null fields and spread quote response into body\n    const { permitData, permitTransaction, ...cleanQuote } = quoteResponse;\n    const swapRequest: Record\u003Cstring, unknown> = { ...cleanQuote };\n\n    \u002F\u002F CRITICAL: permitData handling differs by routing type\n    const isUniswapX =\n      quoteResponse.routing === 'DUTCH_V2' ||\n      quoteResponse.routing === 'DUTCH_V3' ||\n      quoteResponse.routing === 'PRIORITY';\n\n    if (isUniswapX) {\n      \u002F\u002F UniswapX: signature only — permitData must NOT be sent to \u002Fswap\n      \u002F\u002F (permitData is used locally to sign the order, not submitted to the API)\n      if (permit2Signature) swapRequest.signature = permit2Signature;\n    } else {\n      \u002F\u002F CLASSIC: both signature and permitData required together, or both omitted\n      if (permit2Signature && permitData && typeof permitData === 'object') {\n        swapRequest.signature = permit2Signature;\n        swapRequest.permitData = permitData;\n      }\n    }\n\n    const swapResponse = await fetch(`${API_URL}\u002Fswap`, {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application\u002Fjson',\n        'x-api-key': API_KEY,\n        'x-universal-router-version': '2.0',\n      },\n      body: JSON.stringify(swapRequest),\n    });\n    const data = await swapResponse.json();\n    if (!swapResponse.ok) throw new Error(data.detail || 'Swap failed');\n\n    \u002F\u002F CRITICAL: Validate response before broadcasting\n    if (!data.swap?.data || data.swap.data === '' || data.swap.data === '0x') {\n      throw new Error('Empty swap data - quote may have expired. Please refresh.');\n    }\n\n    \u002F\u002F Send transaction via wallet (walletClient from useWalletClient())\n    if (!walletClient) throw new Error('Wallet not connected');\n    const tx = await walletClient.sendTransaction(data.swap);\n    return tx;\n  };\n\n  return { quote: quoteResponse?.quote, loading, error, getQuote, executeSwap };\n}\n",[17143],{"type":46,"tag":80,"props":17144,"children":17145},{"__ignoreMap":402},[17146,17193,17233,17240,17248,17256,17288,17295,17315,17359,17412,17466,17519,17526,17568,17592,17616,17628,17687,17715,17731,17769,17797,17833,17841,17883,17899,17938,18025,18054,18084,18117,18133,18157,18164,18171,18178,18226,18286,18293,18301,18352,18411,18418,18426,18441,18477,18512,18547,18554,18577,18585,18593,18636,18651,18659,18718,18746,18773,18781,18788,18795,18851,18879,18895,18931,18958,18994,19002,19043,19059,19099,19185,19193,19202,19318,19360,19368,19376,19385,19447,19504,19520,19528,19536,19607],{"type":46,"tag":470,"props":17147,"children":17148},{"class":472,"line":473},[17149,17153,17157,17161,17165,17169,17173,17177,17181,17185,17189],{"type":46,"tag":470,"props":17150,"children":17151},{"style":525},[17152],{"type":51,"value":528},{"type":46,"tag":470,"props":17154,"children":17155},{"style":531},[17156],{"type":51,"value":534},{"type":46,"tag":470,"props":17158,"children":17159},{"style":537},[17160],{"type":51,"value":6072},{"type":46,"tag":470,"props":17162,"children":17163},{"style":531},[17164],{"type":51,"value":604},{"type":46,"tag":470,"props":17166,"children":17167},{"style":537},[17168],{"type":51,"value":6081},{"type":46,"tag":470,"props":17170,"children":17171},{"style":531},[17172],{"type":51,"value":545},{"type":46,"tag":470,"props":17174,"children":17175},{"style":525},[17176],{"type":51,"value":550},{"type":46,"tag":470,"props":17178,"children":17179},{"style":531},[17180],{"type":51,"value":555},{"type":46,"tag":470,"props":17182,"children":17183},{"style":483},[17184],{"type":51,"value":6098},{"type":46,"tag":470,"props":17186,"children":17187},{"style":531},[17188],{"type":51,"value":565},{"type":46,"tag":470,"props":17190,"children":17191},{"style":531},[17192],{"type":51,"value":570},{"type":46,"tag":470,"props":17194,"children":17195},{"class":472,"line":573},[17196,17200,17204,17209,17213,17217,17221,17225,17229],{"type":46,"tag":470,"props":17197,"children":17198},{"style":525},[17199],{"type":51,"value":528},{"type":46,"tag":470,"props":17201,"children":17202},{"style":531},[17203],{"type":51,"value":534},{"type":46,"tag":470,"props":17205,"children":17206},{"style":537},[17207],{"type":51,"value":17208}," useWalletClient",{"type":46,"tag":470,"props":17210,"children":17211},{"style":531},[17212],{"type":51,"value":545},{"type":46,"tag":470,"props":17214,"children":17215},{"style":525},[17216],{"type":51,"value":550},{"type":46,"tag":470,"props":17218,"children":17219},{"style":531},[17220],{"type":51,"value":555},{"type":46,"tag":470,"props":17222,"children":17223},{"style":483},[17224],{"type":51,"value":6953},{"type":46,"tag":470,"props":17226,"children":17227},{"style":531},[17228],{"type":51,"value":565},{"type":46,"tag":470,"props":17230,"children":17231},{"style":531},[17232],{"type":51,"value":570},{"type":46,"tag":470,"props":17234,"children":17235},{"class":472,"line":583},[17236],{"type":46,"tag":470,"props":17237,"children":17238},{"emptyLinePlaceholder":577},[17239],{"type":51,"value":580},{"type":46,"tag":470,"props":17241,"children":17242},{"class":472,"line":1046},[17243],{"type":46,"tag":470,"props":17244,"children":17245},{"style":3418},[17246],{"type":51,"value":17247},"\u002F\u002F In browser apps, use your CORS proxy path instead (see CORS Proxy Configuration)\n",{"type":46,"tag":470,"props":17249,"children":17250},{"class":472,"line":1084},[17251],{"type":46,"tag":470,"props":17252,"children":17253},{"style":3418},[17254],{"type":51,"value":17255},"\u002F\u002F e.g., const API_URL = '\u002Fapi\u002Funiswap';\n",{"type":46,"tag":470,"props":17257,"children":17258},{"class":472,"line":1111},[17259,17263,17268,17272,17276,17280,17284],{"type":46,"tag":470,"props":17260,"children":17261},{"style":587},[17262],{"type":51,"value":590},{"type":46,"tag":470,"props":17264,"children":17265},{"style":537},[17266],{"type":51,"value":17267}," API_URL ",{"type":46,"tag":470,"props":17269,"children":17270},{"style":531},[17271],{"type":51,"value":3438},{"type":46,"tag":470,"props":17273,"children":17274},{"style":531},[17275],{"type":51,"value":555},{"type":46,"tag":470,"props":17277,"children":17278},{"style":483},[17279],{"type":51,"value":340},{"type":46,"tag":470,"props":17281,"children":17282},{"style":531},[17283],{"type":51,"value":565},{"type":46,"tag":470,"props":17285,"children":17286},{"style":531},[17287],{"type":51,"value":570},{"type":46,"tag":470,"props":17289,"children":17290},{"class":472,"line":1314},[17291],{"type":46,"tag":470,"props":17292,"children":17293},{"emptyLinePlaceholder":577},[17294],{"type":51,"value":580},{"type":46,"tag":470,"props":17296,"children":17297},{"class":472,"line":1338},[17298,17302,17307,17311],{"type":46,"tag":470,"props":17299,"children":17300},{"style":587},[17301],{"type":51,"value":4362},{"type":46,"tag":470,"props":17303,"children":17304},{"style":631},[17305],{"type":51,"value":17306}," useSwap",{"type":46,"tag":470,"props":17308,"children":17309},{"style":531},[17310],{"type":51,"value":7810},{"type":46,"tag":470,"props":17312,"children":17313},{"style":531},[17314],{"type":51,"value":1165},{"type":46,"tag":470,"props":17316,"children":17317},{"class":472,"line":1347},[17318,17322,17326,17331,17335,17339,17343,17347,17351,17355],{"type":46,"tag":470,"props":17319,"children":17320},{"style":587},[17321],{"type":51,"value":5252},{"type":46,"tag":470,"props":17323,"children":17324},{"style":531},[17325],{"type":51,"value":534},{"type":46,"tag":470,"props":17327,"children":17328},{"style":2780},[17329],{"type":51,"value":17330}," data",{"type":46,"tag":470,"props":17332,"children":17333},{"style":531},[17334],{"type":51,"value":417},{"type":46,"tag":470,"props":17336,"children":17337},{"style":537},[17338],{"type":51,"value":11049},{"type":46,"tag":470,"props":17340,"children":17341},{"style":531},[17342],{"type":51,"value":545},{"type":46,"tag":470,"props":17344,"children":17345},{"style":531},[17346],{"type":51,"value":619},{"type":46,"tag":470,"props":17348,"children":17349},{"style":631},[17350],{"type":51,"value":17208},{"type":46,"tag":470,"props":17352,"children":17353},{"style":2780},[17354],{"type":51,"value":7810},{"type":46,"tag":470,"props":17356,"children":17357},{"style":531},[17358],{"type":51,"value":570},{"type":46,"tag":470,"props":17360,"children":17361},{"class":472,"line":1705},[17362,17366,17370,17374,17378,17383,17387,17391,17396,17400,17404,17408],{"type":46,"tag":470,"props":17363,"children":17364},{"style":587},[17365],{"type":51,"value":5252},{"type":46,"tag":470,"props":17367,"children":17368},{"style":531},[17369],{"type":51,"value":7102},{"type":46,"tag":470,"props":17371,"children":17372},{"style":537},[17373],{"type":51,"value":5094},{"type":46,"tag":470,"props":17375,"children":17376},{"style":531},[17377],{"type":51,"value":604},{"type":46,"tag":470,"props":17379,"children":17380},{"style":537},[17381],{"type":51,"value":17382}," setQuoteResponse",{"type":46,"tag":470,"props":17384,"children":17385},{"style":531},[17386],{"type":51,"value":7119},{"type":46,"tag":470,"props":17388,"children":17389},{"style":531},[17390],{"type":51,"value":619},{"type":46,"tag":470,"props":17392,"children":17393},{"style":631},[17394],{"type":51,"value":17395}," useState",{"type":46,"tag":470,"props":17397,"children":17398},{"style":2780},[17399],{"type":51,"value":835},{"type":46,"tag":470,"props":17401,"children":17402},{"style":531},[17403],{"type":51,"value":1370},{"type":46,"tag":470,"props":17405,"children":17406},{"style":2780},[17407],{"type":51,"value":842},{"type":46,"tag":470,"props":17409,"children":17410},{"style":531},[17411],{"type":51,"value":570},{"type":46,"tag":470,"props":17413,"children":17414},{"class":472,"line":1740},[17415,17419,17423,17428,17432,17437,17441,17445,17449,17453,17458,17462],{"type":46,"tag":470,"props":17416,"children":17417},{"style":587},[17418],{"type":51,"value":5252},{"type":46,"tag":470,"props":17420,"children":17421},{"style":531},[17422],{"type":51,"value":7102},{"type":46,"tag":470,"props":17424,"children":17425},{"style":537},[17426],{"type":51,"value":17427},"loading",{"type":46,"tag":470,"props":17429,"children":17430},{"style":531},[17431],{"type":51,"value":604},{"type":46,"tag":470,"props":17433,"children":17434},{"style":537},[17435],{"type":51,"value":17436}," setLoading",{"type":46,"tag":470,"props":17438,"children":17439},{"style":531},[17440],{"type":51,"value":7119},{"type":46,"tag":470,"props":17442,"children":17443},{"style":531},[17444],{"type":51,"value":619},{"type":46,"tag":470,"props":17446,"children":17447},{"style":631},[17448],{"type":51,"value":17395},{"type":46,"tag":470,"props":17450,"children":17451},{"style":2780},[17452],{"type":51,"value":835},{"type":46,"tag":470,"props":17454,"children":17455},{"style":7420},[17456],{"type":51,"value":17457},"false",{"type":46,"tag":470,"props":17459,"children":17460},{"style":2780},[17461],{"type":51,"value":842},{"type":46,"tag":470,"props":17463,"children":17464},{"style":531},[17465],{"type":51,"value":570},{"type":46,"tag":470,"props":17467,"children":17468},{"class":472,"line":2421},[17469,17473,17477,17482,17486,17491,17495,17499,17503,17507,17511,17515],{"type":46,"tag":470,"props":17470,"children":17471},{"style":587},[17472],{"type":51,"value":5252},{"type":46,"tag":470,"props":17474,"children":17475},{"style":531},[17476],{"type":51,"value":7102},{"type":46,"tag":470,"props":17478,"children":17479},{"style":537},[17480],{"type":51,"value":17481},"error",{"type":46,"tag":470,"props":17483,"children":17484},{"style":531},[17485],{"type":51,"value":604},{"type":46,"tag":470,"props":17487,"children":17488},{"style":537},[17489],{"type":51,"value":17490}," setError",{"type":46,"tag":470,"props":17492,"children":17493},{"style":531},[17494],{"type":51,"value":7119},{"type":46,"tag":470,"props":17496,"children":17497},{"style":531},[17498],{"type":51,"value":619},{"type":46,"tag":470,"props":17500,"children":17501},{"style":631},[17502],{"type":51,"value":17395},{"type":46,"tag":470,"props":17504,"children":17505},{"style":2780},[17506],{"type":51,"value":835},{"type":46,"tag":470,"props":17508,"children":17509},{"style":531},[17510],{"type":51,"value":1370},{"type":46,"tag":470,"props":17512,"children":17513},{"style":2780},[17514],{"type":51,"value":842},{"type":46,"tag":470,"props":17516,"children":17517},{"style":531},[17518],{"type":51,"value":570},{"type":46,"tag":470,"props":17520,"children":17521},{"class":472,"line":2447},[17522],{"type":46,"tag":470,"props":17523,"children":17524},{"emptyLinePlaceholder":577},[17525],{"type":51,"value":580},{"type":46,"tag":470,"props":17527,"children":17528},{"class":472,"line":2877},[17529,17533,17538,17542,17547,17551,17556,17560,17564],{"type":46,"tag":470,"props":17530,"children":17531},{"style":587},[17532],{"type":51,"value":5252},{"type":46,"tag":470,"props":17534,"children":17535},{"style":537},[17536],{"type":51,"value":17537}," getQuote",{"type":46,"tag":470,"props":17539,"children":17540},{"style":531},[17541],{"type":51,"value":619},{"type":46,"tag":470,"props":17543,"children":17544},{"style":587},[17545],{"type":51,"value":17546}," async",{"type":46,"tag":470,"props":17548,"children":17549},{"style":531},[17550],{"type":51,"value":3771},{"type":46,"tag":470,"props":17552,"children":17553},{"style":4374},[17554],{"type":51,"value":17555},"params",{"type":46,"tag":470,"props":17557,"children":17558},{"style":531},[17559],{"type":51,"value":842},{"type":46,"tag":470,"props":17561,"children":17562},{"style":587},[17563],{"type":51,"value":7457},{"type":46,"tag":470,"props":17565,"children":17566},{"style":531},[17567],{"type":51,"value":1165},{"type":46,"tag":470,"props":17569,"children":17570},{"class":472,"line":2886},[17571,17576,17580,17584,17588],{"type":46,"tag":470,"props":17572,"children":17573},{"style":631},[17574],{"type":51,"value":17575},"    setLoading",{"type":46,"tag":470,"props":17577,"children":17578},{"style":2780},[17579],{"type":51,"value":835},{"type":46,"tag":470,"props":17581,"children":17582},{"style":7420},[17583],{"type":51,"value":1935},{"type":46,"tag":470,"props":17585,"children":17586},{"style":2780},[17587],{"type":51,"value":842},{"type":46,"tag":470,"props":17589,"children":17590},{"style":531},[17591],{"type":51,"value":570},{"type":46,"tag":470,"props":17593,"children":17594},{"class":472,"line":2912},[17595,17600,17604,17608,17612],{"type":46,"tag":470,"props":17596,"children":17597},{"style":631},[17598],{"type":51,"value":17599},"    setError",{"type":46,"tag":470,"props":17601,"children":17602},{"style":2780},[17603],{"type":51,"value":835},{"type":46,"tag":470,"props":17605,"children":17606},{"style":531},[17607],{"type":51,"value":1370},{"type":46,"tag":470,"props":17609,"children":17610},{"style":2780},[17611],{"type":51,"value":842},{"type":46,"tag":470,"props":17613,"children":17614},{"style":531},[17615],{"type":51,"value":570},{"type":46,"tag":470,"props":17617,"children":17618},{"class":472,"line":2921},[17619,17624],{"type":46,"tag":470,"props":17620,"children":17621},{"style":525},[17622],{"type":51,"value":17623},"    try",{"type":46,"tag":470,"props":17625,"children":17626},{"style":531},[17627],{"type":51,"value":1165},{"type":46,"tag":470,"props":17629,"children":17630},{"class":472,"line":2958},[17631,17636,17640,17644,17648,17653,17657,17662,17667,17671,17675,17679,17683],{"type":46,"tag":470,"props":17632,"children":17633},{"style":587},[17634],{"type":51,"value":17635},"      const",{"type":46,"tag":470,"props":17637,"children":17638},{"style":537},[17639],{"type":51,"value":4447},{"type":46,"tag":470,"props":17641,"children":17642},{"style":531},[17643],{"type":51,"value":619},{"type":46,"tag":470,"props":17645,"children":17646},{"style":525},[17647],{"type":51,"value":3443},{"type":46,"tag":470,"props":17649,"children":17650},{"style":631},[17651],{"type":51,"value":17652}," fetch",{"type":46,"tag":470,"props":17654,"children":17655},{"style":2780},[17656],{"type":51,"value":835},{"type":46,"tag":470,"props":17658,"children":17659},{"style":531},[17660],{"type":51,"value":17661},"`${",{"type":46,"tag":470,"props":17663,"children":17664},{"style":537},[17665],{"type":51,"value":17666},"API_URL",{"type":46,"tag":470,"props":17668,"children":17669},{"style":531},[17670],{"type":51,"value":614},{"type":46,"tag":470,"props":17672,"children":17673},{"style":483},[17674],{"type":51,"value":11579},{"type":46,"tag":470,"props":17676,"children":17677},{"style":531},[17678],{"type":51,"value":828},{"type":46,"tag":470,"props":17680,"children":17681},{"style":531},[17682],{"type":51,"value":604},{"type":46,"tag":470,"props":17684,"children":17685},{"style":531},[17686],{"type":51,"value":1165},{"type":46,"tag":470,"props":17688,"children":17689},{"class":472,"line":2994},[17690,17695,17699,17703,17707,17711],{"type":46,"tag":470,"props":17691,"children":17692},{"style":2780},[17693],{"type":51,"value":17694},"        method",{"type":46,"tag":470,"props":17696,"children":17697},{"style":531},[17698],{"type":51,"value":417},{"type":46,"tag":470,"props":17700,"children":17701},{"style":531},[17702],{"type":51,"value":555},{"type":46,"tag":470,"props":17704,"children":17705},{"style":483},[17706],{"type":51,"value":936},{"type":46,"tag":470,"props":17708,"children":17709},{"style":531},[17710],{"type":51,"value":565},{"type":46,"tag":470,"props":17712,"children":17713},{"style":531},[17714],{"type":51,"value":1007},{"type":46,"tag":470,"props":17716,"children":17717},{"class":472,"line":3031},[17718,17723,17727],{"type":46,"tag":470,"props":17719,"children":17720},{"style":2780},[17721],{"type":51,"value":17722},"        headers",{"type":46,"tag":470,"props":17724,"children":17725},{"style":531},[17726],{"type":51,"value":417},{"type":46,"tag":470,"props":17728,"children":17729},{"style":531},[17730],{"type":51,"value":1165},{"type":46,"tag":470,"props":17732,"children":17733},{"class":472,"line":3064},[17734,17739,17744,17748,17752,17756,17761,17765],{"type":46,"tag":470,"props":17735,"children":17736},{"style":531},[17737],{"type":51,"value":17738},"          '",{"type":46,"tag":470,"props":17740,"children":17741},{"style":2780},[17742],{"type":51,"value":17743},"Content-Type",{"type":46,"tag":470,"props":17745,"children":17746},{"style":531},[17747],{"type":51,"value":565},{"type":46,"tag":470,"props":17749,"children":17750},{"style":531},[17751],{"type":51,"value":417},{"type":46,"tag":470,"props":17753,"children":17754},{"style":531},[17755],{"type":51,"value":555},{"type":46,"tag":470,"props":17757,"children":17758},{"style":483},[17759],{"type":51,"value":17760},"application\u002Fjson",{"type":46,"tag":470,"props":17762,"children":17763},{"style":531},[17764],{"type":51,"value":565},{"type":46,"tag":470,"props":17766,"children":17767},{"style":531},[17768],{"type":51,"value":1007},{"type":46,"tag":470,"props":17770,"children":17771},{"class":472,"line":3073},[17772,17776,17780,17784,17788,17793],{"type":46,"tag":470,"props":17773,"children":17774},{"style":531},[17775],{"type":51,"value":17738},{"type":46,"tag":470,"props":17777,"children":17778},{"style":2780},[17779],{"type":51,"value":383},{"type":46,"tag":470,"props":17781,"children":17782},{"style":531},[17783],{"type":51,"value":565},{"type":46,"tag":470,"props":17785,"children":17786},{"style":531},[17787],{"type":51,"value":417},{"type":46,"tag":470,"props":17789,"children":17790},{"style":537},[17791],{"type":51,"value":17792}," API_KEY",{"type":46,"tag":470,"props":17794,"children":17795},{"style":531},[17796],{"type":51,"value":1007},{"type":46,"tag":470,"props":17798,"children":17799},{"class":472,"line":3082},[17800,17804,17809,17813,17817,17821,17825,17829],{"type":46,"tag":470,"props":17801,"children":17802},{"style":531},[17803],{"type":51,"value":17738},{"type":46,"tag":470,"props":17805,"children":17806},{"style":2780},[17807],{"type":51,"value":17808},"x-universal-router-version",{"type":46,"tag":470,"props":17810,"children":17811},{"style":531},[17812],{"type":51,"value":565},{"type":46,"tag":470,"props":17814,"children":17815},{"style":531},[17816],{"type":51,"value":417},{"type":46,"tag":470,"props":17818,"children":17819},{"style":531},[17820],{"type":51,"value":555},{"type":46,"tag":470,"props":17822,"children":17823},{"style":483},[17824],{"type":51,"value":16528},{"type":46,"tag":470,"props":17826,"children":17827},{"style":531},[17828],{"type":51,"value":565},{"type":46,"tag":470,"props":17830,"children":17831},{"style":531},[17832],{"type":51,"value":1007},{"type":46,"tag":470,"props":17834,"children":17835},{"class":472,"line":3106},[17836],{"type":46,"tag":470,"props":17837,"children":17838},{"style":531},[17839],{"type":51,"value":17840},"        },\n",{"type":46,"tag":470,"props":17842,"children":17843},{"class":472,"line":3115},[17844,17849,17853,17858,17862,17867,17871,17875,17879],{"type":46,"tag":470,"props":17845,"children":17846},{"style":2780},[17847],{"type":51,"value":17848},"        body",{"type":46,"tag":470,"props":17850,"children":17851},{"style":531},[17852],{"type":51,"value":417},{"type":46,"tag":470,"props":17854,"children":17855},{"style":537},[17856],{"type":51,"value":17857}," JSON",{"type":46,"tag":470,"props":17859,"children":17860},{"style":531},[17861],{"type":51,"value":628},{"type":46,"tag":470,"props":17863,"children":17864},{"style":631},[17865],{"type":51,"value":17866},"stringify",{"type":46,"tag":470,"props":17868,"children":17869},{"style":2780},[17870],{"type":51,"value":835},{"type":46,"tag":470,"props":17872,"children":17873},{"style":537},[17874],{"type":51,"value":17555},{"type":46,"tag":470,"props":17876,"children":17877},{"style":2780},[17878],{"type":51,"value":842},{"type":46,"tag":470,"props":17880,"children":17881},{"style":531},[17882],{"type":51,"value":1007},{"type":46,"tag":470,"props":17884,"children":17885},{"class":472,"line":3152},[17886,17891,17895],{"type":46,"tag":470,"props":17887,"children":17888},{"style":531},[17889],{"type":51,"value":17890},"      }",{"type":46,"tag":470,"props":17892,"children":17893},{"style":2780},[17894],{"type":51,"value":842},{"type":46,"tag":470,"props":17896,"children":17897},{"style":531},[17898],{"type":51,"value":570},{"type":46,"tag":470,"props":17900,"children":17901},{"class":472,"line":3185},[17902,17906,17910,17914,17918,17922,17926,17930,17934],{"type":46,"tag":470,"props":17903,"children":17904},{"style":587},[17905],{"type":51,"value":17635},{"type":46,"tag":470,"props":17907,"children":17908},{"style":537},[17909],{"type":51,"value":17330},{"type":46,"tag":470,"props":17911,"children":17912},{"style":531},[17913],{"type":51,"value":619},{"type":46,"tag":470,"props":17915,"children":17916},{"style":525},[17917],{"type":51,"value":3443},{"type":46,"tag":470,"props":17919,"children":17920},{"style":537},[17921],{"type":51,"value":4447},{"type":46,"tag":470,"props":17923,"children":17924},{"style":531},[17925],{"type":51,"value":628},{"type":46,"tag":470,"props":17927,"children":17928},{"style":631},[17929],{"type":51,"value":955},{"type":46,"tag":470,"props":17931,"children":17932},{"style":2780},[17933],{"type":51,"value":7810},{"type":46,"tag":470,"props":17935,"children":17936},{"style":531},[17937],{"type":51,"value":570},{"type":46,"tag":470,"props":17939,"children":17940},{"class":472,"line":3193},[17941,17946,17950,17954,17958,17962,17967,17971,17975,17979,17983,17987,17991,17995,18000,18004,18008,18013,18017,18021],{"type":46,"tag":470,"props":17942,"children":17943},{"style":525},[17944],{"type":51,"value":17945},"      if",{"type":46,"tag":470,"props":17947,"children":17948},{"style":2780},[17949],{"type":51,"value":3771},{"type":46,"tag":470,"props":17951,"children":17952},{"style":531},[17953],{"type":51,"value":4416},{"type":46,"tag":470,"props":17955,"children":17956},{"style":537},[17957],{"type":51,"value":4377},{"type":46,"tag":470,"props":17959,"children":17960},{"style":531},[17961],{"type":51,"value":628},{"type":46,"tag":470,"props":17963,"children":17964},{"style":537},[17965],{"type":51,"value":17966},"ok",{"type":46,"tag":470,"props":17968,"children":17969},{"style":2780},[17970],{"type":51,"value":3781},{"type":46,"tag":470,"props":17972,"children":17973},{"style":525},[17974],{"type":51,"value":9268},{"type":46,"tag":470,"props":17976,"children":17977},{"style":531},[17978],{"type":51,"value":4534},{"type":46,"tag":470,"props":17980,"children":17981},{"style":631},[17982],{"type":51,"value":4539},{"type":46,"tag":470,"props":17984,"children":17985},{"style":2780},[17986],{"type":51,"value":835},{"type":46,"tag":470,"props":17988,"children":17989},{"style":537},[17990],{"type":51,"value":1250},{"type":46,"tag":470,"props":17992,"children":17993},{"style":531},[17994],{"type":51,"value":628},{"type":46,"tag":470,"props":17996,"children":17997},{"style":537},[17998],{"type":51,"value":17999},"detail",{"type":46,"tag":470,"props":18001,"children":18002},{"style":531},[18003],{"type":51,"value":4442},{"type":46,"tag":470,"props":18005,"children":18006},{"style":531},[18007],{"type":51,"value":555},{"type":46,"tag":470,"props":18009,"children":18010},{"style":483},[18011],{"type":51,"value":18012},"Quote failed",{"type":46,"tag":470,"props":18014,"children":18015},{"style":531},[18016],{"type":51,"value":565},{"type":46,"tag":470,"props":18018,"children":18019},{"style":2780},[18020],{"type":51,"value":842},{"type":46,"tag":470,"props":18022,"children":18023},{"style":531},[18024],{"type":51,"value":570},{"type":46,"tag":470,"props":18026,"children":18027},{"class":472,"line":3287},[18028,18033,18037,18041,18045,18049],{"type":46,"tag":470,"props":18029,"children":18030},{"style":631},[18031],{"type":51,"value":18032},"      setQuoteResponse",{"type":46,"tag":470,"props":18034,"children":18035},{"style":2780},[18036],{"type":51,"value":835},{"type":46,"tag":470,"props":18038,"children":18039},{"style":537},[18040],{"type":51,"value":1250},{"type":46,"tag":470,"props":18042,"children":18043},{"style":2780},[18044],{"type":51,"value":842},{"type":46,"tag":470,"props":18046,"children":18047},{"style":531},[18048],{"type":51,"value":799},{"type":46,"tag":470,"props":18050,"children":18051},{"style":3418},[18052],{"type":51,"value":18053}," \u002F\u002F Store the FULL response, not just data.quote\n",{"type":46,"tag":470,"props":18055,"children":18056},{"class":472,"line":8743},[18057,18062,18067,18071,18076,18080],{"type":46,"tag":470,"props":18058,"children":18059},{"style":531},[18060],{"type":51,"value":18061},"    }",{"type":46,"tag":470,"props":18063,"children":18064},{"style":525},[18065],{"type":51,"value":18066}," catch",{"type":46,"tag":470,"props":18068,"children":18069},{"style":2780},[18070],{"type":51,"value":3771},{"type":46,"tag":470,"props":18072,"children":18073},{"style":537},[18074],{"type":51,"value":18075},"err",{"type":46,"tag":470,"props":18077,"children":18078},{"style":2780},[18079],{"type":51,"value":3781},{"type":46,"tag":470,"props":18081,"children":18082},{"style":531},[18083],{"type":51,"value":967},{"type":46,"tag":470,"props":18085,"children":18086},{"class":472,"line":8752},[18087,18092,18096,18100,18104,18109,18113],{"type":46,"tag":470,"props":18088,"children":18089},{"style":631},[18090],{"type":51,"value":18091},"      setError",{"type":46,"tag":470,"props":18093,"children":18094},{"style":2780},[18095],{"type":51,"value":835},{"type":46,"tag":470,"props":18097,"children":18098},{"style":537},[18099],{"type":51,"value":18075},{"type":46,"tag":470,"props":18101,"children":18102},{"style":531},[18103],{"type":51,"value":628},{"type":46,"tag":470,"props":18105,"children":18106},{"style":537},[18107],{"type":51,"value":18108},"message",{"type":46,"tag":470,"props":18110,"children":18111},{"style":2780},[18112],{"type":51,"value":842},{"type":46,"tag":470,"props":18114,"children":18115},{"style":531},[18116],{"type":51,"value":570},{"type":46,"tag":470,"props":18118,"children":18119},{"class":472,"line":8773},[18120,18124,18129],{"type":46,"tag":470,"props":18121,"children":18122},{"style":531},[18123],{"type":51,"value":18061},{"type":46,"tag":470,"props":18125,"children":18126},{"style":525},[18127],{"type":51,"value":18128}," finally",{"type":46,"tag":470,"props":18130,"children":18131},{"style":531},[18132],{"type":51,"value":1165},{"type":46,"tag":470,"props":18134,"children":18135},{"class":472,"line":8794},[18136,18141,18145,18149,18153],{"type":46,"tag":470,"props":18137,"children":18138},{"style":631},[18139],{"type":51,"value":18140},"      setLoading",{"type":46,"tag":470,"props":18142,"children":18143},{"style":2780},[18144],{"type":51,"value":835},{"type":46,"tag":470,"props":18146,"children":18147},{"style":7420},[18148],{"type":51,"value":17457},{"type":46,"tag":470,"props":18150,"children":18151},{"style":2780},[18152],{"type":51,"value":842},{"type":46,"tag":470,"props":18154,"children":18155},{"style":531},[18156],{"type":51,"value":570},{"type":46,"tag":470,"props":18158,"children":18159},{"class":472,"line":8802},[18160],{"type":46,"tag":470,"props":18161,"children":18162},{"style":531},[18163],{"type":51,"value":5750},{"type":46,"tag":470,"props":18165,"children":18166},{"class":472,"line":29},[18167],{"type":46,"tag":470,"props":18168,"children":18169},{"style":531},[18170],{"type":51,"value":8324},{"type":46,"tag":470,"props":18172,"children":18173},{"class":472,"line":8858},[18174],{"type":46,"tag":470,"props":18175,"children":18176},{"emptyLinePlaceholder":577},[18177],{"type":51,"value":580},{"type":46,"tag":470,"props":18179,"children":18180},{"class":472,"line":8866},[18181,18185,18190,18194,18198,18202,18206,18210,18214,18218,18222],{"type":46,"tag":470,"props":18182,"children":18183},{"style":587},[18184],{"type":51,"value":5252},{"type":46,"tag":470,"props":18186,"children":18187},{"style":537},[18188],{"type":51,"value":18189}," executeSwap",{"type":46,"tag":470,"props":18191,"children":18192},{"style":531},[18193],{"type":51,"value":619},{"type":46,"tag":470,"props":18195,"children":18196},{"style":587},[18197],{"type":51,"value":17546},{"type":46,"tag":470,"props":18199,"children":18200},{"style":531},[18201],{"type":51,"value":3771},{"type":46,"tag":470,"props":18203,"children":18204},{"style":4374},[18205],{"type":51,"value":3776},{"type":46,"tag":470,"props":18207,"children":18208},{"style":531},[18209],{"type":51,"value":5218},{"type":46,"tag":470,"props":18211,"children":18212},{"style":477},[18213],{"type":51,"value":5223},{"type":46,"tag":470,"props":18215,"children":18216},{"style":531},[18217],{"type":51,"value":842},{"type":46,"tag":470,"props":18219,"children":18220},{"style":587},[18221],{"type":51,"value":7457},{"type":46,"tag":470,"props":18223,"children":18224},{"style":531},[18225],{"type":51,"value":1165},{"type":46,"tag":470,"props":18227,"children":18228},{"class":472,"line":8874},[18229,18233,18237,18241,18245,18249,18253,18257,18261,18265,18269,18274,18278,18282],{"type":46,"tag":470,"props":18230,"children":18231},{"style":525},[18232],{"type":51,"value":5551},{"type":46,"tag":470,"props":18234,"children":18235},{"style":2780},[18236],{"type":51,"value":3771},{"type":46,"tag":470,"props":18238,"children":18239},{"style":531},[18240],{"type":51,"value":4416},{"type":46,"tag":470,"props":18242,"children":18243},{"style":537},[18244],{"type":51,"value":5094},{"type":46,"tag":470,"props":18246,"children":18247},{"style":2780},[18248],{"type":51,"value":3781},{"type":46,"tag":470,"props":18250,"children":18251},{"style":525},[18252],{"type":51,"value":9268},{"type":46,"tag":470,"props":18254,"children":18255},{"style":531},[18256],{"type":51,"value":4534},{"type":46,"tag":470,"props":18258,"children":18259},{"style":631},[18260],{"type":51,"value":4539},{"type":46,"tag":470,"props":18262,"children":18263},{"style":2780},[18264],{"type":51,"value":835},{"type":46,"tag":470,"props":18266,"children":18267},{"style":531},[18268],{"type":51,"value":565},{"type":46,"tag":470,"props":18270,"children":18271},{"style":483},[18272],{"type":51,"value":18273},"No quote available",{"type":46,"tag":470,"props":18275,"children":18276},{"style":531},[18277],{"type":51,"value":565},{"type":46,"tag":470,"props":18279,"children":18280},{"style":2780},[18281],{"type":51,"value":842},{"type":46,"tag":470,"props":18283,"children":18284},{"style":531},[18285],{"type":51,"value":570},{"type":46,"tag":470,"props":18287,"children":18288},{"class":472,"line":8906},[18289],{"type":46,"tag":470,"props":18290,"children":18291},{"emptyLinePlaceholder":577},[18292],{"type":51,"value":580},{"type":46,"tag":470,"props":18294,"children":18295},{"class":472,"line":8914},[18296],{"type":46,"tag":470,"props":18297,"children":18298},{"style":3418},[18299],{"type":51,"value":18300},"    \u002F\u002F Strip null fields and spread quote response into body\n",{"type":46,"tag":470,"props":18302,"children":18303},{"class":472,"line":8923},[18304,18308,18312,18316,18320,18324,18328,18332,18336,18340,18344,18348],{"type":46,"tag":470,"props":18305,"children":18306},{"style":587},[18307],{"type":51,"value":9184},{"type":46,"tag":470,"props":18309,"children":18310},{"style":531},[18311],{"type":51,"value":534},{"type":46,"tag":470,"props":18313,"children":18314},{"style":537},[18315],{"type":51,"value":3488},{"type":46,"tag":470,"props":18317,"children":18318},{"style":531},[18319],{"type":51,"value":604},{"type":46,"tag":470,"props":18321,"children":18322},{"style":537},[18323],{"type":51,"value":3497},{"type":46,"tag":470,"props":18325,"children":18326},{"style":531},[18327],{"type":51,"value":604},{"type":46,"tag":470,"props":18329,"children":18330},{"style":531},[18331],{"type":51,"value":3506},{"type":46,"tag":470,"props":18333,"children":18334},{"style":537},[18335],{"type":51,"value":5281},{"type":46,"tag":470,"props":18337,"children":18338},{"style":531},[18339],{"type":51,"value":545},{"type":46,"tag":470,"props":18341,"children":18342},{"style":531},[18343],{"type":51,"value":619},{"type":46,"tag":470,"props":18345,"children":18346},{"style":537},[18347],{"type":51,"value":3524},{"type":46,"tag":470,"props":18349,"children":18350},{"style":531},[18351],{"type":51,"value":570},{"type":46,"tag":470,"props":18353,"children":18354},{"class":472,"line":8975},[18355,18359,18363,18367,18371,18375,18379,18383,18387,18391,18395,18399,18403,18407],{"type":46,"tag":470,"props":18356,"children":18357},{"style":587},[18358],{"type":51,"value":9184},{"type":46,"tag":470,"props":18360,"children":18361},{"style":537},[18362],{"type":51,"value":3540},{"type":46,"tag":470,"props":18364,"children":18365},{"style":531},[18366],{"type":51,"value":417},{"type":46,"tag":470,"props":18368,"children":18369},{"style":477},[18370],{"type":51,"value":3549},{"type":46,"tag":470,"props":18372,"children":18373},{"style":531},[18374],{"type":51,"value":856},{"type":46,"tag":470,"props":18376,"children":18377},{"style":477},[18378],{"type":51,"value":3558},{"type":46,"tag":470,"props":18380,"children":18381},{"style":531},[18382],{"type":51,"value":604},{"type":46,"tag":470,"props":18384,"children":18385},{"style":477},[18386],{"type":51,"value":3567},{"type":46,"tag":470,"props":18388,"children":18389},{"style":531},[18390],{"type":51,"value":849},{"type":46,"tag":470,"props":18392,"children":18393},{"style":531},[18394],{"type":51,"value":619},{"type":46,"tag":470,"props":18396,"children":18397},{"style":531},[18398],{"type":51,"value":534},{"type":46,"tag":470,"props":18400,"children":18401},{"style":531},[18402],{"type":51,"value":3506},{"type":46,"tag":470,"props":18404,"children":18405},{"style":537},[18406],{"type":51,"value":5281},{"type":46,"tag":470,"props":18408,"children":18409},{"style":531},[18410],{"type":51,"value":5358},{"type":46,"tag":470,"props":18412,"children":18413},{"class":472,"line":9079},[18414],{"type":46,"tag":470,"props":18415,"children":18416},{"emptyLinePlaceholder":577},[18417],{"type":51,"value":580},{"type":46,"tag":470,"props":18419,"children":18420},{"class":472,"line":9087},[18421],{"type":46,"tag":470,"props":18422,"children":18423},{"style":3418},[18424],{"type":51,"value":18425},"    \u002F\u002F CRITICAL: permitData handling differs by routing type\n",{"type":46,"tag":470,"props":18427,"children":18428},{"class":472,"line":9095},[18429,18433,18437],{"type":46,"tag":470,"props":18430,"children":18431},{"style":587},[18432],{"type":51,"value":9184},{"type":46,"tag":470,"props":18434,"children":18435},{"style":537},[18436],{"type":51,"value":5401},{"type":46,"tag":470,"props":18438,"children":18439},{"style":531},[18440],{"type":51,"value":5406},{"type":46,"tag":470,"props":18442,"children":18443},{"class":472,"line":9104},[18444,18449,18453,18457,18461,18465,18469,18473],{"type":46,"tag":470,"props":18445,"children":18446},{"style":537},[18447],{"type":51,"value":18448},"      quoteResponse",{"type":46,"tag":470,"props":18450,"children":18451},{"style":531},[18452],{"type":51,"value":628},{"type":46,"tag":470,"props":18454,"children":18455},{"style":537},[18456],{"type":51,"value":2024},{"type":46,"tag":470,"props":18458,"children":18459},{"style":531},[18460],{"type":51,"value":3874},{"type":46,"tag":470,"props":18462,"children":18463},{"style":531},[18464],{"type":51,"value":555},{"type":46,"tag":470,"props":18466,"children":18467},{"style":483},[18468],{"type":51,"value":230},{"type":46,"tag":470,"props":18470,"children":18471},{"style":531},[18472],{"type":51,"value":565},{"type":46,"tag":470,"props":18474,"children":18475},{"style":531},[18476],{"type":51,"value":3655},{"type":46,"tag":470,"props":18478,"children":18479},{"class":472,"line":9145},[18480,18484,18488,18492,18496,18500,18504,18508],{"type":46,"tag":470,"props":18481,"children":18482},{"style":537},[18483],{"type":51,"value":18448},{"type":46,"tag":470,"props":18485,"children":18486},{"style":531},[18487],{"type":51,"value":628},{"type":46,"tag":470,"props":18489,"children":18490},{"style":537},[18491],{"type":51,"value":2024},{"type":46,"tag":470,"props":18493,"children":18494},{"style":531},[18495],{"type":51,"value":3874},{"type":46,"tag":470,"props":18497,"children":18498},{"style":531},[18499],{"type":51,"value":555},{"type":46,"tag":470,"props":18501,"children":18502},{"style":483},[18503],{"type":51,"value":3683},{"type":46,"tag":470,"props":18505,"children":18506},{"style":531},[18507],{"type":51,"value":565},{"type":46,"tag":470,"props":18509,"children":18510},{"style":531},[18511],{"type":51,"value":3655},{"type":46,"tag":470,"props":18513,"children":18514},{"class":472,"line":9178},[18515,18519,18523,18527,18531,18535,18539,18543],{"type":46,"tag":470,"props":18516,"children":18517},{"style":537},[18518],{"type":51,"value":18448},{"type":46,"tag":470,"props":18520,"children":18521},{"style":531},[18522],{"type":51,"value":628},{"type":46,"tag":470,"props":18524,"children":18525},{"style":537},[18526],{"type":51,"value":2024},{"type":46,"tag":470,"props":18528,"children":18529},{"style":531},[18530],{"type":51,"value":3874},{"type":46,"tag":470,"props":18532,"children":18533},{"style":531},[18534],{"type":51,"value":555},{"type":46,"tag":470,"props":18536,"children":18537},{"style":483},[18538],{"type":51,"value":248},{"type":46,"tag":470,"props":18540,"children":18541},{"style":531},[18542],{"type":51,"value":565},{"type":46,"tag":470,"props":18544,"children":18545},{"style":531},[18546],{"type":51,"value":570},{"type":46,"tag":470,"props":18548,"children":18549},{"class":472,"line":9241},[18550],{"type":46,"tag":470,"props":18551,"children":18552},{"emptyLinePlaceholder":577},[18553],{"type":51,"value":580},{"type":46,"tag":470,"props":18555,"children":18556},{"class":472,"line":9304},[18557,18561,18565,18569,18573],{"type":46,"tag":470,"props":18558,"children":18559},{"style":525},[18560],{"type":51,"value":5551},{"type":46,"tag":470,"props":18562,"children":18563},{"style":2780},[18564],{"type":51,"value":3771},{"type":46,"tag":470,"props":18566,"children":18567},{"style":537},[18568],{"type":51,"value":5535},{"type":46,"tag":470,"props":18570,"children":18571},{"style":2780},[18572],{"type":51,"value":3781},{"type":46,"tag":470,"props":18574,"children":18575},{"style":531},[18576],{"type":51,"value":967},{"type":46,"tag":470,"props":18578,"children":18579},{"class":472,"line":9313},[18580],{"type":46,"tag":470,"props":18581,"children":18582},{"style":3418},[18583],{"type":51,"value":18584},"      \u002F\u002F UniswapX: signature only — permitData must NOT be sent to \u002Fswap\n",{"type":46,"tag":470,"props":18586,"children":18587},{"class":472,"line":9337},[18588],{"type":46,"tag":470,"props":18589,"children":18590},{"style":3418},[18591],{"type":51,"value":18592},"      \u002F\u002F (permitData is used locally to sign the order, not submitted to the API)\n",{"type":46,"tag":470,"props":18594,"children":18595},{"class":472,"line":9345},[18596,18600,18604,18608,18612,18616,18620,18624,18628,18632],{"type":46,"tag":470,"props":18597,"children":18598},{"style":525},[18599],{"type":51,"value":17945},{"type":46,"tag":470,"props":18601,"children":18602},{"style":2780},[18603],{"type":51,"value":3771},{"type":46,"tag":470,"props":18605,"children":18606},{"style":537},[18607],{"type":51,"value":3776},{"type":46,"tag":470,"props":18609,"children":18610},{"style":2780},[18611],{"type":51,"value":3781},{"type":46,"tag":470,"props":18613,"children":18614},{"style":537},[18615],{"type":51,"value":3786},{"type":46,"tag":470,"props":18617,"children":18618},{"style":531},[18619],{"type":51,"value":628},{"type":46,"tag":470,"props":18621,"children":18622},{"style":537},[18623],{"type":51,"value":3795},{"type":46,"tag":470,"props":18625,"children":18626},{"style":531},[18627],{"type":51,"value":619},{"type":46,"tag":470,"props":18629,"children":18630},{"style":537},[18631],{"type":51,"value":3804},{"type":46,"tag":470,"props":18633,"children":18634},{"style":531},[18635],{"type":51,"value":570},{"type":46,"tag":470,"props":18637,"children":18638},{"class":472,"line":9385},[18639,18643,18647],{"type":46,"tag":470,"props":18640,"children":18641},{"style":531},[18642],{"type":51,"value":18061},{"type":46,"tag":470,"props":18644,"children":18645},{"style":525},[18646],{"type":51,"value":3820},{"type":46,"tag":470,"props":18648,"children":18649},{"style":531},[18650],{"type":51,"value":1165},{"type":46,"tag":470,"props":18652,"children":18653},{"class":472,"line":13530},[18654],{"type":46,"tag":470,"props":18655,"children":18656},{"style":3418},[18657],{"type":51,"value":18658},"      \u002F\u002F CLASSIC: both signature and permitData required together, or both omitted\n",{"type":46,"tag":470,"props":18660,"children":18661},{"class":472,"line":13586},[18662,18666,18670,18674,18678,18682,18686,18690,18694,18698,18702,18706,18710,18714],{"type":46,"tag":470,"props":18663,"children":18664},{"style":525},[18665],{"type":51,"value":17945},{"type":46,"tag":470,"props":18667,"children":18668},{"style":2780},[18669],{"type":51,"value":3771},{"type":46,"tag":470,"props":18671,"children":18672},{"style":537},[18673],{"type":51,"value":3776},{"type":46,"tag":470,"props":18675,"children":18676},{"style":531},[18677],{"type":51,"value":3852},{"type":46,"tag":470,"props":18679,"children":18680},{"style":537},[18681],{"type":51,"value":3488},{"type":46,"tag":470,"props":18683,"children":18684},{"style":531},[18685],{"type":51,"value":3852},{"type":46,"tag":470,"props":18687,"children":18688},{"style":531},[18689],{"type":51,"value":3865},{"type":46,"tag":470,"props":18691,"children":18692},{"style":537},[18693],{"type":51,"value":3488},{"type":46,"tag":470,"props":18695,"children":18696},{"style":531},[18697],{"type":51,"value":3874},{"type":46,"tag":470,"props":18699,"children":18700},{"style":531},[18701],{"type":51,"value":555},{"type":46,"tag":470,"props":18703,"children":18704},{"style":483},[18705],{"type":51,"value":3883},{"type":46,"tag":470,"props":18707,"children":18708},{"style":531},[18709],{"type":51,"value":565},{"type":46,"tag":470,"props":18711,"children":18712},{"style":2780},[18713],{"type":51,"value":3781},{"type":46,"tag":470,"props":18715,"children":18716},{"style":531},[18717],{"type":51,"value":967},{"type":46,"tag":470,"props":18719,"children":18720},{"class":472,"line":13634},[18721,18726,18730,18734,18738,18742],{"type":46,"tag":470,"props":18722,"children":18723},{"style":537},[18724],{"type":51,"value":18725},"        swapRequest",{"type":46,"tag":470,"props":18727,"children":18728},{"style":531},[18729],{"type":51,"value":628},{"type":46,"tag":470,"props":18731,"children":18732},{"style":537},[18733],{"type":51,"value":3795},{"type":46,"tag":470,"props":18735,"children":18736},{"style":531},[18737],{"type":51,"value":619},{"type":46,"tag":470,"props":18739,"children":18740},{"style":537},[18741],{"type":51,"value":3804},{"type":46,"tag":470,"props":18743,"children":18744},{"style":531},[18745],{"type":51,"value":570},{"type":46,"tag":470,"props":18747,"children":18748},{"class":472,"line":13654},[18749,18753,18757,18761,18765,18769],{"type":46,"tag":470,"props":18750,"children":18751},{"style":537},[18752],{"type":51,"value":18725},{"type":46,"tag":470,"props":18754,"children":18755},{"style":531},[18756],{"type":51,"value":628},{"type":46,"tag":470,"props":18758,"children":18759},{"style":537},[18760],{"type":51,"value":2431},{"type":46,"tag":470,"props":18762,"children":18763},{"style":531},[18764],{"type":51,"value":619},{"type":46,"tag":470,"props":18766,"children":18767},{"style":537},[18768],{"type":51,"value":3488},{"type":46,"tag":470,"props":18770,"children":18771},{"style":531},[18772],{"type":51,"value":570},{"type":46,"tag":470,"props":18774,"children":18775},{"class":472,"line":13719},[18776],{"type":46,"tag":470,"props":18777,"children":18778},{"style":531},[18779],{"type":51,"value":18780},"      }\n",{"type":46,"tag":470,"props":18782,"children":18783},{"class":472,"line":13735},[18784],{"type":46,"tag":470,"props":18785,"children":18786},{"style":531},[18787],{"type":51,"value":5750},{"type":46,"tag":470,"props":18789,"children":18790},{"class":472,"line":13743},[18791],{"type":46,"tag":470,"props":18792,"children":18793},{"emptyLinePlaceholder":577},[18794],{"type":51,"value":580},{"type":46,"tag":470,"props":18796,"children":18797},{"class":472,"line":13752},[18798,18802,18807,18811,18815,18819,18823,18827,18831,18835,18839,18843,18847],{"type":46,"tag":470,"props":18799,"children":18800},{"style":587},[18801],{"type":51,"value":9184},{"type":46,"tag":470,"props":18803,"children":18804},{"style":537},[18805],{"type":51,"value":18806}," swapResponse",{"type":46,"tag":470,"props":18808,"children":18809},{"style":531},[18810],{"type":51,"value":619},{"type":46,"tag":470,"props":18812,"children":18813},{"style":525},[18814],{"type":51,"value":3443},{"type":46,"tag":470,"props":18816,"children":18817},{"style":631},[18818],{"type":51,"value":17652},{"type":46,"tag":470,"props":18820,"children":18821},{"style":2780},[18822],{"type":51,"value":835},{"type":46,"tag":470,"props":18824,"children":18825},{"style":531},[18826],{"type":51,"value":17661},{"type":46,"tag":470,"props":18828,"children":18829},{"style":537},[18830],{"type":51,"value":17666},{"type":46,"tag":470,"props":18832,"children":18833},{"style":531},[18834],{"type":51,"value":614},{"type":46,"tag":470,"props":18836,"children":18837},{"style":483},[18838],{"type":51,"value":4066},{"type":46,"tag":470,"props":18840,"children":18841},{"style":531},[18842],{"type":51,"value":828},{"type":46,"tag":470,"props":18844,"children":18845},{"style":531},[18846],{"type":51,"value":604},{"type":46,"tag":470,"props":18848,"children":18849},{"style":531},[18850],{"type":51,"value":1165},{"type":46,"tag":470,"props":18852,"children":18853},{"class":472,"line":13793},[18854,18859,18863,18867,18871,18875],{"type":46,"tag":470,"props":18855,"children":18856},{"style":2780},[18857],{"type":51,"value":18858},"      method",{"type":46,"tag":470,"props":18860,"children":18861},{"style":531},[18862],{"type":51,"value":417},{"type":46,"tag":470,"props":18864,"children":18865},{"style":531},[18866],{"type":51,"value":555},{"type":46,"tag":470,"props":18868,"children":18869},{"style":483},[18870],{"type":51,"value":936},{"type":46,"tag":470,"props":18872,"children":18873},{"style":531},[18874],{"type":51,"value":565},{"type":46,"tag":470,"props":18876,"children":18877},{"style":531},[18878],{"type":51,"value":1007},{"type":46,"tag":470,"props":18880,"children":18881},{"class":472,"line":13813},[18882,18887,18891],{"type":46,"tag":470,"props":18883,"children":18884},{"style":2780},[18885],{"type":51,"value":18886},"      headers",{"type":46,"tag":470,"props":18888,"children":18889},{"style":531},[18890],{"type":51,"value":417},{"type":46,"tag":470,"props":18892,"children":18893},{"style":531},[18894],{"type":51,"value":1165},{"type":46,"tag":470,"props":18896,"children":18897},{"class":472,"line":13833},[18898,18903,18907,18911,18915,18919,18923,18927],{"type":46,"tag":470,"props":18899,"children":18900},{"style":531},[18901],{"type":51,"value":18902},"        '",{"type":46,"tag":470,"props":18904,"children":18905},{"style":2780},[18906],{"type":51,"value":17743},{"type":46,"tag":470,"props":18908,"children":18909},{"style":531},[18910],{"type":51,"value":565},{"type":46,"tag":470,"props":18912,"children":18913},{"style":531},[18914],{"type":51,"value":417},{"type":46,"tag":470,"props":18916,"children":18917},{"style":531},[18918],{"type":51,"value":555},{"type":46,"tag":470,"props":18920,"children":18921},{"style":483},[18922],{"type":51,"value":17760},{"type":46,"tag":470,"props":18924,"children":18925},{"style":531},[18926],{"type":51,"value":565},{"type":46,"tag":470,"props":18928,"children":18929},{"style":531},[18930],{"type":51,"value":1007},{"type":46,"tag":470,"props":18932,"children":18933},{"class":472,"line":13860},[18934,18938,18942,18946,18950,18954],{"type":46,"tag":470,"props":18935,"children":18936},{"style":531},[18937],{"type":51,"value":18902},{"type":46,"tag":470,"props":18939,"children":18940},{"style":2780},[18941],{"type":51,"value":383},{"type":46,"tag":470,"props":18943,"children":18944},{"style":531},[18945],{"type":51,"value":565},{"type":46,"tag":470,"props":18947,"children":18948},{"style":531},[18949],{"type":51,"value":417},{"type":46,"tag":470,"props":18951,"children":18952},{"style":537},[18953],{"type":51,"value":17792},{"type":46,"tag":470,"props":18955,"children":18956},{"style":531},[18957],{"type":51,"value":1007},{"type":46,"tag":470,"props":18959,"children":18961},{"class":472,"line":18960},67,[18962,18966,18970,18974,18978,18982,18986,18990],{"type":46,"tag":470,"props":18963,"children":18964},{"style":531},[18965],{"type":51,"value":18902},{"type":46,"tag":470,"props":18967,"children":18968},{"style":2780},[18969],{"type":51,"value":17808},{"type":46,"tag":470,"props":18971,"children":18972},{"style":531},[18973],{"type":51,"value":565},{"type":46,"tag":470,"props":18975,"children":18976},{"style":531},[18977],{"type":51,"value":417},{"type":46,"tag":470,"props":18979,"children":18980},{"style":531},[18981],{"type":51,"value":555},{"type":46,"tag":470,"props":18983,"children":18984},{"style":483},[18985],{"type":51,"value":16528},{"type":46,"tag":470,"props":18987,"children":18988},{"style":531},[18989],{"type":51,"value":565},{"type":46,"tag":470,"props":18991,"children":18992},{"style":531},[18993],{"type":51,"value":1007},{"type":46,"tag":470,"props":18995,"children":18997},{"class":472,"line":18996},68,[18998],{"type":46,"tag":470,"props":18999,"children":19000},{"style":531},[19001],{"type":51,"value":2883},{"type":46,"tag":470,"props":19003,"children":19005},{"class":472,"line":19004},69,[19006,19011,19015,19019,19023,19027,19031,19035,19039],{"type":46,"tag":470,"props":19007,"children":19008},{"style":2780},[19009],{"type":51,"value":19010},"      body",{"type":46,"tag":470,"props":19012,"children":19013},{"style":531},[19014],{"type":51,"value":417},{"type":46,"tag":470,"props":19016,"children":19017},{"style":537},[19018],{"type":51,"value":17857},{"type":46,"tag":470,"props":19020,"children":19021},{"style":531},[19022],{"type":51,"value":628},{"type":46,"tag":470,"props":19024,"children":19025},{"style":631},[19026],{"type":51,"value":17866},{"type":46,"tag":470,"props":19028,"children":19029},{"style":2780},[19030],{"type":51,"value":835},{"type":46,"tag":470,"props":19032,"children":19033},{"style":537},[19034],{"type":51,"value":3786},{"type":46,"tag":470,"props":19036,"children":19037},{"style":2780},[19038],{"type":51,"value":842},{"type":46,"tag":470,"props":19040,"children":19041},{"style":531},[19042],{"type":51,"value":1007},{"type":46,"tag":470,"props":19044,"children":19046},{"class":472,"line":19045},70,[19047,19051,19055],{"type":46,"tag":470,"props":19048,"children":19049},{"style":531},[19050],{"type":51,"value":18061},{"type":46,"tag":470,"props":19052,"children":19053},{"style":2780},[19054],{"type":51,"value":842},{"type":46,"tag":470,"props":19056,"children":19057},{"style":531},[19058],{"type":51,"value":570},{"type":46,"tag":470,"props":19060,"children":19062},{"class":472,"line":19061},71,[19063,19067,19071,19075,19079,19083,19087,19091,19095],{"type":46,"tag":470,"props":19064,"children":19065},{"style":587},[19066],{"type":51,"value":9184},{"type":46,"tag":470,"props":19068,"children":19069},{"style":537},[19070],{"type":51,"value":17330},{"type":46,"tag":470,"props":19072,"children":19073},{"style":531},[19074],{"type":51,"value":619},{"type":46,"tag":470,"props":19076,"children":19077},{"style":525},[19078],{"type":51,"value":3443},{"type":46,"tag":470,"props":19080,"children":19081},{"style":537},[19082],{"type":51,"value":18806},{"type":46,"tag":470,"props":19084,"children":19085},{"style":531},[19086],{"type":51,"value":628},{"type":46,"tag":470,"props":19088,"children":19089},{"style":631},[19090],{"type":51,"value":955},{"type":46,"tag":470,"props":19092,"children":19093},{"style":2780},[19094],{"type":51,"value":7810},{"type":46,"tag":470,"props":19096,"children":19097},{"style":531},[19098],{"type":51,"value":570},{"type":46,"tag":470,"props":19100,"children":19102},{"class":472,"line":19101},72,[19103,19107,19111,19115,19120,19124,19128,19132,19136,19140,19144,19148,19152,19156,19160,19164,19168,19173,19177,19181],{"type":46,"tag":470,"props":19104,"children":19105},{"style":525},[19106],{"type":51,"value":5551},{"type":46,"tag":470,"props":19108,"children":19109},{"style":2780},[19110],{"type":51,"value":3771},{"type":46,"tag":470,"props":19112,"children":19113},{"style":531},[19114],{"type":51,"value":4416},{"type":46,"tag":470,"props":19116,"children":19117},{"style":537},[19118],{"type":51,"value":19119},"swapResponse",{"type":46,"tag":470,"props":19121,"children":19122},{"style":531},[19123],{"type":51,"value":628},{"type":46,"tag":470,"props":19125,"children":19126},{"style":537},[19127],{"type":51,"value":17966},{"type":46,"tag":470,"props":19129,"children":19130},{"style":2780},[19131],{"type":51,"value":3781},{"type":46,"tag":470,"props":19133,"children":19134},{"style":525},[19135],{"type":51,"value":9268},{"type":46,"tag":470,"props":19137,"children":19138},{"style":531},[19139],{"type":51,"value":4534},{"type":46,"tag":470,"props":19141,"children":19142},{"style":631},[19143],{"type":51,"value":4539},{"type":46,"tag":470,"props":19145,"children":19146},{"style":2780},[19147],{"type":51,"value":835},{"type":46,"tag":470,"props":19149,"children":19150},{"style":537},[19151],{"type":51,"value":1250},{"type":46,"tag":470,"props":19153,"children":19154},{"style":531},[19155],{"type":51,"value":628},{"type":46,"tag":470,"props":19157,"children":19158},{"style":537},[19159],{"type":51,"value":17999},{"type":46,"tag":470,"props":19161,"children":19162},{"style":531},[19163],{"type":51,"value":4442},{"type":46,"tag":470,"props":19165,"children":19166},{"style":531},[19167],{"type":51,"value":555},{"type":46,"tag":470,"props":19169,"children":19170},{"style":483},[19171],{"type":51,"value":19172},"Swap failed",{"type":46,"tag":470,"props":19174,"children":19175},{"style":531},[19176],{"type":51,"value":565},{"type":46,"tag":470,"props":19178,"children":19179},{"style":2780},[19180],{"type":51,"value":842},{"type":46,"tag":470,"props":19182,"children":19183},{"style":531},[19184],{"type":51,"value":570},{"type":46,"tag":470,"props":19186,"children":19188},{"class":472,"line":19187},73,[19189],{"type":46,"tag":470,"props":19190,"children":19191},{"emptyLinePlaceholder":577},[19192],{"type":51,"value":580},{"type":46,"tag":470,"props":19194,"children":19196},{"class":472,"line":19195},74,[19197],{"type":46,"tag":470,"props":19198,"children":19199},{"style":3418},[19200],{"type":51,"value":19201},"    \u002F\u002F CRITICAL: Validate response before broadcasting\n",{"type":46,"tag":470,"props":19203,"children":19205},{"class":472,"line":19204},75,[19206,19210,19214,19218,19222,19226,19230,19234,19238,19242,19246,19250,19254,19258,19262,19266,19270,19274,19278,19282,19286,19290,19294,19298,19302,19306,19310,19314],{"type":46,"tag":470,"props":19207,"children":19208},{"style":525},[19209],{"type":51,"value":5551},{"type":46,"tag":470,"props":19211,"children":19212},{"style":2780},[19213],{"type":51,"value":3771},{"type":46,"tag":470,"props":19215,"children":19216},{"style":531},[19217],{"type":51,"value":4416},{"type":46,"tag":470,"props":19219,"children":19220},{"style":537},[19221],{"type":51,"value":1250},{"type":46,"tag":470,"props":19223,"children":19224},{"style":531},[19225],{"type":51,"value":628},{"type":46,"tag":470,"props":19227,"children":19228},{"style":537},[19229],{"type":51,"value":4110},{"type":46,"tag":470,"props":19231,"children":19232},{"style":531},[19233],{"type":51,"value":4433},{"type":46,"tag":470,"props":19235,"children":19236},{"style":537},[19237],{"type":51,"value":1250},{"type":46,"tag":470,"props":19239,"children":19240},{"style":531},[19241],{"type":51,"value":4442},{"type":46,"tag":470,"props":19243,"children":19244},{"style":537},[19245],{"type":51,"value":17330},{"type":46,"tag":470,"props":19247,"children":19248},{"style":531},[19249],{"type":51,"value":628},{"type":46,"tag":470,"props":19251,"children":19252},{"style":537},[19253],{"type":51,"value":4110},{"type":46,"tag":470,"props":19255,"children":19256},{"style":531},[19257],{"type":51,"value":628},{"type":46,"tag":470,"props":19259,"children":19260},{"style":537},[19261],{"type":51,"value":1250},{"type":46,"tag":470,"props":19263,"children":19264},{"style":531},[19265],{"type":51,"value":3874},{"type":46,"tag":470,"props":19267,"children":19268},{"style":531},[19269],{"type":51,"value":4472},{"type":46,"tag":470,"props":19271,"children":19272},{"style":531},[19273],{"type":51,"value":4442},{"type":46,"tag":470,"props":19275,"children":19276},{"style":537},[19277],{"type":51,"value":17330},{"type":46,"tag":470,"props":19279,"children":19280},{"style":531},[19281],{"type":51,"value":628},{"type":46,"tag":470,"props":19283,"children":19284},{"style":537},[19285],{"type":51,"value":4110},{"type":46,"tag":470,"props":19287,"children":19288},{"style":531},[19289],{"type":51,"value":628},{"type":46,"tag":470,"props":19291,"children":19292},{"style":537},[19293],{"type":51,"value":1250},{"type":46,"tag":470,"props":19295,"children":19296},{"style":531},[19297],{"type":51,"value":3874},{"type":46,"tag":470,"props":19299,"children":19300},{"style":531},[19301],{"type":51,"value":555},{"type":46,"tag":470,"props":19303,"children":19304},{"style":483},[19305],{"type":51,"value":4509},{"type":46,"tag":470,"props":19307,"children":19308},{"style":531},[19309],{"type":51,"value":565},{"type":46,"tag":470,"props":19311,"children":19312},{"style":2780},[19313],{"type":51,"value":3781},{"type":46,"tag":470,"props":19315,"children":19316},{"style":531},[19317],{"type":51,"value":967},{"type":46,"tag":470,"props":19319,"children":19321},{"class":472,"line":19320},76,[19322,19327,19331,19335,19339,19343,19348,19352,19356],{"type":46,"tag":470,"props":19323,"children":19324},{"style":525},[19325],{"type":51,"value":19326},"      throw",{"type":46,"tag":470,"props":19328,"children":19329},{"style":531},[19330],{"type":51,"value":4534},{"type":46,"tag":470,"props":19332,"children":19333},{"style":631},[19334],{"type":51,"value":4539},{"type":46,"tag":470,"props":19336,"children":19337},{"style":2780},[19338],{"type":51,"value":835},{"type":46,"tag":470,"props":19340,"children":19341},{"style":531},[19342],{"type":51,"value":565},{"type":46,"tag":470,"props":19344,"children":19345},{"style":483},[19346],{"type":51,"value":19347},"Empty swap data - quote may have expired. Please refresh.",{"type":46,"tag":470,"props":19349,"children":19350},{"style":531},[19351],{"type":51,"value":565},{"type":46,"tag":470,"props":19353,"children":19354},{"style":2780},[19355],{"type":51,"value":842},{"type":46,"tag":470,"props":19357,"children":19358},{"style":531},[19359],{"type":51,"value":570},{"type":46,"tag":470,"props":19361,"children":19363},{"class":472,"line":19362},77,[19364],{"type":46,"tag":470,"props":19365,"children":19366},{"style":531},[19367],{"type":51,"value":5750},{"type":46,"tag":470,"props":19369,"children":19371},{"class":472,"line":19370},78,[19372],{"type":46,"tag":470,"props":19373,"children":19374},{"emptyLinePlaceholder":577},[19375],{"type":51,"value":580},{"type":46,"tag":470,"props":19377,"children":19379},{"class":472,"line":19378},79,[19380],{"type":46,"tag":470,"props":19381,"children":19382},{"style":3418},[19383],{"type":51,"value":19384},"    \u002F\u002F Send transaction via wallet (walletClient from useWalletClient())\n",{"type":46,"tag":470,"props":19386,"children":19388},{"class":472,"line":19387},80,[19389,19393,19397,19401,19406,19410,19414,19418,19422,19426,19430,19435,19439,19443],{"type":46,"tag":470,"props":19390,"children":19391},{"style":525},[19392],{"type":51,"value":5551},{"type":46,"tag":470,"props":19394,"children":19395},{"style":2780},[19396],{"type":51,"value":3771},{"type":46,"tag":470,"props":19398,"children":19399},{"style":531},[19400],{"type":51,"value":4416},{"type":46,"tag":470,"props":19402,"children":19403},{"style":537},[19404],{"type":51,"value":19405},"walletClient",{"type":46,"tag":470,"props":19407,"children":19408},{"style":2780},[19409],{"type":51,"value":3781},{"type":46,"tag":470,"props":19411,"children":19412},{"style":525},[19413],{"type":51,"value":9268},{"type":46,"tag":470,"props":19415,"children":19416},{"style":531},[19417],{"type":51,"value":4534},{"type":46,"tag":470,"props":19419,"children":19420},{"style":631},[19421],{"type":51,"value":4539},{"type":46,"tag":470,"props":19423,"children":19424},{"style":2780},[19425],{"type":51,"value":835},{"type":46,"tag":470,"props":19427,"children":19428},{"style":531},[19429],{"type":51,"value":565},{"type":46,"tag":470,"props":19431,"children":19432},{"style":483},[19433],{"type":51,"value":19434},"Wallet not connected",{"type":46,"tag":470,"props":19436,"children":19437},{"style":531},[19438],{"type":51,"value":565},{"type":46,"tag":470,"props":19440,"children":19441},{"style":2780},[19442],{"type":51,"value":842},{"type":46,"tag":470,"props":19444,"children":19445},{"style":531},[19446],{"type":51,"value":570},{"type":46,"tag":470,"props":19448,"children":19450},{"class":472,"line":19449},81,[19451,19455,19460,19464,19468,19472,19476,19480,19484,19488,19492,19496,19500],{"type":46,"tag":470,"props":19452,"children":19453},{"style":587},[19454],{"type":51,"value":9184},{"type":46,"tag":470,"props":19456,"children":19457},{"style":537},[19458],{"type":51,"value":19459}," tx",{"type":46,"tag":470,"props":19461,"children":19462},{"style":531},[19463],{"type":51,"value":619},{"type":46,"tag":470,"props":19465,"children":19466},{"style":525},[19467],{"type":51,"value":3443},{"type":46,"tag":470,"props":19469,"children":19470},{"style":537},[19471],{"type":51,"value":11049},{"type":46,"tag":470,"props":19473,"children":19474},{"style":531},[19475],{"type":51,"value":628},{"type":46,"tag":470,"props":19477,"children":19478},{"style":631},[19479],{"type":51,"value":898},{"type":46,"tag":470,"props":19481,"children":19482},{"style":2780},[19483],{"type":51,"value":835},{"type":46,"tag":470,"props":19485,"children":19486},{"style":537},[19487],{"type":51,"value":1250},{"type":46,"tag":470,"props":19489,"children":19490},{"style":531},[19491],{"type":51,"value":628},{"type":46,"tag":470,"props":19493,"children":19494},{"style":537},[19495],{"type":51,"value":4110},{"type":46,"tag":470,"props":19497,"children":19498},{"style":2780},[19499],{"type":51,"value":842},{"type":46,"tag":470,"props":19501,"children":19502},{"style":531},[19503],{"type":51,"value":570},{"type":46,"tag":470,"props":19505,"children":19507},{"class":472,"line":19506},82,[19508,19512,19516],{"type":46,"tag":470,"props":19509,"children":19510},{"style":525},[19511],{"type":51,"value":7822},{"type":46,"tag":470,"props":19513,"children":19514},{"style":537},[19515],{"type":51,"value":19459},{"type":46,"tag":470,"props":19517,"children":19518},{"style":531},[19519],{"type":51,"value":570},{"type":46,"tag":470,"props":19521,"children":19523},{"class":472,"line":19522},83,[19524],{"type":46,"tag":470,"props":19525,"children":19526},{"style":531},[19527],{"type":51,"value":8324},{"type":46,"tag":470,"props":19529,"children":19531},{"class":472,"line":19530},84,[19532],{"type":46,"tag":470,"props":19533,"children":19534},{"emptyLinePlaceholder":577},[19535],{"type":51,"value":580},{"type":46,"tag":470,"props":19537,"children":19539},{"class":472,"line":19538},85,[19540,19544,19548,19553,19557,19561,19565,19569,19573,19578,19582,19587,19591,19595,19599,19603],{"type":46,"tag":470,"props":19541,"children":19542},{"style":525},[19543],{"type":51,"value":5772},{"type":46,"tag":470,"props":19545,"children":19546},{"style":531},[19547],{"type":51,"value":534},{"type":46,"tag":470,"props":19549,"children":19550},{"style":2780},[19551],{"type":51,"value":19552}," quote",{"type":46,"tag":470,"props":19554,"children":19555},{"style":531},[19556],{"type":51,"value":417},{"type":46,"tag":470,"props":19558,"children":19559},{"style":537},[19560],{"type":51,"value":3524},{"type":46,"tag":470,"props":19562,"children":19563},{"style":531},[19564],{"type":51,"value":4433},{"type":46,"tag":470,"props":19566,"children":19567},{"style":537},[19568],{"type":51,"value":2060},{"type":46,"tag":470,"props":19570,"children":19571},{"style":531},[19572],{"type":51,"value":604},{"type":46,"tag":470,"props":19574,"children":19575},{"style":537},[19576],{"type":51,"value":19577}," loading",{"type":46,"tag":470,"props":19579,"children":19580},{"style":531},[19581],{"type":51,"value":604},{"type":46,"tag":470,"props":19583,"children":19584},{"style":537},[19585],{"type":51,"value":19586}," error",{"type":46,"tag":470,"props":19588,"children":19589},{"style":531},[19590],{"type":51,"value":604},{"type":46,"tag":470,"props":19592,"children":19593},{"style":537},[19594],{"type":51,"value":17537},{"type":46,"tag":470,"props":19596,"children":19597},{"style":531},[19598],{"type":51,"value":604},{"type":46,"tag":470,"props":19600,"children":19601},{"style":537},[19602],{"type":51,"value":18189},{"type":46,"tag":470,"props":19604,"children":19605},{"style":531},[19606],{"type":51,"value":5358},{"type":46,"tag":470,"props":19608,"children":19610},{"class":472,"line":19609},86,[19611],{"type":46,"tag":470,"props":19612,"children":19613},{"style":531},[19614],{"type":51,"value":1117},{"type":46,"tag":172,"props":19616,"children":19618},{"id":19617},"wagmi-v2-integration-pitfalls",[19619],{"type":51,"value":17137},{"type":46,"tag":54,"props":19621,"children":19622},{},[19623,19624,19629,19631,19637,19639,19645,19647,19653],{"type":51,"value":4930},{"type":46,"tag":80,"props":19625,"children":19627},{"className":19626},[],[19628],{"type":51,"value":17129},{"type":51,"value":19630}," hook from wagmi v2 can return ",{"type":46,"tag":80,"props":19632,"children":19634},{"className":19633},[],[19635],{"type":51,"value":19636},"undefined",{"type":51,"value":19638}," even when the wallet is connected — it resolves asynchronously. This causes \"wallet not connected\" errors at swap time. Additionally, the returned client needs a ",{"type":46,"tag":80,"props":19640,"children":19642},{"className":19641},[],[19643],{"type":51,"value":19644},"chain",{"type":51,"value":19646}," for ",{"type":46,"tag":80,"props":19648,"children":19650},{"className":19649},[],[19651],{"type":51,"value":19652},"sendTransaction()",{"type":51,"value":19654}," to work.",{"type":46,"tag":54,"props":19656,"children":19657},{},[19658,19663,19665,19671],{"type":46,"tag":72,"props":19659,"children":19660},{},[19661],{"type":51,"value":19662},"Recommended pattern",{"type":51,"value":19664}," — use ",{"type":46,"tag":80,"props":19666,"children":19668},{"className":19667},[],[19669],{"type":51,"value":19670},"@wagmi\u002Fcore",{"type":51,"value":19672}," action functions at swap time instead of hooks:",{"type":46,"tag":397,"props":19674,"children":19676},{"className":513,"code":19675,"language":515,"meta":402,"style":402},"import { getWalletClient, getPublicClient, switchChain } from '@wagmi\u002Fcore';\nimport type { Config } from 'wagmi';\n\nasync function executeSwapTransaction(\n  config: Config,\n  chainId: number,\n  swapTx: { to: string; data: string; value: string }\n) {\n  \u002F\u002F 1. Ensure the wallet is on the correct chain\n  await switchChain(config, { chainId });\n\n  \u002F\u002F 2. Get wallet client with explicit chainId — avoids undefined and missing chain\n  const walletClient = await getWalletClient(config, { chainId });\n\n  \u002F\u002F 3. Execute the swap\n  const hash = await walletClient.sendTransaction({\n    to: swapTx.to as `0x${string}`,\n    data: swapTx.data as `0x${string}`,\n    value: BigInt(swapTx.value || '0'),\n  });\n\n  \u002F\u002F 4. Wait for confirmation\n  const publicClient = getPublicClient(config, { chainId });\n  if (!publicClient) throw new Error(`No public client configured for chainId ${chainId}`);\n  return publicClient.waitForTransactionReceipt({ hash });\n}\n",[19677],{"type":46,"tag":80,"props":19678,"children":19679},{"__ignoreMap":402},[19680,19738,19782,19789,19810,19830,19850,19915,19926,19934,19979,19986,19994,20049,20056,20064,20103,20159,20211,20267,20282,20289,20297,20348,20417,20460],{"type":46,"tag":470,"props":19681,"children":19682},{"class":472,"line":473},[19683,19687,19691,19696,19700,19705,19709,19714,19718,19722,19726,19730,19734],{"type":46,"tag":470,"props":19684,"children":19685},{"style":525},[19686],{"type":51,"value":528},{"type":46,"tag":470,"props":19688,"children":19689},{"style":531},[19690],{"type":51,"value":534},{"type":46,"tag":470,"props":19692,"children":19693},{"style":537},[19694],{"type":51,"value":19695}," getWalletClient",{"type":46,"tag":470,"props":19697,"children":19698},{"style":531},[19699],{"type":51,"value":604},{"type":46,"tag":470,"props":19701,"children":19702},{"style":537},[19703],{"type":51,"value":19704}," getPublicClient",{"type":46,"tag":470,"props":19706,"children":19707},{"style":531},[19708],{"type":51,"value":604},{"type":46,"tag":470,"props":19710,"children":19711},{"style":537},[19712],{"type":51,"value":19713}," switchChain",{"type":46,"tag":470,"props":19715,"children":19716},{"style":531},[19717],{"type":51,"value":545},{"type":46,"tag":470,"props":19719,"children":19720},{"style":525},[19721],{"type":51,"value":550},{"type":46,"tag":470,"props":19723,"children":19724},{"style":531},[19725],{"type":51,"value":555},{"type":46,"tag":470,"props":19727,"children":19728},{"style":483},[19729],{"type":51,"value":19670},{"type":46,"tag":470,"props":19731,"children":19732},{"style":531},[19733],{"type":51,"value":565},{"type":46,"tag":470,"props":19735,"children":19736},{"style":531},[19737],{"type":51,"value":570},{"type":46,"tag":470,"props":19739,"children":19740},{"class":472,"line":573},[19741,19745,19749,19753,19758,19762,19766,19770,19774,19778],{"type":46,"tag":470,"props":19742,"children":19743},{"style":525},[19744],{"type":51,"value":528},{"type":46,"tag":470,"props":19746,"children":19747},{"style":525},[19748],{"type":51,"value":10714},{"type":46,"tag":470,"props":19750,"children":19751},{"style":531},[19752],{"type":51,"value":534},{"type":46,"tag":470,"props":19754,"children":19755},{"style":537},[19756],{"type":51,"value":19757}," Config",{"type":46,"tag":470,"props":19759,"children":19760},{"style":531},[19761],{"type":51,"value":545},{"type":46,"tag":470,"props":19763,"children":19764},{"style":525},[19765],{"type":51,"value":550},{"type":46,"tag":470,"props":19767,"children":19768},{"style":531},[19769],{"type":51,"value":555},{"type":46,"tag":470,"props":19771,"children":19772},{"style":483},[19773],{"type":51,"value":6953},{"type":46,"tag":470,"props":19775,"children":19776},{"style":531},[19777],{"type":51,"value":565},{"type":46,"tag":470,"props":19779,"children":19780},{"style":531},[19781],{"type":51,"value":570},{"type":46,"tag":470,"props":19783,"children":19784},{"class":472,"line":583},[19785],{"type":46,"tag":470,"props":19786,"children":19787},{"emptyLinePlaceholder":577},[19788],{"type":51,"value":580},{"type":46,"tag":470,"props":19790,"children":19791},{"class":472,"line":1046},[19792,19796,19800,19805],{"type":46,"tag":470,"props":19793,"children":19794},{"style":587},[19795],{"type":51,"value":14200},{"type":46,"tag":470,"props":19797,"children":19798},{"style":587},[19799],{"type":51,"value":14205},{"type":46,"tag":470,"props":19801,"children":19802},{"style":631},[19803],{"type":51,"value":19804}," executeSwapTransaction",{"type":46,"tag":470,"props":19806,"children":19807},{"style":531},[19808],{"type":51,"value":19809},"(\n",{"type":46,"tag":470,"props":19811,"children":19812},{"class":472,"line":1084},[19813,19818,19822,19826],{"type":46,"tag":470,"props":19814,"children":19815},{"style":4374},[19816],{"type":51,"value":19817},"  config",{"type":46,"tag":470,"props":19819,"children":19820},{"style":531},[19821],{"type":51,"value":417},{"type":46,"tag":470,"props":19823,"children":19824},{"style":477},[19825],{"type":51,"value":19757},{"type":46,"tag":470,"props":19827,"children":19828},{"style":531},[19829],{"type":51,"value":1007},{"type":46,"tag":470,"props":19831,"children":19832},{"class":472,"line":1111},[19833,19838,19842,19846],{"type":46,"tag":470,"props":19834,"children":19835},{"style":4374},[19836],{"type":51,"value":19837},"  chainId",{"type":46,"tag":470,"props":19839,"children":19840},{"style":531},[19841],{"type":51,"value":417},{"type":46,"tag":470,"props":19843,"children":19844},{"style":477},[19845],{"type":51,"value":8227},{"type":46,"tag":470,"props":19847,"children":19848},{"style":531},[19849],{"type":51,"value":1007},{"type":46,"tag":470,"props":19851,"children":19852},{"class":472,"line":1314},[19853,19858,19862,19866,19871,19875,19879,19883,19887,19891,19895,19899,19903,19907,19911],{"type":46,"tag":470,"props":19854,"children":19855},{"style":4374},[19856],{"type":51,"value":19857},"  swapTx",{"type":46,"tag":470,"props":19859,"children":19860},{"style":531},[19861],{"type":51,"value":417},{"type":46,"tag":470,"props":19863,"children":19864},{"style":531},[19865],{"type":51,"value":534},{"type":46,"tag":470,"props":19867,"children":19868},{"style":2780},[19869],{"type":51,"value":19870}," to",{"type":46,"tag":470,"props":19872,"children":19873},{"style":531},[19874],{"type":51,"value":417},{"type":46,"tag":470,"props":19876,"children":19877},{"style":477},[19878],{"type":51,"value":5223},{"type":46,"tag":470,"props":19880,"children":19881},{"style":531},[19882],{"type":51,"value":799},{"type":46,"tag":470,"props":19884,"children":19885},{"style":2780},[19886],{"type":51,"value":17330},{"type":46,"tag":470,"props":19888,"children":19889},{"style":531},[19890],{"type":51,"value":417},{"type":46,"tag":470,"props":19892,"children":19893},{"style":477},[19894],{"type":51,"value":5223},{"type":46,"tag":470,"props":19896,"children":19897},{"style":531},[19898],{"type":51,"value":799},{"type":46,"tag":470,"props":19900,"children":19901},{"style":2780},[19902],{"type":51,"value":14947},{"type":46,"tag":470,"props":19904,"children":19905},{"style":531},[19906],{"type":51,"value":417},{"type":46,"tag":470,"props":19908,"children":19909},{"style":477},[19910],{"type":51,"value":5223},{"type":46,"tag":470,"props":19912,"children":19913},{"style":531},[19914],{"type":51,"value":3284},{"type":46,"tag":470,"props":19916,"children":19917},{"class":472,"line":1338},[19918,19922],{"type":46,"tag":470,"props":19919,"children":19920},{"style":531},[19921],{"type":51,"value":842},{"type":46,"tag":470,"props":19923,"children":19924},{"style":531},[19925],{"type":51,"value":1165},{"type":46,"tag":470,"props":19927,"children":19928},{"class":472,"line":1347},[19929],{"type":46,"tag":470,"props":19930,"children":19931},{"style":3418},[19932],{"type":51,"value":19933},"  \u002F\u002F 1. Ensure the wallet is on the correct chain\n",{"type":46,"tag":470,"props":19935,"children":19936},{"class":472,"line":1705},[19937,19941,19945,19949,19954,19958,19962,19967,19971,19975],{"type":46,"tag":470,"props":19938,"children":19939},{"style":525},[19940],{"type":51,"value":11195},{"type":46,"tag":470,"props":19942,"children":19943},{"style":631},[19944],{"type":51,"value":19713},{"type":46,"tag":470,"props":19946,"children":19947},{"style":2780},[19948],{"type":51,"value":835},{"type":46,"tag":470,"props":19950,"children":19951},{"style":537},[19952],{"type":51,"value":19953},"config",{"type":46,"tag":470,"props":19955,"children":19956},{"style":531},[19957],{"type":51,"value":604},{"type":46,"tag":470,"props":19959,"children":19960},{"style":531},[19961],{"type":51,"value":534},{"type":46,"tag":470,"props":19963,"children":19964},{"style":537},[19965],{"type":51,"value":19966}," chainId",{"type":46,"tag":470,"props":19968,"children":19969},{"style":531},[19970],{"type":51,"value":545},{"type":46,"tag":470,"props":19972,"children":19973},{"style":2780},[19974],{"type":51,"value":842},{"type":46,"tag":470,"props":19976,"children":19977},{"style":531},[19978],{"type":51,"value":570},{"type":46,"tag":470,"props":19980,"children":19981},{"class":472,"line":1740},[19982],{"type":46,"tag":470,"props":19983,"children":19984},{"emptyLinePlaceholder":577},[19985],{"type":51,"value":580},{"type":46,"tag":470,"props":19987,"children":19988},{"class":472,"line":2421},[19989],{"type":46,"tag":470,"props":19990,"children":19991},{"style":3418},[19992],{"type":51,"value":19993},"  \u002F\u002F 2. Get wallet client with explicit chainId — avoids undefined and missing chain\n",{"type":46,"tag":470,"props":19995,"children":19996},{"class":472,"line":2447},[19997,20001,20005,20009,20013,20017,20021,20025,20029,20033,20037,20041,20045],{"type":46,"tag":470,"props":19998,"children":19999},{"style":587},[20000],{"type":51,"value":5252},{"type":46,"tag":470,"props":20002,"children":20003},{"style":537},[20004],{"type":51,"value":11049},{"type":46,"tag":470,"props":20006,"children":20007},{"style":531},[20008],{"type":51,"value":619},{"type":46,"tag":470,"props":20010,"children":20011},{"style":525},[20012],{"type":51,"value":3443},{"type":46,"tag":470,"props":20014,"children":20015},{"style":631},[20016],{"type":51,"value":19695},{"type":46,"tag":470,"props":20018,"children":20019},{"style":2780},[20020],{"type":51,"value":835},{"type":46,"tag":470,"props":20022,"children":20023},{"style":537},[20024],{"type":51,"value":19953},{"type":46,"tag":470,"props":20026,"children":20027},{"style":531},[20028],{"type":51,"value":604},{"type":46,"tag":470,"props":20030,"children":20031},{"style":531},[20032],{"type":51,"value":534},{"type":46,"tag":470,"props":20034,"children":20035},{"style":537},[20036],{"type":51,"value":19966},{"type":46,"tag":470,"props":20038,"children":20039},{"style":531},[20040],{"type":51,"value":545},{"type":46,"tag":470,"props":20042,"children":20043},{"style":2780},[20044],{"type":51,"value":842},{"type":46,"tag":470,"props":20046,"children":20047},{"style":531},[20048],{"type":51,"value":570},{"type":46,"tag":470,"props":20050,"children":20051},{"class":472,"line":2877},[20052],{"type":46,"tag":470,"props":20053,"children":20054},{"emptyLinePlaceholder":577},[20055],{"type":51,"value":580},{"type":46,"tag":470,"props":20057,"children":20058},{"class":472,"line":2886},[20059],{"type":46,"tag":470,"props":20060,"children":20061},{"style":3418},[20062],{"type":51,"value":20063},"  \u002F\u002F 3. Execute the swap\n",{"type":46,"tag":470,"props":20065,"children":20066},{"class":472,"line":2912},[20067,20071,20075,20079,20083,20087,20091,20095,20099],{"type":46,"tag":470,"props":20068,"children":20069},{"style":587},[20070],{"type":51,"value":5252},{"type":46,"tag":470,"props":20072,"children":20073},{"style":537},[20074],{"type":51,"value":11036},{"type":46,"tag":470,"props":20076,"children":20077},{"style":531},[20078],{"type":51,"value":619},{"type":46,"tag":470,"props":20080,"children":20081},{"style":525},[20082],{"type":51,"value":3443},{"type":46,"tag":470,"props":20084,"children":20085},{"style":537},[20086],{"type":51,"value":11049},{"type":46,"tag":470,"props":20088,"children":20089},{"style":531},[20090],{"type":51,"value":628},{"type":46,"tag":470,"props":20092,"children":20093},{"style":631},[20094],{"type":51,"value":898},{"type":46,"tag":470,"props":20096,"children":20097},{"style":2780},[20098],{"type":51,"value":835},{"type":46,"tag":470,"props":20100,"children":20101},{"style":531},[20102],{"type":51,"value":967},{"type":46,"tag":470,"props":20104,"children":20105},{"class":472,"line":2921},[20106,20111,20115,20120,20124,20128,20132,20137,20141,20146,20150,20155],{"type":46,"tag":470,"props":20107,"children":20108},{"style":2780},[20109],{"type":51,"value":20110},"    to",{"type":46,"tag":470,"props":20112,"children":20113},{"style":531},[20114],{"type":51,"value":417},{"type":46,"tag":470,"props":20116,"children":20117},{"style":537},[20118],{"type":51,"value":20119}," swapTx",{"type":46,"tag":470,"props":20121,"children":20122},{"style":531},[20123],{"type":51,"value":628},{"type":46,"tag":470,"props":20125,"children":20126},{"style":537},[20127],{"type":51,"value":1178},{"type":46,"tag":470,"props":20129,"children":20130},{"style":525},[20131],{"type":51,"value":10784},{"type":46,"tag":470,"props":20133,"children":20134},{"style":531},[20135],{"type":51,"value":20136}," `",{"type":46,"tag":470,"props":20138,"children":20139},{"style":483},[20140],{"type":51,"value":4509},{"type":46,"tag":470,"props":20142,"children":20143},{"style":531},[20144],{"type":51,"value":20145},"${",{"type":46,"tag":470,"props":20147,"children":20148},{"style":477},[20149],{"type":51,"value":3558},{"type":46,"tag":470,"props":20151,"children":20152},{"style":531},[20153],{"type":51,"value":20154},"}`",{"type":46,"tag":470,"props":20156,"children":20157},{"style":531},[20158],{"type":51,"value":1007},{"type":46,"tag":470,"props":20160,"children":20161},{"class":472,"line":2958},[20162,20167,20171,20175,20179,20183,20187,20191,20195,20199,20203,20207],{"type":46,"tag":470,"props":20163,"children":20164},{"style":2780},[20165],{"type":51,"value":20166},"    data",{"type":46,"tag":470,"props":20168,"children":20169},{"style":531},[20170],{"type":51,"value":417},{"type":46,"tag":470,"props":20172,"children":20173},{"style":537},[20174],{"type":51,"value":20119},{"type":46,"tag":470,"props":20176,"children":20177},{"style":531},[20178],{"type":51,"value":628},{"type":46,"tag":470,"props":20180,"children":20181},{"style":537},[20182],{"type":51,"value":1250},{"type":46,"tag":470,"props":20184,"children":20185},{"style":525},[20186],{"type":51,"value":10784},{"type":46,"tag":470,"props":20188,"children":20189},{"style":531},[20190],{"type":51,"value":20136},{"type":46,"tag":470,"props":20192,"children":20193},{"style":483},[20194],{"type":51,"value":4509},{"type":46,"tag":470,"props":20196,"children":20197},{"style":531},[20198],{"type":51,"value":20145},{"type":46,"tag":470,"props":20200,"children":20201},{"style":477},[20202],{"type":51,"value":3558},{"type":46,"tag":470,"props":20204,"children":20205},{"style":531},[20206],{"type":51,"value":20154},{"type":46,"tag":470,"props":20208,"children":20209},{"style":531},[20210],{"type":51,"value":1007},{"type":46,"tag":470,"props":20212,"children":20213},{"class":472,"line":2994},[20214,20218,20222,20226,20230,20235,20239,20243,20247,20251,20255,20259,20263],{"type":46,"tag":470,"props":20215,"children":20216},{"style":2780},[20217],{"type":51,"value":16753},{"type":46,"tag":470,"props":20219,"children":20220},{"style":531},[20221],{"type":51,"value":417},{"type":46,"tag":470,"props":20223,"children":20224},{"style":631},[20225],{"type":51,"value":13848},{"type":46,"tag":470,"props":20227,"children":20228},{"style":2780},[20229],{"type":51,"value":835},{"type":46,"tag":470,"props":20231,"children":20232},{"style":537},[20233],{"type":51,"value":20234},"swapTx",{"type":46,"tag":470,"props":20236,"children":20237},{"style":531},[20238],{"type":51,"value":628},{"type":46,"tag":470,"props":20240,"children":20241},{"style":537},[20242],{"type":51,"value":1286},{"type":46,"tag":470,"props":20244,"children":20245},{"style":531},[20246],{"type":51,"value":4442},{"type":46,"tag":470,"props":20248,"children":20249},{"style":531},[20250],{"type":51,"value":555},{"type":46,"tag":470,"props":20252,"children":20253},{"style":483},[20254],{"type":51,"value":1303},{"type":46,"tag":470,"props":20256,"children":20257},{"style":531},[20258],{"type":51,"value":565},{"type":46,"tag":470,"props":20260,"children":20261},{"style":2780},[20262],{"type":51,"value":842},{"type":46,"tag":470,"props":20264,"children":20265},{"style":531},[20266],{"type":51,"value":1007},{"type":46,"tag":470,"props":20268,"children":20269},{"class":472,"line":3031},[20270,20274,20278],{"type":46,"tag":470,"props":20271,"children":20272},{"style":531},[20273],{"type":51,"value":5596},{"type":46,"tag":470,"props":20275,"children":20276},{"style":2780},[20277],{"type":51,"value":842},{"type":46,"tag":470,"props":20279,"children":20280},{"style":531},[20281],{"type":51,"value":570},{"type":46,"tag":470,"props":20283,"children":20284},{"class":472,"line":3064},[20285],{"type":46,"tag":470,"props":20286,"children":20287},{"emptyLinePlaceholder":577},[20288],{"type":51,"value":580},{"type":46,"tag":470,"props":20290,"children":20291},{"class":472,"line":3073},[20292],{"type":46,"tag":470,"props":20293,"children":20294},{"style":3418},[20295],{"type":51,"value":20296},"  \u002F\u002F 4. Wait for confirmation\n",{"type":46,"tag":470,"props":20298,"children":20299},{"class":472,"line":3082},[20300,20304,20308,20312,20316,20320,20324,20328,20332,20336,20340,20344],{"type":46,"tag":470,"props":20301,"children":20302},{"style":587},[20303],{"type":51,"value":5252},{"type":46,"tag":470,"props":20305,"children":20306},{"style":537},[20307],{"type":51,"value":10833},{"type":46,"tag":470,"props":20309,"children":20310},{"style":531},[20311],{"type":51,"value":619},{"type":46,"tag":470,"props":20313,"children":20314},{"style":631},[20315],{"type":51,"value":19704},{"type":46,"tag":470,"props":20317,"children":20318},{"style":2780},[20319],{"type":51,"value":835},{"type":46,"tag":470,"props":20321,"children":20322},{"style":537},[20323],{"type":51,"value":19953},{"type":46,"tag":470,"props":20325,"children":20326},{"style":531},[20327],{"type":51,"value":604},{"type":46,"tag":470,"props":20329,"children":20330},{"style":531},[20331],{"type":51,"value":534},{"type":46,"tag":470,"props":20333,"children":20334},{"style":537},[20335],{"type":51,"value":19966},{"type":46,"tag":470,"props":20337,"children":20338},{"style":531},[20339],{"type":51,"value":545},{"type":46,"tag":470,"props":20341,"children":20342},{"style":2780},[20343],{"type":51,"value":842},{"type":46,"tag":470,"props":20345,"children":20346},{"style":531},[20347],{"type":51,"value":570},{"type":46,"tag":470,"props":20349,"children":20350},{"class":472,"line":3106},[20351,20355,20359,20363,20368,20372,20376,20380,20384,20388,20392,20397,20401,20405,20409,20413],{"type":46,"tag":470,"props":20352,"children":20353},{"style":525},[20354],{"type":51,"value":3766},{"type":46,"tag":470,"props":20356,"children":20357},{"style":2780},[20358],{"type":51,"value":3771},{"type":46,"tag":470,"props":20360,"children":20361},{"style":531},[20362],{"type":51,"value":4416},{"type":46,"tag":470,"props":20364,"children":20365},{"style":537},[20366],{"type":51,"value":20367},"publicClient",{"type":46,"tag":470,"props":20369,"children":20370},{"style":2780},[20371],{"type":51,"value":3781},{"type":46,"tag":470,"props":20373,"children":20374},{"style":525},[20375],{"type":51,"value":9268},{"type":46,"tag":470,"props":20377,"children":20378},{"style":531},[20379],{"type":51,"value":4534},{"type":46,"tag":470,"props":20381,"children":20382},{"style":631},[20383],{"type":51,"value":4539},{"type":46,"tag":470,"props":20385,"children":20386},{"style":2780},[20387],{"type":51,"value":835},{"type":46,"tag":470,"props":20389,"children":20390},{"style":531},[20391],{"type":51,"value":828},{"type":46,"tag":470,"props":20393,"children":20394},{"style":483},[20395],{"type":51,"value":20396},"No public client configured for chainId ",{"type":46,"tag":470,"props":20398,"children":20399},{"style":531},[20400],{"type":51,"value":20145},{"type":46,"tag":470,"props":20402,"children":20403},{"style":537},[20404],{"type":51,"value":1094},{"type":46,"tag":470,"props":20406,"children":20407},{"style":531},[20408],{"type":51,"value":20154},{"type":46,"tag":470,"props":20410,"children":20411},{"style":2780},[20412],{"type":51,"value":842},{"type":46,"tag":470,"props":20414,"children":20415},{"style":531},[20416],{"type":51,"value":570},{"type":46,"tag":470,"props":20418,"children":20419},{"class":472,"line":3115},[20420,20424,20428,20432,20436,20440,20444,20448,20452,20456],{"type":46,"tag":470,"props":20421,"children":20422},{"style":525},[20423],{"type":51,"value":5772},{"type":46,"tag":470,"props":20425,"children":20426},{"style":537},[20427],{"type":51,"value":10833},{"type":46,"tag":470,"props":20429,"children":20430},{"style":531},[20431],{"type":51,"value":628},{"type":46,"tag":470,"props":20433,"children":20434},{"style":631},[20435],{"type":51,"value":11208},{"type":46,"tag":470,"props":20437,"children":20438},{"style":2780},[20439],{"type":51,"value":835},{"type":46,"tag":470,"props":20441,"children":20442},{"style":531},[20443],{"type":51,"value":11217},{"type":46,"tag":470,"props":20445,"children":20446},{"style":537},[20447],{"type":51,"value":11036},{"type":46,"tag":470,"props":20449,"children":20450},{"style":531},[20451],{"type":51,"value":545},{"type":46,"tag":470,"props":20453,"children":20454},{"style":2780},[20455],{"type":51,"value":842},{"type":46,"tag":470,"props":20457,"children":20458},{"style":531},[20459],{"type":51,"value":570},{"type":46,"tag":470,"props":20461,"children":20462},{"class":472,"line":3152},[20463],{"type":46,"tag":470,"props":20464,"children":20465},{"style":531},[20466],{"type":51,"value":1117},{"type":46,"tag":54,"props":20468,"children":20469},{},[20470,20475],{"type":46,"tag":72,"props":20471,"children":20472},{},[20473],{"type":51,"value":20474},"Why this matters",{"type":51,"value":417},{"type":46,"tag":719,"props":20477,"children":20478},{},[20479,20505,20516],{"type":46,"tag":723,"props":20480,"children":20481},{},[20482,20487,20489,20495,20497,20503],{"type":46,"tag":80,"props":20483,"children":20485},{"className":20484},[],[20486],{"type":51,"value":17129},{"type":51,"value":20488}," hook returns ",{"type":46,"tag":80,"props":20490,"children":20492},{"className":20491},[],[20493],{"type":51,"value":20494},"{ data: undefined }",{"type":51,"value":20496}," during async resolution, even after ",{"type":46,"tag":80,"props":20498,"children":20500},{"className":20499},[],[20501],{"type":51,"value":20502},"useAccount()",{"type":51,"value":20504}," shows connected",{"type":46,"tag":723,"props":20506,"children":20507},{},[20508,20514],{"type":46,"tag":80,"props":20509,"children":20511},{"className":20510},[],[20512],{"type":51,"value":20513},"getWalletClient(config, { chainId })",{"type":51,"value":20515}," is a promise that resolves only when the client is ready, and includes the chain",{"type":46,"tag":723,"props":20517,"children":20518},{},[20519,20525],{"type":46,"tag":80,"props":20520,"children":20522},{"className":20521},[],[20523],{"type":51,"value":20524},"switchChain()",{"type":51,"value":20526}," prevents \"chain mismatch\" errors when the wallet is on a different network than the swap",{"type":46,"tag":172,"props":20528,"children":20530},{"id":20529},"backend-swap-script-nodejs",[20531],{"type":51,"value":20532},"Backend Swap Script (Node.js)",{"type":46,"tag":397,"props":20534,"children":20536},{"className":513,"code":20535,"language":515,"meta":402,"style":402},"import { createWalletClient, createPublicClient, http, isAddress, isHex, type Address } from 'viem';\nimport { privateKeyToAccount } from 'viem\u002Faccounts';\nimport { mainnet } from 'viem\u002Fchains';\n\nconst API_URL = 'https:\u002F\u002Ftrade-api.gateway.uniswap.org\u002Fv1';\nconst API_KEY = process.env.UNISWAP_API_KEY!;\n\nconst account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);\nconst publicClient = createPublicClient({ chain: mainnet, transport: http() });\nconst walletClient = createWalletClient({ account, chain: mainnet, transport: http() });\n\n\u002F\u002F Helper to prepare \u002Fswap request body — routing-aware permitData handling\nfunction prepareSwapRequest(quoteResponse: Record\u003Cstring, unknown>, signature?: string): object {\n  const { permitData, permitTransaction, ...cleanQuote } = quoteResponse;\n  const request: Record\u003Cstring, unknown> = { ...cleanQuote };\n\n  \u002F\u002F UniswapX (DUTCH_V2, DUTCH_V3, PRIORITY): permitData is for LOCAL signing only.\n  \u002F\u002F The \u002Fswap body must NOT include permitData — the order is already encoded\n  \u002F\u002F in quote.encodedOrder. Only the signature is needed.\n  const isUniswapX =\n    quoteResponse.routing === 'DUTCH_V2' ||\n    quoteResponse.routing === 'DUTCH_V3' ||\n    quoteResponse.routing === 'PRIORITY';\n\n  if (isUniswapX) {\n    if (signature) request.signature = signature;\n  } else {\n    \u002F\u002F CLASSIC: both signature and permitData required together, or both omitted\n    if (signature && permitData && typeof permitData === 'object') {\n      request.signature = signature;\n      request.permitData = permitData;\n    }\n  }\n\n  return request;\n}\n\n\u002F\u002F Validate swap response before broadcasting\nfunction validateSwap(swap: { data?: string; to?: string; from?: string }): void {\n  if (!swap?.data || swap.data === '' || swap.data === '0x') {\n    throw new Error('swap.data is empty - quote may have expired');\n  }\n  if (!isHex(swap.data)) {\n    throw new Error('swap.data is not valid hex');\n  }\n  if (!swap.to || !isAddress(swap.to) || !swap.from || !isAddress(swap.from)) {\n    throw new Error('Invalid address in swap response');\n  }\n}\n\nasync function executeSwap(tokenIn: Address, tokenOut: Address, amount: string, chainId: number) {\n  const ETH_ADDRESS = '0x0000000000000000000000000000000000000000';\n\n  \u002F\u002F 1. Check approval (for ERC20 tokens, not native ETH)\n  if (tokenIn !== ETH_ADDRESS) {\n    const approvalRes = await fetch(`${API_URL}\u002Fcheck_approval`, {\n      method: 'POST',\n      headers: {\n        'x-api-key': API_KEY,\n        'Content-Type': 'application\u002Fjson',\n        'x-universal-router-version': '2.0',\n      },\n      body: JSON.stringify({\n        walletAddress: account.address,\n        token: tokenIn,\n        amount,\n        chainId,\n      }),\n    });\n    const approvalData = await approvalRes.json();\n\n    if (approvalData.approval) {\n      const hash = await walletClient.sendTransaction({\n        to: approvalData.approval.to,\n        data: approvalData.approval.data,\n        value: BigInt(approvalData.approval.value || '0'),\n      });\n      await publicClient.waitForTransactionReceipt({ hash });\n    }\n  }\n\n  \u002F\u002F 2. Get quote\n  const quoteRes = await fetch(`${API_URL}\u002Fquote`, {\n    method: 'POST',\n    headers: {\n      'x-api-key': API_KEY,\n      'Content-Type': 'application\u002Fjson',\n      'x-universal-router-version': '2.0',\n    },\n    body: JSON.stringify({\n      swapper: account.address,\n      tokenIn,\n      tokenOut,\n      tokenInChainId: String(chainId),\n      tokenOutChainId: String(chainId),\n      amount,\n      type: 'EXACT_INPUT',\n      slippageTolerance: 0.5,\n    }),\n  });\n  const quoteResponse = await quoteRes.json(); \u002F\u002F Store FULL response\n\n  if (!quoteRes.ok) {\n    throw new Error(quoteResponse.detail || 'Quote failed');\n  }\n\n  \u002F\u002F 3. Execute swap - CRITICAL: spread quote response, strip null fields\n  const swapRequest = prepareSwapRequest(quoteResponse);\n\n  const swapRes = await fetch(`${API_URL}\u002Fswap`, {\n    method: 'POST',\n    headers: {\n      'x-api-key': API_KEY,\n      'Content-Type': 'application\u002Fjson',\n      'x-universal-router-version': '2.0',\n    },\n    body: JSON.stringify(swapRequest),\n  });\n  const swapData = await swapRes.json();\n\n  if (!swapRes.ok) {\n    throw new Error(swapData.detail || 'Swap request failed');\n  }\n\n  \u002F\u002F 4. Validate before broadcasting\n  validateSwap(swapData.swap);\n\n  const hash = await walletClient.sendTransaction({\n    to: swapData.swap.to,\n    data: swapData.swap.data,\n    value: BigInt(swapData.swap.value || '0'),\n  });\n  return publicClient.waitForTransactionReceipt({ hash });\n}\n",[20537],{"type":46,"tag":80,"props":20538,"children":20539},{"__ignoreMap":402},[20540,20626,20667,20708,20715,20746,20790,20797,20871,20945,21026,21033,21041,21113,21164,21223,21230,21237,21245,21253,21268,21303,21338,21373,21380,21403,21446,21461,21469,21528,21555,21582,21589,21596,21603,21618,21625,21632,21640,21725,21816,21855,21862,21905,21944,21951,22066,22105,22112,22119,22126,22213,22246,22253,22261,22293,22349,22376,22391,22418,22453,22488,22495,22526,22554,22574,22586,22598,22613,22628,22668,22675,22707,22746,22782,22818,22882,22897,22941,22948,22955,22962,22970,23026,23054,23070,23097,23133,23169,23177,23210,23239,23252,23265,23299,23332,23345,23373,23394,23410,23426,23471,23479,23516,23572,23580,23588,23597,23633,23641,23698,23726,23742,23770,23806,23842,23850,23890,23906,23947,23955,23992,24050,24058,24066,24075,24108,24116,24156,24192,24228,24292,24308,24352],{"type":46,"tag":470,"props":20541,"children":20542},{"class":472,"line":473},[20543,20547,20551,20556,20560,20565,20569,20574,20578,20582,20586,20590,20594,20598,20602,20606,20610,20614,20618,20622],{"type":46,"tag":470,"props":20544,"children":20545},{"style":525},[20546],{"type":51,"value":528},{"type":46,"tag":470,"props":20548,"children":20549},{"style":531},[20550],{"type":51,"value":534},{"type":46,"tag":470,"props":20552,"children":20553},{"style":537},[20554],{"type":51,"value":20555}," createWalletClient",{"type":46,"tag":470,"props":20557,"children":20558},{"style":531},[20559],{"type":51,"value":604},{"type":46,"tag":470,"props":20561,"children":20562},{"style":537},[20563],{"type":51,"value":20564}," createPublicClient",{"type":46,"tag":470,"props":20566,"children":20567},{"style":531},[20568],{"type":51,"value":604},{"type":46,"tag":470,"props":20570,"children":20571},{"style":537},[20572],{"type":51,"value":20573}," http",{"type":46,"tag":470,"props":20575,"children":20576},{"style":531},[20577],{"type":51,"value":604},{"type":46,"tag":470,"props":20579,"children":20580},{"style":537},[20581],{"type":51,"value":6072},{"type":46,"tag":470,"props":20583,"children":20584},{"style":531},[20585],{"type":51,"value":604},{"type":46,"tag":470,"props":20587,"children":20588},{"style":537},[20589],{"type":51,"value":6081},{"type":46,"tag":470,"props":20591,"children":20592},{"style":531},[20593],{"type":51,"value":604},{"type":46,"tag":470,"props":20595,"children":20596},{"style":525},[20597],{"type":51,"value":10714},{"type":46,"tag":470,"props":20599,"children":20600},{"style":537},[20601],{"type":51,"value":10719},{"type":46,"tag":470,"props":20603,"children":20604},{"style":531},[20605],{"type":51,"value":545},{"type":46,"tag":470,"props":20607,"children":20608},{"style":525},[20609],{"type":51,"value":550},{"type":46,"tag":470,"props":20611,"children":20612},{"style":531},[20613],{"type":51,"value":555},{"type":46,"tag":470,"props":20615,"children":20616},{"style":483},[20617],{"type":51,"value":6098},{"type":46,"tag":470,"props":20619,"children":20620},{"style":531},[20621],{"type":51,"value":565},{"type":46,"tag":470,"props":20623,"children":20624},{"style":531},[20625],{"type":51,"value":570},{"type":46,"tag":470,"props":20627,"children":20628},{"class":472,"line":573},[20629,20633,20637,20642,20646,20650,20654,20659,20663],{"type":46,"tag":470,"props":20630,"children":20631},{"style":525},[20632],{"type":51,"value":528},{"type":46,"tag":470,"props":20634,"children":20635},{"style":531},[20636],{"type":51,"value":534},{"type":46,"tag":470,"props":20638,"children":20639},{"style":537},[20640],{"type":51,"value":20641}," privateKeyToAccount",{"type":46,"tag":470,"props":20643,"children":20644},{"style":531},[20645],{"type":51,"value":545},{"type":46,"tag":470,"props":20647,"children":20648},{"style":525},[20649],{"type":51,"value":550},{"type":46,"tag":470,"props":20651,"children":20652},{"style":531},[20653],{"type":51,"value":555},{"type":46,"tag":470,"props":20655,"children":20656},{"style":483},[20657],{"type":51,"value":20658},"viem\u002Faccounts",{"type":46,"tag":470,"props":20660,"children":20661},{"style":531},[20662],{"type":51,"value":565},{"type":46,"tag":470,"props":20664,"children":20665},{"style":531},[20666],{"type":51,"value":570},{"type":46,"tag":470,"props":20668,"children":20669},{"class":472,"line":583},[20670,20674,20678,20683,20687,20691,20695,20700,20704],{"type":46,"tag":470,"props":20671,"children":20672},{"style":525},[20673],{"type":51,"value":528},{"type":46,"tag":470,"props":20675,"children":20676},{"style":531},[20677],{"type":51,"value":534},{"type":46,"tag":470,"props":20679,"children":20680},{"style":537},[20681],{"type":51,"value":20682}," mainnet",{"type":46,"tag":470,"props":20684,"children":20685},{"style":531},[20686],{"type":51,"value":545},{"type":46,"tag":470,"props":20688,"children":20689},{"style":525},[20690],{"type":51,"value":550},{"type":46,"tag":470,"props":20692,"children":20693},{"style":531},[20694],{"type":51,"value":555},{"type":46,"tag":470,"props":20696,"children":20697},{"style":483},[20698],{"type":51,"value":20699},"viem\u002Fchains",{"type":46,"tag":470,"props":20701,"children":20702},{"style":531},[20703],{"type":51,"value":565},{"type":46,"tag":470,"props":20705,"children":20706},{"style":531},[20707],{"type":51,"value":570},{"type":46,"tag":470,"props":20709,"children":20710},{"class":472,"line":1046},[20711],{"type":46,"tag":470,"props":20712,"children":20713},{"emptyLinePlaceholder":577},[20714],{"type":51,"value":580},{"type":46,"tag":470,"props":20716,"children":20717},{"class":472,"line":1084},[20718,20722,20726,20730,20734,20738,20742],{"type":46,"tag":470,"props":20719,"children":20720},{"style":587},[20721],{"type":51,"value":590},{"type":46,"tag":470,"props":20723,"children":20724},{"style":537},[20725],{"type":51,"value":17267},{"type":46,"tag":470,"props":20727,"children":20728},{"style":531},[20729],{"type":51,"value":3438},{"type":46,"tag":470,"props":20731,"children":20732},{"style":531},[20733],{"type":51,"value":555},{"type":46,"tag":470,"props":20735,"children":20736},{"style":483},[20737],{"type":51,"value":340},{"type":46,"tag":470,"props":20739,"children":20740},{"style":531},[20741],{"type":51,"value":565},{"type":46,"tag":470,"props":20743,"children":20744},{"style":531},[20745],{"type":51,"value":570},{"type":46,"tag":470,"props":20747,"children":20748},{"class":472,"line":1111},[20749,20753,20758,20762,20767,20771,20776,20780,20785],{"type":46,"tag":470,"props":20750,"children":20751},{"style":587},[20752],{"type":51,"value":590},{"type":46,"tag":470,"props":20754,"children":20755},{"style":537},[20756],{"type":51,"value":20757}," API_KEY ",{"type":46,"tag":470,"props":20759,"children":20760},{"style":531},[20761],{"type":51,"value":3438},{"type":46,"tag":470,"props":20763,"children":20764},{"style":537},[20765],{"type":51,"value":20766}," process",{"type":46,"tag":470,"props":20768,"children":20769},{"style":531},[20770],{"type":51,"value":628},{"type":46,"tag":470,"props":20772,"children":20773},{"style":537},[20774],{"type":51,"value":20775},"env",{"type":46,"tag":470,"props":20777,"children":20778},{"style":531},[20779],{"type":51,"value":628},{"type":46,"tag":470,"props":20781,"children":20782},{"style":537},[20783],{"type":51,"value":20784},"UNISWAP_API_KEY",{"type":46,"tag":470,"props":20786,"children":20787},{"style":531},[20788],{"type":51,"value":20789},"!;\n",{"type":46,"tag":470,"props":20791,"children":20792},{"class":472,"line":1314},[20793],{"type":46,"tag":470,"props":20794,"children":20795},{"emptyLinePlaceholder":577},[20796],{"type":51,"value":580},{"type":46,"tag":470,"props":20798,"children":20799},{"class":472,"line":1338},[20800,20804,20809,20813,20817,20822,20826,20830,20834,20839,20843,20847,20851,20855,20859,20863,20867],{"type":46,"tag":470,"props":20801,"children":20802},{"style":587},[20803],{"type":51,"value":590},{"type":46,"tag":470,"props":20805,"children":20806},{"style":537},[20807],{"type":51,"value":20808}," account ",{"type":46,"tag":470,"props":20810,"children":20811},{"style":531},[20812],{"type":51,"value":3438},{"type":46,"tag":470,"props":20814,"children":20815},{"style":631},[20816],{"type":51,"value":20641},{"type":46,"tag":470,"props":20818,"children":20819},{"style":537},[20820],{"type":51,"value":20821},"(process",{"type":46,"tag":470,"props":20823,"children":20824},{"style":531},[20825],{"type":51,"value":628},{"type":46,"tag":470,"props":20827,"children":20828},{"style":537},[20829],{"type":51,"value":20775},{"type":46,"tag":470,"props":20831,"children":20832},{"style":531},[20833],{"type":51,"value":628},{"type":46,"tag":470,"props":20835,"children":20836},{"style":537},[20837],{"type":51,"value":20838},"PRIVATE_KEY ",{"type":46,"tag":470,"props":20840,"children":20841},{"style":525},[20842],{"type":51,"value":16325},{"type":46,"tag":470,"props":20844,"children":20845},{"style":531},[20846],{"type":51,"value":20136},{"type":46,"tag":470,"props":20848,"children":20849},{"style":483},[20850],{"type":51,"value":4509},{"type":46,"tag":470,"props":20852,"children":20853},{"style":531},[20854],{"type":51,"value":20145},{"type":46,"tag":470,"props":20856,"children":20857},{"style":477},[20858],{"type":51,"value":3558},{"type":46,"tag":470,"props":20860,"children":20861},{"style":531},[20862],{"type":51,"value":20154},{"type":46,"tag":470,"props":20864,"children":20865},{"style":537},[20866],{"type":51,"value":842},{"type":46,"tag":470,"props":20868,"children":20869},{"style":531},[20870],{"type":51,"value":570},{"type":46,"tag":470,"props":20872,"children":20873},{"class":472,"line":1347},[20874,20878,20883,20887,20891,20895,20899,20904,20908,20912,20916,20921,20925,20929,20933,20937,20941],{"type":46,"tag":470,"props":20875,"children":20876},{"style":587},[20877],{"type":51,"value":590},{"type":46,"tag":470,"props":20879,"children":20880},{"style":537},[20881],{"type":51,"value":20882}," publicClient ",{"type":46,"tag":470,"props":20884,"children":20885},{"style":531},[20886],{"type":51,"value":3438},{"type":46,"tag":470,"props":20888,"children":20889},{"style":631},[20890],{"type":51,"value":20564},{"type":46,"tag":470,"props":20892,"children":20893},{"style":537},[20894],{"type":51,"value":835},{"type":46,"tag":470,"props":20896,"children":20897},{"style":531},[20898],{"type":51,"value":11217},{"type":46,"tag":470,"props":20900,"children":20901},{"style":2780},[20902],{"type":51,"value":20903}," chain",{"type":46,"tag":470,"props":20905,"children":20906},{"style":531},[20907],{"type":51,"value":417},{"type":46,"tag":470,"props":20909,"children":20910},{"style":537},[20911],{"type":51,"value":20682},{"type":46,"tag":470,"props":20913,"children":20914},{"style":531},[20915],{"type":51,"value":604},{"type":46,"tag":470,"props":20917,"children":20918},{"style":2780},[20919],{"type":51,"value":20920}," transport",{"type":46,"tag":470,"props":20922,"children":20923},{"style":531},[20924],{"type":51,"value":417},{"type":46,"tag":470,"props":20926,"children":20927},{"style":631},[20928],{"type":51,"value":20573},{"type":46,"tag":470,"props":20930,"children":20931},{"style":537},[20932],{"type":51,"value":10252},{"type":46,"tag":470,"props":20934,"children":20935},{"style":531},[20936],{"type":51,"value":614},{"type":46,"tag":470,"props":20938,"children":20939},{"style":537},[20940],{"type":51,"value":842},{"type":46,"tag":470,"props":20942,"children":20943},{"style":531},[20944],{"type":51,"value":570},{"type":46,"tag":470,"props":20946,"children":20947},{"class":472,"line":1705},[20948,20952,20957,20961,20965,20969,20973,20978,20982,20986,20990,20994,20998,21002,21006,21010,21014,21018,21022],{"type":46,"tag":470,"props":20949,"children":20950},{"style":587},[20951],{"type":51,"value":590},{"type":46,"tag":470,"props":20953,"children":20954},{"style":537},[20955],{"type":51,"value":20956}," walletClient ",{"type":46,"tag":470,"props":20958,"children":20959},{"style":531},[20960],{"type":51,"value":3438},{"type":46,"tag":470,"props":20962,"children":20963},{"style":631},[20964],{"type":51,"value":20555},{"type":46,"tag":470,"props":20966,"children":20967},{"style":537},[20968],{"type":51,"value":835},{"type":46,"tag":470,"props":20970,"children":20971},{"style":531},[20972],{"type":51,"value":11217},{"type":46,"tag":470,"props":20974,"children":20975},{"style":537},[20976],{"type":51,"value":20977}," account",{"type":46,"tag":470,"props":20979,"children":20980},{"style":531},[20981],{"type":51,"value":604},{"type":46,"tag":470,"props":20983,"children":20984},{"style":2780},[20985],{"type":51,"value":20903},{"type":46,"tag":470,"props":20987,"children":20988},{"style":531},[20989],{"type":51,"value":417},{"type":46,"tag":470,"props":20991,"children":20992},{"style":537},[20993],{"type":51,"value":20682},{"type":46,"tag":470,"props":20995,"children":20996},{"style":531},[20997],{"type":51,"value":604},{"type":46,"tag":470,"props":20999,"children":21000},{"style":2780},[21001],{"type":51,"value":20920},{"type":46,"tag":470,"props":21003,"children":21004},{"style":531},[21005],{"type":51,"value":417},{"type":46,"tag":470,"props":21007,"children":21008},{"style":631},[21009],{"type":51,"value":20573},{"type":46,"tag":470,"props":21011,"children":21012},{"style":537},[21013],{"type":51,"value":10252},{"type":46,"tag":470,"props":21015,"children":21016},{"style":531},[21017],{"type":51,"value":614},{"type":46,"tag":470,"props":21019,"children":21020},{"style":537},[21021],{"type":51,"value":842},{"type":46,"tag":470,"props":21023,"children":21024},{"style":531},[21025],{"type":51,"value":570},{"type":46,"tag":470,"props":21027,"children":21028},{"class":472,"line":1740},[21029],{"type":46,"tag":470,"props":21030,"children":21031},{"emptyLinePlaceholder":577},[21032],{"type":51,"value":580},{"type":46,"tag":470,"props":21034,"children":21035},{"class":472,"line":2421},[21036],{"type":46,"tag":470,"props":21037,"children":21038},{"style":3418},[21039],{"type":51,"value":21040},"\u002F\u002F Helper to prepare \u002Fswap request body — routing-aware permitData handling\n",{"type":46,"tag":470,"props":21042,"children":21043},{"class":472,"line":2447},[21044,21048,21052,21056,21060,21064,21068,21072,21076,21080,21084,21089,21093,21097,21101,21105,21109],{"type":46,"tag":470,"props":21045,"children":21046},{"style":587},[21047],{"type":51,"value":4362},{"type":46,"tag":470,"props":21049,"children":21050},{"style":631},[21051],{"type":51,"value":5187},{"type":46,"tag":470,"props":21053,"children":21054},{"style":531},[21055],{"type":51,"value":835},{"type":46,"tag":470,"props":21057,"children":21058},{"style":4374},[21059],{"type":51,"value":5094},{"type":46,"tag":470,"props":21061,"children":21062},{"style":531},[21063],{"type":51,"value":417},{"type":46,"tag":470,"props":21065,"children":21066},{"style":477},[21067],{"type":51,"value":3549},{"type":46,"tag":470,"props":21069,"children":21070},{"style":531},[21071],{"type":51,"value":856},{"type":46,"tag":470,"props":21073,"children":21074},{"style":477},[21075],{"type":51,"value":3558},{"type":46,"tag":470,"props":21077,"children":21078},{"style":531},[21079],{"type":51,"value":604},{"type":46,"tag":470,"props":21081,"children":21082},{"style":477},[21083],{"type":51,"value":3567},{"type":46,"tag":470,"props":21085,"children":21086},{"style":531},[21087],{"type":51,"value":21088},">,",{"type":46,"tag":470,"props":21090,"children":21091},{"style":4374},[21092],{"type":51,"value":5213},{"type":46,"tag":470,"props":21094,"children":21095},{"style":531},[21096],{"type":51,"value":5218},{"type":46,"tag":470,"props":21098,"children":21099},{"style":477},[21100],{"type":51,"value":5223},{"type":46,"tag":470,"props":21102,"children":21103},{"style":531},[21104],{"type":51,"value":4391},{"type":46,"tag":470,"props":21106,"children":21107},{"style":477},[21108],{"type":51,"value":5232},{"type":46,"tag":470,"props":21110,"children":21111},{"style":531},[21112],{"type":51,"value":1165},{"type":46,"tag":470,"props":21114,"children":21115},{"class":472,"line":2877},[21116,21120,21124,21128,21132,21136,21140,21144,21148,21152,21156,21160],{"type":46,"tag":470,"props":21117,"children":21118},{"style":587},[21119],{"type":51,"value":5252},{"type":46,"tag":470,"props":21121,"children":21122},{"style":531},[21123],{"type":51,"value":534},{"type":46,"tag":470,"props":21125,"children":21126},{"style":537},[21127],{"type":51,"value":3488},{"type":46,"tag":470,"props":21129,"children":21130},{"style":531},[21131],{"type":51,"value":604},{"type":46,"tag":470,"props":21133,"children":21134},{"style":537},[21135],{"type":51,"value":3497},{"type":46,"tag":470,"props":21137,"children":21138},{"style":531},[21139],{"type":51,"value":604},{"type":46,"tag":470,"props":21141,"children":21142},{"style":531},[21143],{"type":51,"value":3506},{"type":46,"tag":470,"props":21145,"children":21146},{"style":537},[21147],{"type":51,"value":5281},{"type":46,"tag":470,"props":21149,"children":21150},{"style":531},[21151],{"type":51,"value":545},{"type":46,"tag":470,"props":21153,"children":21154},{"style":531},[21155],{"type":51,"value":619},{"type":46,"tag":470,"props":21157,"children":21158},{"style":537},[21159],{"type":51,"value":3524},{"type":46,"tag":470,"props":21161,"children":21162},{"style":531},[21163],{"type":51,"value":570},{"type":46,"tag":470,"props":21165,"children":21166},{"class":472,"line":2886},[21167,21171,21175,21179,21183,21187,21191,21195,21199,21203,21207,21211,21215,21219],{"type":46,"tag":470,"props":21168,"children":21169},{"style":587},[21170],{"type":51,"value":5252},{"type":46,"tag":470,"props":21172,"children":21173},{"style":537},[21174],{"type":51,"value":5309},{"type":46,"tag":470,"props":21176,"children":21177},{"style":531},[21178],{"type":51,"value":417},{"type":46,"tag":470,"props":21180,"children":21181},{"style":477},[21182],{"type":51,"value":3549},{"type":46,"tag":470,"props":21184,"children":21185},{"style":531},[21186],{"type":51,"value":856},{"type":46,"tag":470,"props":21188,"children":21189},{"style":477},[21190],{"type":51,"value":3558},{"type":46,"tag":470,"props":21192,"children":21193},{"style":531},[21194],{"type":51,"value":604},{"type":46,"tag":470,"props":21196,"children":21197},{"style":477},[21198],{"type":51,"value":3567},{"type":46,"tag":470,"props":21200,"children":21201},{"style":531},[21202],{"type":51,"value":849},{"type":46,"tag":470,"props":21204,"children":21205},{"style":531},[21206],{"type":51,"value":619},{"type":46,"tag":470,"props":21208,"children":21209},{"style":531},[21210],{"type":51,"value":534},{"type":46,"tag":470,"props":21212,"children":21213},{"style":531},[21214],{"type":51,"value":3506},{"type":46,"tag":470,"props":21216,"children":21217},{"style":537},[21218],{"type":51,"value":5281},{"type":46,"tag":470,"props":21220,"children":21221},{"style":531},[21222],{"type":51,"value":5358},{"type":46,"tag":470,"props":21224,"children":21225},{"class":472,"line":2912},[21226],{"type":46,"tag":470,"props":21227,"children":21228},{"emptyLinePlaceholder":577},[21229],{"type":51,"value":580},{"type":46,"tag":470,"props":21231,"children":21232},{"class":472,"line":2921},[21233],{"type":46,"tag":470,"props":21234,"children":21235},{"style":3418},[21236],{"type":51,"value":5373},{"type":46,"tag":470,"props":21238,"children":21239},{"class":472,"line":2958},[21240],{"type":46,"tag":470,"props":21241,"children":21242},{"style":3418},[21243],{"type":51,"value":21244},"  \u002F\u002F The \u002Fswap body must NOT include permitData — the order is already encoded\n",{"type":46,"tag":470,"props":21246,"children":21247},{"class":472,"line":2994},[21248],{"type":46,"tag":470,"props":21249,"children":21250},{"style":3418},[21251],{"type":51,"value":21252},"  \u002F\u002F in quote.encodedOrder. Only the signature is needed.\n",{"type":46,"tag":470,"props":21254,"children":21255},{"class":472,"line":3031},[21256,21260,21264],{"type":46,"tag":470,"props":21257,"children":21258},{"style":587},[21259],{"type":51,"value":5252},{"type":46,"tag":470,"props":21261,"children":21262},{"style":537},[21263],{"type":51,"value":5401},{"type":46,"tag":470,"props":21265,"children":21266},{"style":531},[21267],{"type":51,"value":5406},{"type":46,"tag":470,"props":21269,"children":21270},{"class":472,"line":3064},[21271,21275,21279,21283,21287,21291,21295,21299],{"type":46,"tag":470,"props":21272,"children":21273},{"style":537},[21274],{"type":51,"value":5414},{"type":46,"tag":470,"props":21276,"children":21277},{"style":531},[21278],{"type":51,"value":628},{"type":46,"tag":470,"props":21280,"children":21281},{"style":537},[21282],{"type":51,"value":2024},{"type":46,"tag":470,"props":21284,"children":21285},{"style":531},[21286],{"type":51,"value":3874},{"type":46,"tag":470,"props":21288,"children":21289},{"style":531},[21290],{"type":51,"value":555},{"type":46,"tag":470,"props":21292,"children":21293},{"style":483},[21294],{"type":51,"value":230},{"type":46,"tag":470,"props":21296,"children":21297},{"style":531},[21298],{"type":51,"value":565},{"type":46,"tag":470,"props":21300,"children":21301},{"style":531},[21302],{"type":51,"value":3655},{"type":46,"tag":470,"props":21304,"children":21305},{"class":472,"line":3073},[21306,21310,21314,21318,21322,21326,21330,21334],{"type":46,"tag":470,"props":21307,"children":21308},{"style":537},[21309],{"type":51,"value":5414},{"type":46,"tag":470,"props":21311,"children":21312},{"style":531},[21313],{"type":51,"value":628},{"type":46,"tag":470,"props":21315,"children":21316},{"style":537},[21317],{"type":51,"value":2024},{"type":46,"tag":470,"props":21319,"children":21320},{"style":531},[21321],{"type":51,"value":3874},{"type":46,"tag":470,"props":21323,"children":21324},{"style":531},[21325],{"type":51,"value":555},{"type":46,"tag":470,"props":21327,"children":21328},{"style":483},[21329],{"type":51,"value":3683},{"type":46,"tag":470,"props":21331,"children":21332},{"style":531},[21333],{"type":51,"value":565},{"type":46,"tag":470,"props":21335,"children":21336},{"style":531},[21337],{"type":51,"value":3655},{"type":46,"tag":470,"props":21339,"children":21340},{"class":472,"line":3082},[21341,21345,21349,21353,21357,21361,21365,21369],{"type":46,"tag":470,"props":21342,"children":21343},{"style":537},[21344],{"type":51,"value":5414},{"type":46,"tag":470,"props":21346,"children":21347},{"style":531},[21348],{"type":51,"value":628},{"type":46,"tag":470,"props":21350,"children":21351},{"style":537},[21352],{"type":51,"value":2024},{"type":46,"tag":470,"props":21354,"children":21355},{"style":531},[21356],{"type":51,"value":3874},{"type":46,"tag":470,"props":21358,"children":21359},{"style":531},[21360],{"type":51,"value":555},{"type":46,"tag":470,"props":21362,"children":21363},{"style":483},[21364],{"type":51,"value":248},{"type":46,"tag":470,"props":21366,"children":21367},{"style":531},[21368],{"type":51,"value":565},{"type":46,"tag":470,"props":21370,"children":21371},{"style":531},[21372],{"type":51,"value":570},{"type":46,"tag":470,"props":21374,"children":21375},{"class":472,"line":3106},[21376],{"type":46,"tag":470,"props":21377,"children":21378},{"emptyLinePlaceholder":577},[21379],{"type":51,"value":580},{"type":46,"tag":470,"props":21381,"children":21382},{"class":472,"line":3115},[21383,21387,21391,21395,21399],{"type":46,"tag":470,"props":21384,"children":21385},{"style":525},[21386],{"type":51,"value":3766},{"type":46,"tag":470,"props":21388,"children":21389},{"style":2780},[21390],{"type":51,"value":3771},{"type":46,"tag":470,"props":21392,"children":21393},{"style":537},[21394],{"type":51,"value":5535},{"type":46,"tag":470,"props":21396,"children":21397},{"style":2780},[21398],{"type":51,"value":3781},{"type":46,"tag":470,"props":21400,"children":21401},{"style":531},[21402],{"type":51,"value":967},{"type":46,"tag":470,"props":21404,"children":21405},{"class":472,"line":3152},[21406,21410,21414,21418,21422,21426,21430,21434,21438,21442],{"type":46,"tag":470,"props":21407,"children":21408},{"style":525},[21409],{"type":51,"value":5551},{"type":46,"tag":470,"props":21411,"children":21412},{"style":2780},[21413],{"type":51,"value":3771},{"type":46,"tag":470,"props":21415,"children":21416},{"style":537},[21417],{"type":51,"value":3795},{"type":46,"tag":470,"props":21419,"children":21420},{"style":2780},[21421],{"type":51,"value":3781},{"type":46,"tag":470,"props":21423,"children":21424},{"style":537},[21425],{"type":51,"value":5568},{"type":46,"tag":470,"props":21427,"children":21428},{"style":531},[21429],{"type":51,"value":628},{"type":46,"tag":470,"props":21431,"children":21432},{"style":537},[21433],{"type":51,"value":3795},{"type":46,"tag":470,"props":21435,"children":21436},{"style":531},[21437],{"type":51,"value":619},{"type":46,"tag":470,"props":21439,"children":21440},{"style":537},[21441],{"type":51,"value":5213},{"type":46,"tag":470,"props":21443,"children":21444},{"style":531},[21445],{"type":51,"value":570},{"type":46,"tag":470,"props":21447,"children":21448},{"class":472,"line":3185},[21449,21453,21457],{"type":46,"tag":470,"props":21450,"children":21451},{"style":531},[21452],{"type":51,"value":5596},{"type":46,"tag":470,"props":21454,"children":21455},{"style":525},[21456],{"type":51,"value":3820},{"type":46,"tag":470,"props":21458,"children":21459},{"style":531},[21460],{"type":51,"value":1165},{"type":46,"tag":470,"props":21462,"children":21463},{"class":472,"line":3193},[21464],{"type":46,"tag":470,"props":21465,"children":21466},{"style":3418},[21467],{"type":51,"value":21468},"    \u002F\u002F CLASSIC: both signature and permitData required together, or both omitted\n",{"type":46,"tag":470,"props":21470,"children":21471},{"class":472,"line":3287},[21472,21476,21480,21484,21488,21492,21496,21500,21504,21508,21512,21516,21520,21524],{"type":46,"tag":470,"props":21473,"children":21474},{"style":525},[21475],{"type":51,"value":5551},{"type":46,"tag":470,"props":21477,"children":21478},{"style":2780},[21479],{"type":51,"value":3771},{"type":46,"tag":470,"props":21481,"children":21482},{"style":537},[21483],{"type":51,"value":3795},{"type":46,"tag":470,"props":21485,"children":21486},{"style":531},[21487],{"type":51,"value":3852},{"type":46,"tag":470,"props":21489,"children":21490},{"style":537},[21491],{"type":51,"value":3488},{"type":46,"tag":470,"props":21493,"children":21494},{"style":531},[21495],{"type":51,"value":3852},{"type":46,"tag":470,"props":21497,"children":21498},{"style":531},[21499],{"type":51,"value":3865},{"type":46,"tag":470,"props":21501,"children":21502},{"style":537},[21503],{"type":51,"value":3488},{"type":46,"tag":470,"props":21505,"children":21506},{"style":531},[21507],{"type":51,"value":3874},{"type":46,"tag":470,"props":21509,"children":21510},{"style":531},[21511],{"type":51,"value":555},{"type":46,"tag":470,"props":21513,"children":21514},{"style":483},[21515],{"type":51,"value":3883},{"type":46,"tag":470,"props":21517,"children":21518},{"style":531},[21519],{"type":51,"value":565},{"type":46,"tag":470,"props":21521,"children":21522},{"style":2780},[21523],{"type":51,"value":3781},{"type":46,"tag":470,"props":21525,"children":21526},{"style":531},[21527],{"type":51,"value":967},{"type":46,"tag":470,"props":21529,"children":21530},{"class":472,"line":8743},[21531,21535,21539,21543,21547,21551],{"type":46,"tag":470,"props":21532,"children":21533},{"style":537},[21534],{"type":51,"value":5695},{"type":46,"tag":470,"props":21536,"children":21537},{"style":531},[21538],{"type":51,"value":628},{"type":46,"tag":470,"props":21540,"children":21541},{"style":537},[21542],{"type":51,"value":3795},{"type":46,"tag":470,"props":21544,"children":21545},{"style":531},[21546],{"type":51,"value":619},{"type":46,"tag":470,"props":21548,"children":21549},{"style":537},[21550],{"type":51,"value":5213},{"type":46,"tag":470,"props":21552,"children":21553},{"style":531},[21554],{"type":51,"value":570},{"type":46,"tag":470,"props":21556,"children":21557},{"class":472,"line":8752},[21558,21562,21566,21570,21574,21578],{"type":46,"tag":470,"props":21559,"children":21560},{"style":537},[21561],{"type":51,"value":5695},{"type":46,"tag":470,"props":21563,"children":21564},{"style":531},[21565],{"type":51,"value":628},{"type":46,"tag":470,"props":21567,"children":21568},{"style":537},[21569],{"type":51,"value":2431},{"type":46,"tag":470,"props":21571,"children":21572},{"style":531},[21573],{"type":51,"value":619},{"type":46,"tag":470,"props":21575,"children":21576},{"style":537},[21577],{"type":51,"value":3488},{"type":46,"tag":470,"props":21579,"children":21580},{"style":531},[21581],{"type":51,"value":570},{"type":46,"tag":470,"props":21583,"children":21584},{"class":472,"line":8773},[21585],{"type":46,"tag":470,"props":21586,"children":21587},{"style":531},[21588],{"type":51,"value":5750},{"type":46,"tag":470,"props":21590,"children":21591},{"class":472,"line":8794},[21592],{"type":46,"tag":470,"props":21593,"children":21594},{"style":531},[21595],{"type":51,"value":1344},{"type":46,"tag":470,"props":21597,"children":21598},{"class":472,"line":8802},[21599],{"type":46,"tag":470,"props":21600,"children":21601},{"emptyLinePlaceholder":577},[21602],{"type":51,"value":580},{"type":46,"tag":470,"props":21604,"children":21605},{"class":472,"line":29},[21606,21610,21614],{"type":46,"tag":470,"props":21607,"children":21608},{"style":525},[21609],{"type":51,"value":5772},{"type":46,"tag":470,"props":21611,"children":21612},{"style":537},[21613],{"type":51,"value":5309},{"type":46,"tag":470,"props":21615,"children":21616},{"style":531},[21617],{"type":51,"value":570},{"type":46,"tag":470,"props":21619,"children":21620},{"class":472,"line":8858},[21621],{"type":46,"tag":470,"props":21622,"children":21623},{"style":531},[21624],{"type":51,"value":1117},{"type":46,"tag":470,"props":21626,"children":21627},{"class":472,"line":8866},[21628],{"type":46,"tag":470,"props":21629,"children":21630},{"emptyLinePlaceholder":577},[21631],{"type":51,"value":580},{"type":46,"tag":470,"props":21633,"children":21634},{"class":472,"line":8874},[21635],{"type":46,"tag":470,"props":21636,"children":21637},{"style":3418},[21638],{"type":51,"value":21639},"\u002F\u002F Validate swap response before broadcasting\n",{"type":46,"tag":470,"props":21641,"children":21642},{"class":472,"line":8906},[21643,21647,21652,21656,21660,21664,21668,21672,21676,21680,21684,21688,21692,21696,21700,21704,21708,21712,21717,21721],{"type":46,"tag":470,"props":21644,"children":21645},{"style":587},[21646],{"type":51,"value":4362},{"type":46,"tag":470,"props":21648,"children":21649},{"style":631},[21650],{"type":51,"value":21651}," validateSwap",{"type":46,"tag":470,"props":21653,"children":21654},{"style":531},[21655],{"type":51,"value":835},{"type":46,"tag":470,"props":21657,"children":21658},{"style":4374},[21659],{"type":51,"value":4110},{"type":46,"tag":470,"props":21661,"children":21662},{"style":531},[21663],{"type":51,"value":417},{"type":46,"tag":470,"props":21665,"children":21666},{"style":531},[21667],{"type":51,"value":534},{"type":46,"tag":470,"props":21669,"children":21670},{"style":2780},[21671],{"type":51,"value":17330},{"type":46,"tag":470,"props":21673,"children":21674},{"style":531},[21675],{"type":51,"value":5218},{"type":46,"tag":470,"props":21677,"children":21678},{"style":477},[21679],{"type":51,"value":5223},{"type":46,"tag":470,"props":21681,"children":21682},{"style":531},[21683],{"type":51,"value":799},{"type":46,"tag":470,"props":21685,"children":21686},{"style":2780},[21687],{"type":51,"value":19870},{"type":46,"tag":470,"props":21689,"children":21690},{"style":531},[21691],{"type":51,"value":5218},{"type":46,"tag":470,"props":21693,"children":21694},{"style":477},[21695],{"type":51,"value":5223},{"type":46,"tag":470,"props":21697,"children":21698},{"style":531},[21699],{"type":51,"value":799},{"type":46,"tag":470,"props":21701,"children":21702},{"style":2780},[21703],{"type":51,"value":550},{"type":46,"tag":470,"props":21705,"children":21706},{"style":531},[21707],{"type":51,"value":5218},{"type":46,"tag":470,"props":21709,"children":21710},{"style":477},[21711],{"type":51,"value":5223},{"type":46,"tag":470,"props":21713,"children":21714},{"style":531},[21715],{"type":51,"value":21716}," }):",{"type":46,"tag":470,"props":21718,"children":21719},{"style":477},[21720],{"type":51,"value":4396},{"type":46,"tag":470,"props":21722,"children":21723},{"style":531},[21724],{"type":51,"value":1165},{"type":46,"tag":470,"props":21726,"children":21727},{"class":472,"line":8914},[21728,21732,21736,21740,21744,21748,21752,21756,21760,21764,21768,21772,21776,21780,21784,21788,21792,21796,21800,21804,21808,21812],{"type":46,"tag":470,"props":21729,"children":21730},{"style":525},[21731],{"type":51,"value":3766},{"type":46,"tag":470,"props":21733,"children":21734},{"style":2780},[21735],{"type":51,"value":3771},{"type":46,"tag":470,"props":21737,"children":21738},{"style":531},[21739],{"type":51,"value":4416},{"type":46,"tag":470,"props":21741,"children":21742},{"style":537},[21743],{"type":51,"value":4110},{"type":46,"tag":470,"props":21745,"children":21746},{"style":531},[21747],{"type":51,"value":4433},{"type":46,"tag":470,"props":21749,"children":21750},{"style":537},[21751],{"type":51,"value":1250},{"type":46,"tag":470,"props":21753,"children":21754},{"style":531},[21755],{"type":51,"value":4442},{"type":46,"tag":470,"props":21757,"children":21758},{"style":537},[21759],{"type":51,"value":6198},{"type":46,"tag":470,"props":21761,"children":21762},{"style":531},[21763],{"type":51,"value":628},{"type":46,"tag":470,"props":21765,"children":21766},{"style":537},[21767],{"type":51,"value":1250},{"type":46,"tag":470,"props":21769,"children":21770},{"style":531},[21771],{"type":51,"value":3874},{"type":46,"tag":470,"props":21773,"children":21774},{"style":531},[21775],{"type":51,"value":4472},{"type":46,"tag":470,"props":21777,"children":21778},{"style":531},[21779],{"type":51,"value":4442},{"type":46,"tag":470,"props":21781,"children":21782},{"style":537},[21783],{"type":51,"value":6198},{"type":46,"tag":470,"props":21785,"children":21786},{"style":531},[21787],{"type":51,"value":628},{"type":46,"tag":470,"props":21789,"children":21790},{"style":537},[21791],{"type":51,"value":1250},{"type":46,"tag":470,"props":21793,"children":21794},{"style":531},[21795],{"type":51,"value":3874},{"type":46,"tag":470,"props":21797,"children":21798},{"style":531},[21799],{"type":51,"value":555},{"type":46,"tag":470,"props":21801,"children":21802},{"style":483},[21803],{"type":51,"value":4509},{"type":46,"tag":470,"props":21805,"children":21806},{"style":531},[21807],{"type":51,"value":565},{"type":46,"tag":470,"props":21809,"children":21810},{"style":2780},[21811],{"type":51,"value":3781},{"type":46,"tag":470,"props":21813,"children":21814},{"style":531},[21815],{"type":51,"value":967},{"type":46,"tag":470,"props":21817,"children":21818},{"class":472,"line":8923},[21819,21823,21827,21831,21835,21839,21843,21847,21851],{"type":46,"tag":470,"props":21820,"children":21821},{"style":525},[21822],{"type":51,"value":4529},{"type":46,"tag":470,"props":21824,"children":21825},{"style":531},[21826],{"type":51,"value":4534},{"type":46,"tag":470,"props":21828,"children":21829},{"style":631},[21830],{"type":51,"value":4539},{"type":46,"tag":470,"props":21832,"children":21833},{"style":2780},[21834],{"type":51,"value":835},{"type":46,"tag":470,"props":21836,"children":21837},{"style":531},[21838],{"type":51,"value":565},{"type":46,"tag":470,"props":21840,"children":21841},{"style":483},[21842],{"type":51,"value":4552},{"type":46,"tag":470,"props":21844,"children":21845},{"style":531},[21846],{"type":51,"value":565},{"type":46,"tag":470,"props":21848,"children":21849},{"style":2780},[21850],{"type":51,"value":842},{"type":46,"tag":470,"props":21852,"children":21853},{"style":531},[21854],{"type":51,"value":570},{"type":46,"tag":470,"props":21856,"children":21857},{"class":472,"line":8975},[21858],{"type":46,"tag":470,"props":21859,"children":21860},{"style":531},[21861],{"type":51,"value":1344},{"type":46,"tag":470,"props":21863,"children":21864},{"class":472,"line":9079},[21865,21869,21873,21877,21881,21885,21889,21893,21897,21901],{"type":46,"tag":470,"props":21866,"children":21867},{"style":525},[21868],{"type":51,"value":3766},{"type":46,"tag":470,"props":21870,"children":21871},{"style":2780},[21872],{"type":51,"value":3771},{"type":46,"tag":470,"props":21874,"children":21875},{"style":531},[21876],{"type":51,"value":4416},{"type":46,"tag":470,"props":21878,"children":21879},{"style":631},[21880],{"type":51,"value":6328},{"type":46,"tag":470,"props":21882,"children":21883},{"style":2780},[21884],{"type":51,"value":835},{"type":46,"tag":470,"props":21886,"children":21887},{"style":537},[21888],{"type":51,"value":4110},{"type":46,"tag":470,"props":21890,"children":21891},{"style":531},[21892],{"type":51,"value":628},{"type":46,"tag":470,"props":21894,"children":21895},{"style":537},[21896],{"type":51,"value":1250},{"type":46,"tag":470,"props":21898,"children":21899},{"style":2780},[21900],{"type":51,"value":4662},{"type":46,"tag":470,"props":21902,"children":21903},{"style":531},[21904],{"type":51,"value":967},{"type":46,"tag":470,"props":21906,"children":21907},{"class":472,"line":9087},[21908,21912,21916,21920,21924,21928,21932,21936,21940],{"type":46,"tag":470,"props":21909,"children":21910},{"style":525},[21911],{"type":51,"value":4529},{"type":46,"tag":470,"props":21913,"children":21914},{"style":531},[21915],{"type":51,"value":4534},{"type":46,"tag":470,"props":21917,"children":21918},{"style":631},[21919],{"type":51,"value":4539},{"type":46,"tag":470,"props":21921,"children":21922},{"style":2780},[21923],{"type":51,"value":835},{"type":46,"tag":470,"props":21925,"children":21926},{"style":531},[21927],{"type":51,"value":565},{"type":46,"tag":470,"props":21929,"children":21930},{"style":483},[21931],{"type":51,"value":6380},{"type":46,"tag":470,"props":21933,"children":21934},{"style":531},[21935],{"type":51,"value":565},{"type":46,"tag":470,"props":21937,"children":21938},{"style":2780},[21939],{"type":51,"value":842},{"type":46,"tag":470,"props":21941,"children":21942},{"style":531},[21943],{"type":51,"value":570},{"type":46,"tag":470,"props":21945,"children":21946},{"class":472,"line":9095},[21947],{"type":46,"tag":470,"props":21948,"children":21949},{"style":531},[21950],{"type":51,"value":1344},{"type":46,"tag":470,"props":21952,"children":21953},{"class":472,"line":9104},[21954,21958,21962,21966,21970,21974,21978,21982,21986,21990,21994,21998,22002,22006,22010,22014,22018,22022,22026,22030,22034,22038,22042,22046,22050,22054,22058,22062],{"type":46,"tag":470,"props":21955,"children":21956},{"style":525},[21957],{"type":51,"value":3766},{"type":46,"tag":470,"props":21959,"children":21960},{"style":2780},[21961],{"type":51,"value":3771},{"type":46,"tag":470,"props":21963,"children":21964},{"style":531},[21965],{"type":51,"value":4416},{"type":46,"tag":470,"props":21967,"children":21968},{"style":537},[21969],{"type":51,"value":4110},{"type":46,"tag":470,"props":21971,"children":21972},{"style":531},[21973],{"type":51,"value":628},{"type":46,"tag":470,"props":21975,"children":21976},{"style":537},[21977],{"type":51,"value":1178},{"type":46,"tag":470,"props":21979,"children":21980},{"style":531},[21981],{"type":51,"value":4442},{"type":46,"tag":470,"props":21983,"children":21984},{"style":531},[21985],{"type":51,"value":4629},{"type":46,"tag":470,"props":21987,"children":21988},{"style":631},[21989],{"type":51,"value":4591},{"type":46,"tag":470,"props":21991,"children":21992},{"style":2780},[21993],{"type":51,"value":835},{"type":46,"tag":470,"props":21995,"children":21996},{"style":537},[21997],{"type":51,"value":4110},{"type":46,"tag":470,"props":21999,"children":22000},{"style":531},[22001],{"type":51,"value":628},{"type":46,"tag":470,"props":22003,"children":22004},{"style":537},[22005],{"type":51,"value":1178},{"type":46,"tag":470,"props":22007,"children":22008},{"style":2780},[22009],{"type":51,"value":3781},{"type":46,"tag":470,"props":22011,"children":22012},{"style":531},[22013],{"type":51,"value":4624},{"type":46,"tag":470,"props":22015,"children":22016},{"style":531},[22017],{"type":51,"value":4629},{"type":46,"tag":470,"props":22019,"children":22020},{"style":537},[22021],{"type":51,"value":4110},{"type":46,"tag":470,"props":22023,"children":22024},{"style":531},[22025],{"type":51,"value":628},{"type":46,"tag":470,"props":22027,"children":22028},{"style":537},[22029],{"type":51,"value":1214},{"type":46,"tag":470,"props":22031,"children":22032},{"style":531},[22033],{"type":51,"value":4442},{"type":46,"tag":470,"props":22035,"children":22036},{"style":531},[22037],{"type":51,"value":4629},{"type":46,"tag":470,"props":22039,"children":22040},{"style":631},[22041],{"type":51,"value":4591},{"type":46,"tag":470,"props":22043,"children":22044},{"style":2780},[22045],{"type":51,"value":835},{"type":46,"tag":470,"props":22047,"children":22048},{"style":537},[22049],{"type":51,"value":4110},{"type":46,"tag":470,"props":22051,"children":22052},{"style":531},[22053],{"type":51,"value":628},{"type":46,"tag":470,"props":22055,"children":22056},{"style":537},[22057],{"type":51,"value":1214},{"type":46,"tag":470,"props":22059,"children":22060},{"style":2780},[22061],{"type":51,"value":4662},{"type":46,"tag":470,"props":22063,"children":22064},{"style":531},[22065],{"type":51,"value":967},{"type":46,"tag":470,"props":22067,"children":22068},{"class":472,"line":9145},[22069,22073,22077,22081,22085,22089,22093,22097,22101],{"type":46,"tag":470,"props":22070,"children":22071},{"style":525},[22072],{"type":51,"value":4529},{"type":46,"tag":470,"props":22074,"children":22075},{"style":531},[22076],{"type":51,"value":4534},{"type":46,"tag":470,"props":22078,"children":22079},{"style":631},[22080],{"type":51,"value":4539},{"type":46,"tag":470,"props":22082,"children":22083},{"style":2780},[22084],{"type":51,"value":835},{"type":46,"tag":470,"props":22086,"children":22087},{"style":531},[22088],{"type":51,"value":565},{"type":46,"tag":470,"props":22090,"children":22091},{"style":483},[22092],{"type":51,"value":4694},{"type":46,"tag":470,"props":22094,"children":22095},{"style":531},[22096],{"type":51,"value":565},{"type":46,"tag":470,"props":22098,"children":22099},{"style":2780},[22100],{"type":51,"value":842},{"type":46,"tag":470,"props":22102,"children":22103},{"style":531},[22104],{"type":51,"value":570},{"type":46,"tag":470,"props":22106,"children":22107},{"class":472,"line":9178},[22108],{"type":46,"tag":470,"props":22109,"children":22110},{"style":531},[22111],{"type":51,"value":1344},{"type":46,"tag":470,"props":22113,"children":22114},{"class":472,"line":9241},[22115],{"type":46,"tag":470,"props":22116,"children":22117},{"style":531},[22118],{"type":51,"value":1117},{"type":46,"tag":470,"props":22120,"children":22121},{"class":472,"line":9304},[22122],{"type":46,"tag":470,"props":22123,"children":22124},{"emptyLinePlaceholder":577},[22125],{"type":51,"value":580},{"type":46,"tag":470,"props":22127,"children":22128},{"class":472,"line":9313},[22129,22133,22137,22141,22145,22149,22153,22157,22161,22165,22169,22173,22177,22181,22185,22189,22193,22197,22201,22205,22209],{"type":46,"tag":470,"props":22130,"children":22131},{"style":587},[22132],{"type":51,"value":14200},{"type":46,"tag":470,"props":22134,"children":22135},{"style":587},[22136],{"type":51,"value":14205},{"type":46,"tag":470,"props":22138,"children":22139},{"style":631},[22140],{"type":51,"value":18189},{"type":46,"tag":470,"props":22142,"children":22143},{"style":531},[22144],{"type":51,"value":835},{"type":46,"tag":470,"props":22146,"children":22147},{"style":4374},[22148],{"type":51,"value":1467},{"type":46,"tag":470,"props":22150,"children":22151},{"style":531},[22152],{"type":51,"value":417},{"type":46,"tag":470,"props":22154,"children":22155},{"style":477},[22156],{"type":51,"value":10719},{"type":46,"tag":470,"props":22158,"children":22159},{"style":531},[22160],{"type":51,"value":604},{"type":46,"tag":470,"props":22162,"children":22163},{"style":4374},[22164],{"type":51,"value":13233},{"type":46,"tag":470,"props":22166,"children":22167},{"style":531},[22168],{"type":51,"value":417},{"type":46,"tag":470,"props":22170,"children":22171},{"style":477},[22172],{"type":51,"value":10719},{"type":46,"tag":470,"props":22174,"children":22175},{"style":531},[22176],{"type":51,"value":604},{"type":46,"tag":470,"props":22178,"children":22179},{"style":4374},[22180],{"type":51,"value":8150},{"type":46,"tag":470,"props":22182,"children":22183},{"style":531},[22184],{"type":51,"value":417},{"type":46,"tag":470,"props":22186,"children":22187},{"style":477},[22188],{"type":51,"value":5223},{"type":46,"tag":470,"props":22190,"children":22191},{"style":531},[22192],{"type":51,"value":604},{"type":46,"tag":470,"props":22194,"children":22195},{"style":4374},[22196],{"type":51,"value":19966},{"type":46,"tag":470,"props":22198,"children":22199},{"style":531},[22200],{"type":51,"value":417},{"type":46,"tag":470,"props":22202,"children":22203},{"style":477},[22204],{"type":51,"value":8227},{"type":46,"tag":470,"props":22206,"children":22207},{"style":531},[22208],{"type":51,"value":842},{"type":46,"tag":470,"props":22210,"children":22211},{"style":531},[22212],{"type":51,"value":1165},{"type":46,"tag":470,"props":22214,"children":22215},{"class":472,"line":9337},[22216,22220,22225,22229,22233,22238,22242],{"type":46,"tag":470,"props":22217,"children":22218},{"style":587},[22219],{"type":51,"value":5252},{"type":46,"tag":470,"props":22221,"children":22222},{"style":537},[22223],{"type":51,"value":22224}," ETH_ADDRESS",{"type":46,"tag":470,"props":22226,"children":22227},{"style":531},[22228],{"type":51,"value":619},{"type":46,"tag":470,"props":22230,"children":22231},{"style":531},[22232],{"type":51,"value":555},{"type":46,"tag":470,"props":22234,"children":22235},{"style":483},[22236],{"type":51,"value":22237},"0x0000000000000000000000000000000000000000",{"type":46,"tag":470,"props":22239,"children":22240},{"style":531},[22241],{"type":51,"value":565},{"type":46,"tag":470,"props":22243,"children":22244},{"style":531},[22245],{"type":51,"value":570},{"type":46,"tag":470,"props":22247,"children":22248},{"class":472,"line":9345},[22249],{"type":46,"tag":470,"props":22250,"children":22251},{"emptyLinePlaceholder":577},[22252],{"type":51,"value":580},{"type":46,"tag":470,"props":22254,"children":22255},{"class":472,"line":9385},[22256],{"type":46,"tag":470,"props":22257,"children":22258},{"style":3418},[22259],{"type":51,"value":22260},"  \u002F\u002F 1. Check approval (for ERC20 tokens, not native ETH)\n",{"type":46,"tag":470,"props":22262,"children":22263},{"class":472,"line":13530},[22264,22268,22272,22276,22281,22285,22289],{"type":46,"tag":470,"props":22265,"children":22266},{"style":525},[22267],{"type":51,"value":3766},{"type":46,"tag":470,"props":22269,"children":22270},{"style":2780},[22271],{"type":51,"value":3771},{"type":46,"tag":470,"props":22273,"children":22274},{"style":537},[22275],{"type":51,"value":1467},{"type":46,"tag":470,"props":22277,"children":22278},{"style":531},[22279],{"type":51,"value":22280}," !==",{"type":46,"tag":470,"props":22282,"children":22283},{"style":537},[22284],{"type":51,"value":22224},{"type":46,"tag":470,"props":22286,"children":22287},{"style":2780},[22288],{"type":51,"value":3781},{"type":46,"tag":470,"props":22290,"children":22291},{"style":531},[22292],{"type":51,"value":967},{"type":46,"tag":470,"props":22294,"children":22295},{"class":472,"line":13586},[22296,22300,22305,22309,22313,22317,22321,22325,22329,22333,22337,22341,22345],{"type":46,"tag":470,"props":22297,"children":22298},{"style":587},[22299],{"type":51,"value":9184},{"type":46,"tag":470,"props":22301,"children":22302},{"style":537},[22303],{"type":51,"value":22304}," approvalRes",{"type":46,"tag":470,"props":22306,"children":22307},{"style":531},[22308],{"type":51,"value":619},{"type":46,"tag":470,"props":22310,"children":22311},{"style":525},[22312],{"type":51,"value":3443},{"type":46,"tag":470,"props":22314,"children":22315},{"style":631},[22316],{"type":51,"value":17652},{"type":46,"tag":470,"props":22318,"children":22319},{"style":2780},[22320],{"type":51,"value":835},{"type":46,"tag":470,"props":22322,"children":22323},{"style":531},[22324],{"type":51,"value":17661},{"type":46,"tag":470,"props":22326,"children":22327},{"style":537},[22328],{"type":51,"value":17666},{"type":46,"tag":470,"props":22330,"children":22331},{"style":531},[22332],{"type":51,"value":614},{"type":46,"tag":470,"props":22334,"children":22335},{"style":483},[22336],{"type":51,"value":10588},{"type":46,"tag":470,"props":22338,"children":22339},{"style":531},[22340],{"type":51,"value":828},{"type":46,"tag":470,"props":22342,"children":22343},{"style":531},[22344],{"type":51,"value":604},{"type":46,"tag":470,"props":22346,"children":22347},{"style":531},[22348],{"type":51,"value":1165},{"type":46,"tag":470,"props":22350,"children":22351},{"class":472,"line":13634},[22352,22356,22360,22364,22368,22372],{"type":46,"tag":470,"props":22353,"children":22354},{"style":2780},[22355],{"type":51,"value":18858},{"type":46,"tag":470,"props":22357,"children":22358},{"style":531},[22359],{"type":51,"value":417},{"type":46,"tag":470,"props":22361,"children":22362},{"style":531},[22363],{"type":51,"value":555},{"type":46,"tag":470,"props":22365,"children":22366},{"style":483},[22367],{"type":51,"value":936},{"type":46,"tag":470,"props":22369,"children":22370},{"style":531},[22371],{"type":51,"value":565},{"type":46,"tag":470,"props":22373,"children":22374},{"style":531},[22375],{"type":51,"value":1007},{"type":46,"tag":470,"props":22377,"children":22378},{"class":472,"line":13654},[22379,22383,22387],{"type":46,"tag":470,"props":22380,"children":22381},{"style":2780},[22382],{"type":51,"value":18886},{"type":46,"tag":470,"props":22384,"children":22385},{"style":531},[22386],{"type":51,"value":417},{"type":46,"tag":470,"props":22388,"children":22389},{"style":531},[22390],{"type":51,"value":1165},{"type":46,"tag":470,"props":22392,"children":22393},{"class":472,"line":13719},[22394,22398,22402,22406,22410,22414],{"type":46,"tag":470,"props":22395,"children":22396},{"style":531},[22397],{"type":51,"value":18902},{"type":46,"tag":470,"props":22399,"children":22400},{"style":2780},[22401],{"type":51,"value":383},{"type":46,"tag":470,"props":22403,"children":22404},{"style":531},[22405],{"type":51,"value":565},{"type":46,"tag":470,"props":22407,"children":22408},{"style":531},[22409],{"type":51,"value":417},{"type":46,"tag":470,"props":22411,"children":22412},{"style":537},[22413],{"type":51,"value":17792},{"type":46,"tag":470,"props":22415,"children":22416},{"style":531},[22417],{"type":51,"value":1007},{"type":46,"tag":470,"props":22419,"children":22420},{"class":472,"line":13735},[22421,22425,22429,22433,22437,22441,22445,22449],{"type":46,"tag":470,"props":22422,"children":22423},{"style":531},[22424],{"type":51,"value":18902},{"type":46,"tag":470,"props":22426,"children":22427},{"style":2780},[22428],{"type":51,"value":17743},{"type":46,"tag":470,"props":22430,"children":22431},{"style":531},[22432],{"type":51,"value":565},{"type":46,"tag":470,"props":22434,"children":22435},{"style":531},[22436],{"type":51,"value":417},{"type":46,"tag":470,"props":22438,"children":22439},{"style":531},[22440],{"type":51,"value":555},{"type":46,"tag":470,"props":22442,"children":22443},{"style":483},[22444],{"type":51,"value":17760},{"type":46,"tag":470,"props":22446,"children":22447},{"style":531},[22448],{"type":51,"value":565},{"type":46,"tag":470,"props":22450,"children":22451},{"style":531},[22452],{"type":51,"value":1007},{"type":46,"tag":470,"props":22454,"children":22455},{"class":472,"line":13743},[22456,22460,22464,22468,22472,22476,22480,22484],{"type":46,"tag":470,"props":22457,"children":22458},{"style":531},[22459],{"type":51,"value":18902},{"type":46,"tag":470,"props":22461,"children":22462},{"style":2780},[22463],{"type":51,"value":17808},{"type":46,"tag":470,"props":22465,"children":22466},{"style":531},[22467],{"type":51,"value":565},{"type":46,"tag":470,"props":22469,"children":22470},{"style":531},[22471],{"type":51,"value":417},{"type":46,"tag":470,"props":22473,"children":22474},{"style":531},[22475],{"type":51,"value":555},{"type":46,"tag":470,"props":22477,"children":22478},{"style":483},[22479],{"type":51,"value":16528},{"type":46,"tag":470,"props":22481,"children":22482},{"style":531},[22483],{"type":51,"value":565},{"type":46,"tag":470,"props":22485,"children":22486},{"style":531},[22487],{"type":51,"value":1007},{"type":46,"tag":470,"props":22489,"children":22490},{"class":472,"line":13752},[22491],{"type":46,"tag":470,"props":22492,"children":22493},{"style":531},[22494],{"type":51,"value":2883},{"type":46,"tag":470,"props":22496,"children":22497},{"class":472,"line":13793},[22498,22502,22506,22510,22514,22518,22522],{"type":46,"tag":470,"props":22499,"children":22500},{"style":2780},[22501],{"type":51,"value":19010},{"type":46,"tag":470,"props":22503,"children":22504},{"style":531},[22505],{"type":51,"value":417},{"type":46,"tag":470,"props":22507,"children":22508},{"style":537},[22509],{"type":51,"value":17857},{"type":46,"tag":470,"props":22511,"children":22512},{"style":531},[22513],{"type":51,"value":628},{"type":46,"tag":470,"props":22515,"children":22516},{"style":631},[22517],{"type":51,"value":17866},{"type":46,"tag":470,"props":22519,"children":22520},{"style":2780},[22521],{"type":51,"value":835},{"type":46,"tag":470,"props":22523,"children":22524},{"style":531},[22525],{"type":51,"value":967},{"type":46,"tag":470,"props":22527,"children":22528},{"class":472,"line":13813},[22529,22534,22538,22542,22546,22550],{"type":46,"tag":470,"props":22530,"children":22531},{"style":2780},[22532],{"type":51,"value":22533},"        walletAddress",{"type":46,"tag":470,"props":22535,"children":22536},{"style":531},[22537],{"type":51,"value":417},{"type":46,"tag":470,"props":22539,"children":22540},{"style":537},[22541],{"type":51,"value":20977},{"type":46,"tag":470,"props":22543,"children":22544},{"style":531},[22545],{"type":51,"value":628},{"type":46,"tag":470,"props":22547,"children":22548},{"style":537},[22549],{"type":51,"value":15594},{"type":46,"tag":470,"props":22551,"children":22552},{"style":531},[22553],{"type":51,"value":1007},{"type":46,"tag":470,"props":22555,"children":22556},{"class":472,"line":13833},[22557,22562,22566,22570],{"type":46,"tag":470,"props":22558,"children":22559},{"style":2780},[22560],{"type":51,"value":22561},"        token",{"type":46,"tag":470,"props":22563,"children":22564},{"style":531},[22565],{"type":51,"value":417},{"type":46,"tag":470,"props":22567,"children":22568},{"style":537},[22569],{"type":51,"value":13367},{"type":46,"tag":470,"props":22571,"children":22572},{"style":531},[22573],{"type":51,"value":1007},{"type":46,"tag":470,"props":22575,"children":22576},{"class":472,"line":13860},[22577,22582],{"type":46,"tag":470,"props":22578,"children":22579},{"style":537},[22580],{"type":51,"value":22581},"        amount",{"type":46,"tag":470,"props":22583,"children":22584},{"style":531},[22585],{"type":51,"value":1007},{"type":46,"tag":470,"props":22587,"children":22588},{"class":472,"line":18960},[22589,22594],{"type":46,"tag":470,"props":22590,"children":22591},{"style":537},[22592],{"type":51,"value":22593},"        chainId",{"type":46,"tag":470,"props":22595,"children":22596},{"style":531},[22597],{"type":51,"value":1007},{"type":46,"tag":470,"props":22599,"children":22600},{"class":472,"line":18996},[22601,22605,22609],{"type":46,"tag":470,"props":22602,"children":22603},{"style":531},[22604],{"type":51,"value":17890},{"type":46,"tag":470,"props":22606,"children":22607},{"style":2780},[22608],{"type":51,"value":842},{"type":46,"tag":470,"props":22610,"children":22611},{"style":531},[22612],{"type":51,"value":1007},{"type":46,"tag":470,"props":22614,"children":22615},{"class":472,"line":19004},[22616,22620,22624],{"type":46,"tag":470,"props":22617,"children":22618},{"style":531},[22619],{"type":51,"value":18061},{"type":46,"tag":470,"props":22621,"children":22622},{"style":2780},[22623],{"type":51,"value":842},{"type":46,"tag":470,"props":22625,"children":22626},{"style":531},[22627],{"type":51,"value":570},{"type":46,"tag":470,"props":22629,"children":22630},{"class":472,"line":19045},[22631,22635,22640,22644,22648,22652,22656,22660,22664],{"type":46,"tag":470,"props":22632,"children":22633},{"style":587},[22634],{"type":51,"value":9184},{"type":46,"tag":470,"props":22636,"children":22637},{"style":537},[22638],{"type":51,"value":22639}," approvalData",{"type":46,"tag":470,"props":22641,"children":22642},{"style":531},[22643],{"type":51,"value":619},{"type":46,"tag":470,"props":22645,"children":22646},{"style":525},[22647],{"type":51,"value":3443},{"type":46,"tag":470,"props":22649,"children":22650},{"style":537},[22651],{"type":51,"value":22304},{"type":46,"tag":470,"props":22653,"children":22654},{"style":531},[22655],{"type":51,"value":628},{"type":46,"tag":470,"props":22657,"children":22658},{"style":631},[22659],{"type":51,"value":955},{"type":46,"tag":470,"props":22661,"children":22662},{"style":2780},[22663],{"type":51,"value":7810},{"type":46,"tag":470,"props":22665,"children":22666},{"style":531},[22667],{"type":51,"value":570},{"type":46,"tag":470,"props":22669,"children":22670},{"class":472,"line":19061},[22671],{"type":46,"tag":470,"props":22672,"children":22673},{"emptyLinePlaceholder":577},[22674],{"type":51,"value":580},{"type":46,"tag":470,"props":22676,"children":22677},{"class":472,"line":19101},[22678,22682,22686,22691,22695,22699,22703],{"type":46,"tag":470,"props":22679,"children":22680},{"style":525},[22681],{"type":51,"value":5551},{"type":46,"tag":470,"props":22683,"children":22684},{"style":2780},[22685],{"type":51,"value":3771},{"type":46,"tag":470,"props":22687,"children":22688},{"style":537},[22689],{"type":51,"value":22690},"approvalData",{"type":46,"tag":470,"props":22692,"children":22693},{"style":531},[22694],{"type":51,"value":628},{"type":46,"tag":470,"props":22696,"children":22697},{"style":537},[22698],{"type":51,"value":1152},{"type":46,"tag":470,"props":22700,"children":22701},{"style":2780},[22702],{"type":51,"value":3781},{"type":46,"tag":470,"props":22704,"children":22705},{"style":531},[22706],{"type":51,"value":967},{"type":46,"tag":470,"props":22708,"children":22709},{"class":472,"line":19187},[22710,22714,22718,22722,22726,22730,22734,22738,22742],{"type":46,"tag":470,"props":22711,"children":22712},{"style":587},[22713],{"type":51,"value":17635},{"type":46,"tag":470,"props":22715,"children":22716},{"style":537},[22717],{"type":51,"value":11036},{"type":46,"tag":470,"props":22719,"children":22720},{"style":531},[22721],{"type":51,"value":619},{"type":46,"tag":470,"props":22723,"children":22724},{"style":525},[22725],{"type":51,"value":3443},{"type":46,"tag":470,"props":22727,"children":22728},{"style":537},[22729],{"type":51,"value":11049},{"type":46,"tag":470,"props":22731,"children":22732},{"style":531},[22733],{"type":51,"value":628},{"type":46,"tag":470,"props":22735,"children":22736},{"style":631},[22737],{"type":51,"value":898},{"type":46,"tag":470,"props":22739,"children":22740},{"style":2780},[22741],{"type":51,"value":835},{"type":46,"tag":470,"props":22743,"children":22744},{"style":531},[22745],{"type":51,"value":967},{"type":46,"tag":470,"props":22747,"children":22748},{"class":472,"line":19195},[22749,22754,22758,22762,22766,22770,22774,22778],{"type":46,"tag":470,"props":22750,"children":22751},{"style":2780},[22752],{"type":51,"value":22753},"        to",{"type":46,"tag":470,"props":22755,"children":22756},{"style":531},[22757],{"type":51,"value":417},{"type":46,"tag":470,"props":22759,"children":22760},{"style":537},[22761],{"type":51,"value":22639},{"type":46,"tag":470,"props":22763,"children":22764},{"style":531},[22765],{"type":51,"value":628},{"type":46,"tag":470,"props":22767,"children":22768},{"style":537},[22769],{"type":51,"value":1152},{"type":46,"tag":470,"props":22771,"children":22772},{"style":531},[22773],{"type":51,"value":628},{"type":46,"tag":470,"props":22775,"children":22776},{"style":537},[22777],{"type":51,"value":1178},{"type":46,"tag":470,"props":22779,"children":22780},{"style":531},[22781],{"type":51,"value":1007},{"type":46,"tag":470,"props":22783,"children":22784},{"class":472,"line":19204},[22785,22790,22794,22798,22802,22806,22810,22814],{"type":46,"tag":470,"props":22786,"children":22787},{"style":2780},[22788],{"type":51,"value":22789},"        data",{"type":46,"tag":470,"props":22791,"children":22792},{"style":531},[22793],{"type":51,"value":417},{"type":46,"tag":470,"props":22795,"children":22796},{"style":537},[22797],{"type":51,"value":22639},{"type":46,"tag":470,"props":22799,"children":22800},{"style":531},[22801],{"type":51,"value":628},{"type":46,"tag":470,"props":22803,"children":22804},{"style":537},[22805],{"type":51,"value":1152},{"type":46,"tag":470,"props":22807,"children":22808},{"style":531},[22809],{"type":51,"value":628},{"type":46,"tag":470,"props":22811,"children":22812},{"style":537},[22813],{"type":51,"value":1250},{"type":46,"tag":470,"props":22815,"children":22816},{"style":531},[22817],{"type":51,"value":1007},{"type":46,"tag":470,"props":22819,"children":22820},{"class":472,"line":19320},[22821,22826,22830,22834,22838,22842,22846,22850,22854,22858,22862,22866,22870,22874,22878],{"type":46,"tag":470,"props":22822,"children":22823},{"style":2780},[22824],{"type":51,"value":22825},"        value",{"type":46,"tag":470,"props":22827,"children":22828},{"style":531},[22829],{"type":51,"value":417},{"type":46,"tag":470,"props":22831,"children":22832},{"style":631},[22833],{"type":51,"value":13848},{"type":46,"tag":470,"props":22835,"children":22836},{"style":2780},[22837],{"type":51,"value":835},{"type":46,"tag":470,"props":22839,"children":22840},{"style":537},[22841],{"type":51,"value":22690},{"type":46,"tag":470,"props":22843,"children":22844},{"style":531},[22845],{"type":51,"value":628},{"type":46,"tag":470,"props":22847,"children":22848},{"style":537},[22849],{"type":51,"value":1152},{"type":46,"tag":470,"props":22851,"children":22852},{"style":531},[22853],{"type":51,"value":628},{"type":46,"tag":470,"props":22855,"children":22856},{"style":537},[22857],{"type":51,"value":1286},{"type":46,"tag":470,"props":22859,"children":22860},{"style":531},[22861],{"type":51,"value":4442},{"type":46,"tag":470,"props":22863,"children":22864},{"style":531},[22865],{"type":51,"value":555},{"type":46,"tag":470,"props":22867,"children":22868},{"style":483},[22869],{"type":51,"value":1303},{"type":46,"tag":470,"props":22871,"children":22872},{"style":531},[22873],{"type":51,"value":565},{"type":46,"tag":470,"props":22875,"children":22876},{"style":2780},[22877],{"type":51,"value":842},{"type":46,"tag":470,"props":22879,"children":22880},{"style":531},[22881],{"type":51,"value":1007},{"type":46,"tag":470,"props":22883,"children":22884},{"class":472,"line":19362},[22885,22889,22893],{"type":46,"tag":470,"props":22886,"children":22887},{"style":531},[22888],{"type":51,"value":17890},{"type":46,"tag":470,"props":22890,"children":22891},{"style":2780},[22892],{"type":51,"value":842},{"type":46,"tag":470,"props":22894,"children":22895},{"style":531},[22896],{"type":51,"value":570},{"type":46,"tag":470,"props":22898,"children":22899},{"class":472,"line":19370},[22900,22905,22909,22913,22917,22921,22925,22929,22933,22937],{"type":46,"tag":470,"props":22901,"children":22902},{"style":525},[22903],{"type":51,"value":22904},"      await",{"type":46,"tag":470,"props":22906,"children":22907},{"style":537},[22908],{"type":51,"value":10833},{"type":46,"tag":470,"props":22910,"children":22911},{"style":531},[22912],{"type":51,"value":628},{"type":46,"tag":470,"props":22914,"children":22915},{"style":631},[22916],{"type":51,"value":11208},{"type":46,"tag":470,"props":22918,"children":22919},{"style":2780},[22920],{"type":51,"value":835},{"type":46,"tag":470,"props":22922,"children":22923},{"style":531},[22924],{"type":51,"value":11217},{"type":46,"tag":470,"props":22926,"children":22927},{"style":537},[22928],{"type":51,"value":11036},{"type":46,"tag":470,"props":22930,"children":22931},{"style":531},[22932],{"type":51,"value":545},{"type":46,"tag":470,"props":22934,"children":22935},{"style":2780},[22936],{"type":51,"value":842},{"type":46,"tag":470,"props":22938,"children":22939},{"style":531},[22940],{"type":51,"value":570},{"type":46,"tag":470,"props":22942,"children":22943},{"class":472,"line":19378},[22944],{"type":46,"tag":470,"props":22945,"children":22946},{"style":531},[22947],{"type":51,"value":5750},{"type":46,"tag":470,"props":22949,"children":22950},{"class":472,"line":19387},[22951],{"type":46,"tag":470,"props":22952,"children":22953},{"style":531},[22954],{"type":51,"value":1344},{"type":46,"tag":470,"props":22956,"children":22957},{"class":472,"line":19449},[22958],{"type":46,"tag":470,"props":22959,"children":22960},{"emptyLinePlaceholder":577},[22961],{"type":51,"value":580},{"type":46,"tag":470,"props":22963,"children":22964},{"class":472,"line":19506},[22965],{"type":46,"tag":470,"props":22966,"children":22967},{"style":3418},[22968],{"type":51,"value":22969},"  \u002F\u002F 2. Get quote\n",{"type":46,"tag":470,"props":22971,"children":22972},{"class":472,"line":19522},[22973,22977,22982,22986,22990,22994,22998,23002,23006,23010,23014,23018,23022],{"type":46,"tag":470,"props":22974,"children":22975},{"style":587},[22976],{"type":51,"value":5252},{"type":46,"tag":470,"props":22978,"children":22979},{"style":537},[22980],{"type":51,"value":22981}," quoteRes",{"type":46,"tag":470,"props":22983,"children":22984},{"style":531},[22985],{"type":51,"value":619},{"type":46,"tag":470,"props":22987,"children":22988},{"style":525},[22989],{"type":51,"value":3443},{"type":46,"tag":470,"props":22991,"children":22992},{"style":631},[22993],{"type":51,"value":17652},{"type":46,"tag":470,"props":22995,"children":22996},{"style":2780},[22997],{"type":51,"value":835},{"type":46,"tag":470,"props":22999,"children":23000},{"style":531},[23001],{"type":51,"value":17661},{"type":46,"tag":470,"props":23003,"children":23004},{"style":537},[23005],{"type":51,"value":17666},{"type":46,"tag":470,"props":23007,"children":23008},{"style":531},[23009],{"type":51,"value":614},{"type":46,"tag":470,"props":23011,"children":23012},{"style":483},[23013],{"type":51,"value":11579},{"type":46,"tag":470,"props":23015,"children":23016},{"style":531},[23017],{"type":51,"value":828},{"type":46,"tag":470,"props":23019,"children":23020},{"style":531},[23021],{"type":51,"value":604},{"type":46,"tag":470,"props":23023,"children":23024},{"style":531},[23025],{"type":51,"value":1165},{"type":46,"tag":470,"props":23027,"children":23028},{"class":472,"line":19530},[23029,23034,23038,23042,23046,23050],{"type":46,"tag":470,"props":23030,"children":23031},{"style":2780},[23032],{"type":51,"value":23033},"    method",{"type":46,"tag":470,"props":23035,"children":23036},{"style":531},[23037],{"type":51,"value":417},{"type":46,"tag":470,"props":23039,"children":23040},{"style":531},[23041],{"type":51,"value":555},{"type":46,"tag":470,"props":23043,"children":23044},{"style":483},[23045],{"type":51,"value":936},{"type":46,"tag":470,"props":23047,"children":23048},{"style":531},[23049],{"type":51,"value":565},{"type":46,"tag":470,"props":23051,"children":23052},{"style":531},[23053],{"type":51,"value":1007},{"type":46,"tag":470,"props":23055,"children":23056},{"class":472,"line":19538},[23057,23062,23066],{"type":46,"tag":470,"props":23058,"children":23059},{"style":2780},[23060],{"type":51,"value":23061},"    headers",{"type":46,"tag":470,"props":23063,"children":23064},{"style":531},[23065],{"type":51,"value":417},{"type":46,"tag":470,"props":23067,"children":23068},{"style":531},[23069],{"type":51,"value":1165},{"type":46,"tag":470,"props":23071,"children":23072},{"class":472,"line":19609},[23073,23077,23081,23085,23089,23093],{"type":46,"tag":470,"props":23074,"children":23075},{"style":531},[23076],{"type":51,"value":7360},{"type":46,"tag":470,"props":23078,"children":23079},{"style":2780},[23080],{"type":51,"value":383},{"type":46,"tag":470,"props":23082,"children":23083},{"style":531},[23084],{"type":51,"value":565},{"type":46,"tag":470,"props":23086,"children":23087},{"style":531},[23088],{"type":51,"value":417},{"type":46,"tag":470,"props":23090,"children":23091},{"style":537},[23092],{"type":51,"value":17792},{"type":46,"tag":470,"props":23094,"children":23095},{"style":531},[23096],{"type":51,"value":1007},{"type":46,"tag":470,"props":23098,"children":23100},{"class":472,"line":23099},87,[23101,23105,23109,23113,23117,23121,23125,23129],{"type":46,"tag":470,"props":23102,"children":23103},{"style":531},[23104],{"type":51,"value":7360},{"type":46,"tag":470,"props":23106,"children":23107},{"style":2780},[23108],{"type":51,"value":17743},{"type":46,"tag":470,"props":23110,"children":23111},{"style":531},[23112],{"type":51,"value":565},{"type":46,"tag":470,"props":23114,"children":23115},{"style":531},[23116],{"type":51,"value":417},{"type":46,"tag":470,"props":23118,"children":23119},{"style":531},[23120],{"type":51,"value":555},{"type":46,"tag":470,"props":23122,"children":23123},{"style":483},[23124],{"type":51,"value":17760},{"type":46,"tag":470,"props":23126,"children":23127},{"style":531},[23128],{"type":51,"value":565},{"type":46,"tag":470,"props":23130,"children":23131},{"style":531},[23132],{"type":51,"value":1007},{"type":46,"tag":470,"props":23134,"children":23136},{"class":472,"line":23135},88,[23137,23141,23145,23149,23153,23157,23161,23165],{"type":46,"tag":470,"props":23138,"children":23139},{"style":531},[23140],{"type":51,"value":7360},{"type":46,"tag":470,"props":23142,"children":23143},{"style":2780},[23144],{"type":51,"value":17808},{"type":46,"tag":470,"props":23146,"children":23147},{"style":531},[23148],{"type":51,"value":565},{"type":46,"tag":470,"props":23150,"children":23151},{"style":531},[23152],{"type":51,"value":417},{"type":46,"tag":470,"props":23154,"children":23155},{"style":531},[23156],{"type":51,"value":555},{"type":46,"tag":470,"props":23158,"children":23159},{"style":483},[23160],{"type":51,"value":16528},{"type":46,"tag":470,"props":23162,"children":23163},{"style":531},[23164],{"type":51,"value":565},{"type":46,"tag":470,"props":23166,"children":23167},{"style":531},[23168],{"type":51,"value":1007},{"type":46,"tag":470,"props":23170,"children":23172},{"class":472,"line":23171},89,[23173],{"type":46,"tag":470,"props":23174,"children":23175},{"style":531},[23176],{"type":51,"value":3112},{"type":46,"tag":470,"props":23178,"children":23180},{"class":472,"line":23179},90,[23181,23186,23190,23194,23198,23202,23206],{"type":46,"tag":470,"props":23182,"children":23183},{"style":2780},[23184],{"type":51,"value":23185},"    body",{"type":46,"tag":470,"props":23187,"children":23188},{"style":531},[23189],{"type":51,"value":417},{"type":46,"tag":470,"props":23191,"children":23192},{"style":537},[23193],{"type":51,"value":17857},{"type":46,"tag":470,"props":23195,"children":23196},{"style":531},[23197],{"type":51,"value":628},{"type":46,"tag":470,"props":23199,"children":23200},{"style":631},[23201],{"type":51,"value":17866},{"type":46,"tag":470,"props":23203,"children":23204},{"style":2780},[23205],{"type":51,"value":835},{"type":46,"tag":470,"props":23207,"children":23208},{"style":531},[23209],{"type":51,"value":967},{"type":46,"tag":470,"props":23211,"children":23213},{"class":472,"line":23212},91,[23214,23219,23223,23227,23231,23235],{"type":46,"tag":470,"props":23215,"children":23216},{"style":2780},[23217],{"type":51,"value":23218},"      swapper",{"type":46,"tag":470,"props":23220,"children":23221},{"style":531},[23222],{"type":51,"value":417},{"type":46,"tag":470,"props":23224,"children":23225},{"style":537},[23226],{"type":51,"value":20977},{"type":46,"tag":470,"props":23228,"children":23229},{"style":531},[23230],{"type":51,"value":628},{"type":46,"tag":470,"props":23232,"children":23233},{"style":537},[23234],{"type":51,"value":15594},{"type":46,"tag":470,"props":23236,"children":23237},{"style":531},[23238],{"type":51,"value":1007},{"type":46,"tag":470,"props":23240,"children":23242},{"class":472,"line":23241},92,[23243,23248],{"type":46,"tag":470,"props":23244,"children":23245},{"style":537},[23246],{"type":51,"value":23247},"      tokenIn",{"type":46,"tag":470,"props":23249,"children":23250},{"style":531},[23251],{"type":51,"value":1007},{"type":46,"tag":470,"props":23253,"children":23255},{"class":472,"line":23254},93,[23256,23261],{"type":46,"tag":470,"props":23257,"children":23258},{"style":537},[23259],{"type":51,"value":23260},"      tokenOut",{"type":46,"tag":470,"props":23262,"children":23263},{"style":531},[23264],{"type":51,"value":1007},{"type":46,"tag":470,"props":23266,"children":23268},{"class":472,"line":23267},94,[23269,23274,23278,23283,23287,23291,23295],{"type":46,"tag":470,"props":23270,"children":23271},{"style":2780},[23272],{"type":51,"value":23273},"      tokenInChainId",{"type":46,"tag":470,"props":23275,"children":23276},{"style":531},[23277],{"type":51,"value":417},{"type":46,"tag":470,"props":23279,"children":23280},{"style":631},[23281],{"type":51,"value":23282}," String",{"type":46,"tag":470,"props":23284,"children":23285},{"style":2780},[23286],{"type":51,"value":835},{"type":46,"tag":470,"props":23288,"children":23289},{"style":537},[23290],{"type":51,"value":1094},{"type":46,"tag":470,"props":23292,"children":23293},{"style":2780},[23294],{"type":51,"value":842},{"type":46,"tag":470,"props":23296,"children":23297},{"style":531},[23298],{"type":51,"value":1007},{"type":46,"tag":470,"props":23300,"children":23302},{"class":472,"line":23301},95,[23303,23308,23312,23316,23320,23324,23328],{"type":46,"tag":470,"props":23304,"children":23305},{"style":2780},[23306],{"type":51,"value":23307},"      tokenOutChainId",{"type":46,"tag":470,"props":23309,"children":23310},{"style":531},[23311],{"type":51,"value":417},{"type":46,"tag":470,"props":23313,"children":23314},{"style":631},[23315],{"type":51,"value":23282},{"type":46,"tag":470,"props":23317,"children":23318},{"style":2780},[23319],{"type":51,"value":835},{"type":46,"tag":470,"props":23321,"children":23322},{"style":537},[23323],{"type":51,"value":1094},{"type":46,"tag":470,"props":23325,"children":23326},{"style":2780},[23327],{"type":51,"value":842},{"type":46,"tag":470,"props":23329,"children":23330},{"style":531},[23331],{"type":51,"value":1007},{"type":46,"tag":470,"props":23333,"children":23335},{"class":472,"line":23334},96,[23336,23341],{"type":46,"tag":470,"props":23337,"children":23338},{"style":537},[23339],{"type":51,"value":23340},"      amount",{"type":46,"tag":470,"props":23342,"children":23343},{"style":531},[23344],{"type":51,"value":1007},{"type":46,"tag":470,"props":23346,"children":23348},{"class":472,"line":23347},97,[23349,23353,23357,23361,23365,23369],{"type":46,"tag":470,"props":23350,"children":23351},{"style":2780},[23352],{"type":51,"value":12337},{"type":46,"tag":470,"props":23354,"children":23355},{"style":531},[23356],{"type":51,"value":417},{"type":46,"tag":470,"props":23358,"children":23359},{"style":531},[23360],{"type":51,"value":555},{"type":46,"tag":470,"props":23362,"children":23363},{"style":483},[23364],{"type":51,"value":1665},{"type":46,"tag":470,"props":23366,"children":23367},{"style":531},[23368],{"type":51,"value":565},{"type":46,"tag":470,"props":23370,"children":23371},{"style":531},[23372],{"type":51,"value":1007},{"type":46,"tag":470,"props":23374,"children":23376},{"class":472,"line":23375},98,[23377,23382,23386,23390],{"type":46,"tag":470,"props":23378,"children":23379},{"style":2780},[23380],{"type":51,"value":23381},"      slippageTolerance",{"type":46,"tag":470,"props":23383,"children":23384},{"style":531},[23385],{"type":51,"value":417},{"type":46,"tag":470,"props":23387,"children":23388},{"style":1105},[23389],{"type":51,"value":1698},{"type":46,"tag":470,"props":23391,"children":23392},{"style":531},[23393],{"type":51,"value":1007},{"type":46,"tag":470,"props":23395,"children":23397},{"class":472,"line":23396},99,[23398,23402,23406],{"type":46,"tag":470,"props":23399,"children":23400},{"style":531},[23401],{"type":51,"value":18061},{"type":46,"tag":470,"props":23403,"children":23404},{"style":2780},[23405],{"type":51,"value":842},{"type":46,"tag":470,"props":23407,"children":23408},{"style":531},[23409],{"type":51,"value":1007},{"type":46,"tag":470,"props":23411,"children":23413},{"class":472,"line":23412},100,[23414,23418,23422],{"type":46,"tag":470,"props":23415,"children":23416},{"style":531},[23417],{"type":51,"value":5596},{"type":46,"tag":470,"props":23419,"children":23420},{"style":2780},[23421],{"type":51,"value":842},{"type":46,"tag":470,"props":23423,"children":23424},{"style":531},[23425],{"type":51,"value":570},{"type":46,"tag":470,"props":23427,"children":23429},{"class":472,"line":23428},101,[23430,23434,23438,23442,23446,23450,23454,23458,23462,23466],{"type":46,"tag":470,"props":23431,"children":23432},{"style":587},[23433],{"type":51,"value":5252},{"type":46,"tag":470,"props":23435,"children":23436},{"style":537},[23437],{"type":51,"value":3524},{"type":46,"tag":470,"props":23439,"children":23440},{"style":531},[23441],{"type":51,"value":619},{"type":46,"tag":470,"props":23443,"children":23444},{"style":525},[23445],{"type":51,"value":3443},{"type":46,"tag":470,"props":23447,"children":23448},{"style":537},[23449],{"type":51,"value":22981},{"type":46,"tag":470,"props":23451,"children":23452},{"style":531},[23453],{"type":51,"value":628},{"type":46,"tag":470,"props":23455,"children":23456},{"style":631},[23457],{"type":51,"value":955},{"type":46,"tag":470,"props":23459,"children":23460},{"style":2780},[23461],{"type":51,"value":7810},{"type":46,"tag":470,"props":23463,"children":23464},{"style":531},[23465],{"type":51,"value":799},{"type":46,"tag":470,"props":23467,"children":23468},{"style":3418},[23469],{"type":51,"value":23470}," \u002F\u002F Store FULL response\n",{"type":46,"tag":470,"props":23472,"children":23474},{"class":472,"line":23473},102,[23475],{"type":46,"tag":470,"props":23476,"children":23477},{"emptyLinePlaceholder":577},[23478],{"type":51,"value":580},{"type":46,"tag":470,"props":23480,"children":23482},{"class":472,"line":23481},103,[23483,23487,23491,23495,23500,23504,23508,23512],{"type":46,"tag":470,"props":23484,"children":23485},{"style":525},[23486],{"type":51,"value":3766},{"type":46,"tag":470,"props":23488,"children":23489},{"style":2780},[23490],{"type":51,"value":3771},{"type":46,"tag":470,"props":23492,"children":23493},{"style":531},[23494],{"type":51,"value":4416},{"type":46,"tag":470,"props":23496,"children":23497},{"style":537},[23498],{"type":51,"value":23499},"quoteRes",{"type":46,"tag":470,"props":23501,"children":23502},{"style":531},[23503],{"type":51,"value":628},{"type":46,"tag":470,"props":23505,"children":23506},{"style":537},[23507],{"type":51,"value":17966},{"type":46,"tag":470,"props":23509,"children":23510},{"style":2780},[23511],{"type":51,"value":3781},{"type":46,"tag":470,"props":23513,"children":23514},{"style":531},[23515],{"type":51,"value":967},{"type":46,"tag":470,"props":23517,"children":23519},{"class":472,"line":23518},104,[23520,23524,23528,23532,23536,23540,23544,23548,23552,23556,23560,23564,23568],{"type":46,"tag":470,"props":23521,"children":23522},{"style":525},[23523],{"type":51,"value":4529},{"type":46,"tag":470,"props":23525,"children":23526},{"style":531},[23527],{"type":51,"value":4534},{"type":46,"tag":470,"props":23529,"children":23530},{"style":631},[23531],{"type":51,"value":4539},{"type":46,"tag":470,"props":23533,"children":23534},{"style":2780},[23535],{"type":51,"value":835},{"type":46,"tag":470,"props":23537,"children":23538},{"style":537},[23539],{"type":51,"value":5094},{"type":46,"tag":470,"props":23541,"children":23542},{"style":531},[23543],{"type":51,"value":628},{"type":46,"tag":470,"props":23545,"children":23546},{"style":537},[23547],{"type":51,"value":17999},{"type":46,"tag":470,"props":23549,"children":23550},{"style":531},[23551],{"type":51,"value":4442},{"type":46,"tag":470,"props":23553,"children":23554},{"style":531},[23555],{"type":51,"value":555},{"type":46,"tag":470,"props":23557,"children":23558},{"style":483},[23559],{"type":51,"value":18012},{"type":46,"tag":470,"props":23561,"children":23562},{"style":531},[23563],{"type":51,"value":565},{"type":46,"tag":470,"props":23565,"children":23566},{"style":2780},[23567],{"type":51,"value":842},{"type":46,"tag":470,"props":23569,"children":23570},{"style":531},[23571],{"type":51,"value":570},{"type":46,"tag":470,"props":23573,"children":23575},{"class":472,"line":23574},105,[23576],{"type":46,"tag":470,"props":23577,"children":23578},{"style":531},[23579],{"type":51,"value":1344},{"type":46,"tag":470,"props":23581,"children":23583},{"class":472,"line":23582},106,[23584],{"type":46,"tag":470,"props":23585,"children":23586},{"emptyLinePlaceholder":577},[23587],{"type":51,"value":580},{"type":46,"tag":470,"props":23589,"children":23591},{"class":472,"line":23590},107,[23592],{"type":46,"tag":470,"props":23593,"children":23594},{"style":3418},[23595],{"type":51,"value":23596},"  \u002F\u002F 3. Execute swap - CRITICAL: spread quote response, strip null fields\n",{"type":46,"tag":470,"props":23598,"children":23600},{"class":472,"line":23599},108,[23601,23605,23609,23613,23617,23621,23625,23629],{"type":46,"tag":470,"props":23602,"children":23603},{"style":587},[23604],{"type":51,"value":5252},{"type":46,"tag":470,"props":23606,"children":23607},{"style":537},[23608],{"type":51,"value":3540},{"type":46,"tag":470,"props":23610,"children":23611},{"style":531},[23612],{"type":51,"value":619},{"type":46,"tag":470,"props":23614,"children":23615},{"style":631},[23616],{"type":51,"value":5187},{"type":46,"tag":470,"props":23618,"children":23619},{"style":2780},[23620],{"type":51,"value":835},{"type":46,"tag":470,"props":23622,"children":23623},{"style":537},[23624],{"type":51,"value":5094},{"type":46,"tag":470,"props":23626,"children":23627},{"style":2780},[23628],{"type":51,"value":842},{"type":46,"tag":470,"props":23630,"children":23631},{"style":531},[23632],{"type":51,"value":570},{"type":46,"tag":470,"props":23634,"children":23636},{"class":472,"line":23635},109,[23637],{"type":46,"tag":470,"props":23638,"children":23639},{"emptyLinePlaceholder":577},[23640],{"type":51,"value":580},{"type":46,"tag":470,"props":23642,"children":23644},{"class":472,"line":23643},110,[23645,23649,23654,23658,23662,23666,23670,23674,23678,23682,23686,23690,23694],{"type":46,"tag":470,"props":23646,"children":23647},{"style":587},[23648],{"type":51,"value":5252},{"type":46,"tag":470,"props":23650,"children":23651},{"style":537},[23652],{"type":51,"value":23653}," swapRes",{"type":46,"tag":470,"props":23655,"children":23656},{"style":531},[23657],{"type":51,"value":619},{"type":46,"tag":470,"props":23659,"children":23660},{"style":525},[23661],{"type":51,"value":3443},{"type":46,"tag":470,"props":23663,"children":23664},{"style":631},[23665],{"type":51,"value":17652},{"type":46,"tag":470,"props":23667,"children":23668},{"style":2780},[23669],{"type":51,"value":835},{"type":46,"tag":470,"props":23671,"children":23672},{"style":531},[23673],{"type":51,"value":17661},{"type":46,"tag":470,"props":23675,"children":23676},{"style":537},[23677],{"type":51,"value":17666},{"type":46,"tag":470,"props":23679,"children":23680},{"style":531},[23681],{"type":51,"value":614},{"type":46,"tag":470,"props":23683,"children":23684},{"style":483},[23685],{"type":51,"value":4066},{"type":46,"tag":470,"props":23687,"children":23688},{"style":531},[23689],{"type":51,"value":828},{"type":46,"tag":470,"props":23691,"children":23692},{"style":531},[23693],{"type":51,"value":604},{"type":46,"tag":470,"props":23695,"children":23696},{"style":531},[23697],{"type":51,"value":1165},{"type":46,"tag":470,"props":23699,"children":23701},{"class":472,"line":23700},111,[23702,23706,23710,23714,23718,23722],{"type":46,"tag":470,"props":23703,"children":23704},{"style":2780},[23705],{"type":51,"value":23033},{"type":46,"tag":470,"props":23707,"children":23708},{"style":531},[23709],{"type":51,"value":417},{"type":46,"tag":470,"props":23711,"children":23712},{"style":531},[23713],{"type":51,"value":555},{"type":46,"tag":470,"props":23715,"children":23716},{"style":483},[23717],{"type":51,"value":936},{"type":46,"tag":470,"props":23719,"children":23720},{"style":531},[23721],{"type":51,"value":565},{"type":46,"tag":470,"props":23723,"children":23724},{"style":531},[23725],{"type":51,"value":1007},{"type":46,"tag":470,"props":23727,"children":23729},{"class":472,"line":23728},112,[23730,23734,23738],{"type":46,"tag":470,"props":23731,"children":23732},{"style":2780},[23733],{"type":51,"value":23061},{"type":46,"tag":470,"props":23735,"children":23736},{"style":531},[23737],{"type":51,"value":417},{"type":46,"tag":470,"props":23739,"children":23740},{"style":531},[23741],{"type":51,"value":1165},{"type":46,"tag":470,"props":23743,"children":23745},{"class":472,"line":23744},113,[23746,23750,23754,23758,23762,23766],{"type":46,"tag":470,"props":23747,"children":23748},{"style":531},[23749],{"type":51,"value":7360},{"type":46,"tag":470,"props":23751,"children":23752},{"style":2780},[23753],{"type":51,"value":383},{"type":46,"tag":470,"props":23755,"children":23756},{"style":531},[23757],{"type":51,"value":565},{"type":46,"tag":470,"props":23759,"children":23760},{"style":531},[23761],{"type":51,"value":417},{"type":46,"tag":470,"props":23763,"children":23764},{"style":537},[23765],{"type":51,"value":17792},{"type":46,"tag":470,"props":23767,"children":23768},{"style":531},[23769],{"type":51,"value":1007},{"type":46,"tag":470,"props":23771,"children":23773},{"class":472,"line":23772},114,[23774,23778,23782,23786,23790,23794,23798,23802],{"type":46,"tag":470,"props":23775,"children":23776},{"style":531},[23777],{"type":51,"value":7360},{"type":46,"tag":470,"props":23779,"children":23780},{"style":2780},[23781],{"type":51,"value":17743},{"type":46,"tag":470,"props":23783,"children":23784},{"style":531},[23785],{"type":51,"value":565},{"type":46,"tag":470,"props":23787,"children":23788},{"style":531},[23789],{"type":51,"value":417},{"type":46,"tag":470,"props":23791,"children":23792},{"style":531},[23793],{"type":51,"value":555},{"type":46,"tag":470,"props":23795,"children":23796},{"style":483},[23797],{"type":51,"value":17760},{"type":46,"tag":470,"props":23799,"children":23800},{"style":531},[23801],{"type":51,"value":565},{"type":46,"tag":470,"props":23803,"children":23804},{"style":531},[23805],{"type":51,"value":1007},{"type":46,"tag":470,"props":23807,"children":23809},{"class":472,"line":23808},115,[23810,23814,23818,23822,23826,23830,23834,23838],{"type":46,"tag":470,"props":23811,"children":23812},{"style":531},[23813],{"type":51,"value":7360},{"type":46,"tag":470,"props":23815,"children":23816},{"style":2780},[23817],{"type":51,"value":17808},{"type":46,"tag":470,"props":23819,"children":23820},{"style":531},[23821],{"type":51,"value":565},{"type":46,"tag":470,"props":23823,"children":23824},{"style":531},[23825],{"type":51,"value":417},{"type":46,"tag":470,"props":23827,"children":23828},{"style":531},[23829],{"type":51,"value":555},{"type":46,"tag":470,"props":23831,"children":23832},{"style":483},[23833],{"type":51,"value":16528},{"type":46,"tag":470,"props":23835,"children":23836},{"style":531},[23837],{"type":51,"value":565},{"type":46,"tag":470,"props":23839,"children":23840},{"style":531},[23841],{"type":51,"value":1007},{"type":46,"tag":470,"props":23843,"children":23845},{"class":472,"line":23844},116,[23846],{"type":46,"tag":470,"props":23847,"children":23848},{"style":531},[23849],{"type":51,"value":3112},{"type":46,"tag":470,"props":23851,"children":23853},{"class":472,"line":23852},117,[23854,23858,23862,23866,23870,23874,23878,23882,23886],{"type":46,"tag":470,"props":23855,"children":23856},{"style":2780},[23857],{"type":51,"value":23185},{"type":46,"tag":470,"props":23859,"children":23860},{"style":531},[23861],{"type":51,"value":417},{"type":46,"tag":470,"props":23863,"children":23864},{"style":537},[23865],{"type":51,"value":17857},{"type":46,"tag":470,"props":23867,"children":23868},{"style":531},[23869],{"type":51,"value":628},{"type":46,"tag":470,"props":23871,"children":23872},{"style":631},[23873],{"type":51,"value":17866},{"type":46,"tag":470,"props":23875,"children":23876},{"style":2780},[23877],{"type":51,"value":835},{"type":46,"tag":470,"props":23879,"children":23880},{"style":537},[23881],{"type":51,"value":3786},{"type":46,"tag":470,"props":23883,"children":23884},{"style":2780},[23885],{"type":51,"value":842},{"type":46,"tag":470,"props":23887,"children":23888},{"style":531},[23889],{"type":51,"value":1007},{"type":46,"tag":470,"props":23891,"children":23893},{"class":472,"line":23892},118,[23894,23898,23902],{"type":46,"tag":470,"props":23895,"children":23896},{"style":531},[23897],{"type":51,"value":5596},{"type":46,"tag":470,"props":23899,"children":23900},{"style":2780},[23901],{"type":51,"value":842},{"type":46,"tag":470,"props":23903,"children":23904},{"style":531},[23905],{"type":51,"value":570},{"type":46,"tag":470,"props":23907,"children":23909},{"class":472,"line":23908},119,[23910,23914,23919,23923,23927,23931,23935,23939,23943],{"type":46,"tag":470,"props":23911,"children":23912},{"style":587},[23913],{"type":51,"value":5252},{"type":46,"tag":470,"props":23915,"children":23916},{"style":537},[23917],{"type":51,"value":23918}," swapData",{"type":46,"tag":470,"props":23920,"children":23921},{"style":531},[23922],{"type":51,"value":619},{"type":46,"tag":470,"props":23924,"children":23925},{"style":525},[23926],{"type":51,"value":3443},{"type":46,"tag":470,"props":23928,"children":23929},{"style":537},[23930],{"type":51,"value":23653},{"type":46,"tag":470,"props":23932,"children":23933},{"style":531},[23934],{"type":51,"value":628},{"type":46,"tag":470,"props":23936,"children":23937},{"style":631},[23938],{"type":51,"value":955},{"type":46,"tag":470,"props":23940,"children":23941},{"style":2780},[23942],{"type":51,"value":7810},{"type":46,"tag":470,"props":23944,"children":23945},{"style":531},[23946],{"type":51,"value":570},{"type":46,"tag":470,"props":23948,"children":23950},{"class":472,"line":23949},120,[23951],{"type":46,"tag":470,"props":23952,"children":23953},{"emptyLinePlaceholder":577},[23954],{"type":51,"value":580},{"type":46,"tag":470,"props":23956,"children":23958},{"class":472,"line":23957},121,[23959,23963,23967,23971,23976,23980,23984,23988],{"type":46,"tag":470,"props":23960,"children":23961},{"style":525},[23962],{"type":51,"value":3766},{"type":46,"tag":470,"props":23964,"children":23965},{"style":2780},[23966],{"type":51,"value":3771},{"type":46,"tag":470,"props":23968,"children":23969},{"style":531},[23970],{"type":51,"value":4416},{"type":46,"tag":470,"props":23972,"children":23973},{"style":537},[23974],{"type":51,"value":23975},"swapRes",{"type":46,"tag":470,"props":23977,"children":23978},{"style":531},[23979],{"type":51,"value":628},{"type":46,"tag":470,"props":23981,"children":23982},{"style":537},[23983],{"type":51,"value":17966},{"type":46,"tag":470,"props":23985,"children":23986},{"style":2780},[23987],{"type":51,"value":3781},{"type":46,"tag":470,"props":23989,"children":23990},{"style":531},[23991],{"type":51,"value":967},{"type":46,"tag":470,"props":23993,"children":23995},{"class":472,"line":23994},122,[23996,24000,24004,24008,24012,24017,24021,24025,24029,24033,24038,24042,24046],{"type":46,"tag":470,"props":23997,"children":23998},{"style":525},[23999],{"type":51,"value":4529},{"type":46,"tag":470,"props":24001,"children":24002},{"style":531},[24003],{"type":51,"value":4534},{"type":46,"tag":470,"props":24005,"children":24006},{"style":631},[24007],{"type":51,"value":4539},{"type":46,"tag":470,"props":24009,"children":24010},{"style":2780},[24011],{"type":51,"value":835},{"type":46,"tag":470,"props":24013,"children":24014},{"style":537},[24015],{"type":51,"value":24016},"swapData",{"type":46,"tag":470,"props":24018,"children":24019},{"style":531},[24020],{"type":51,"value":628},{"type":46,"tag":470,"props":24022,"children":24023},{"style":537},[24024],{"type":51,"value":17999},{"type":46,"tag":470,"props":24026,"children":24027},{"style":531},[24028],{"type":51,"value":4442},{"type":46,"tag":470,"props":24030,"children":24031},{"style":531},[24032],{"type":51,"value":555},{"type":46,"tag":470,"props":24034,"children":24035},{"style":483},[24036],{"type":51,"value":24037},"Swap request failed",{"type":46,"tag":470,"props":24039,"children":24040},{"style":531},[24041],{"type":51,"value":565},{"type":46,"tag":470,"props":24043,"children":24044},{"style":2780},[24045],{"type":51,"value":842},{"type":46,"tag":470,"props":24047,"children":24048},{"style":531},[24049],{"type":51,"value":570},{"type":46,"tag":470,"props":24051,"children":24053},{"class":472,"line":24052},123,[24054],{"type":46,"tag":470,"props":24055,"children":24056},{"style":531},[24057],{"type":51,"value":1344},{"type":46,"tag":470,"props":24059,"children":24061},{"class":472,"line":24060},124,[24062],{"type":46,"tag":470,"props":24063,"children":24064},{"emptyLinePlaceholder":577},[24065],{"type":51,"value":580},{"type":46,"tag":470,"props":24067,"children":24069},{"class":472,"line":24068},125,[24070],{"type":46,"tag":470,"props":24071,"children":24072},{"style":3418},[24073],{"type":51,"value":24074},"  \u002F\u002F 4. Validate before broadcasting\n",{"type":46,"tag":470,"props":24076,"children":24078},{"class":472,"line":24077},126,[24079,24084,24088,24092,24096,24100,24104],{"type":46,"tag":470,"props":24080,"children":24081},{"style":631},[24082],{"type":51,"value":24083},"  validateSwap",{"type":46,"tag":470,"props":24085,"children":24086},{"style":2780},[24087],{"type":51,"value":835},{"type":46,"tag":470,"props":24089,"children":24090},{"style":537},[24091],{"type":51,"value":24016},{"type":46,"tag":470,"props":24093,"children":24094},{"style":531},[24095],{"type":51,"value":628},{"type":46,"tag":470,"props":24097,"children":24098},{"style":537},[24099],{"type":51,"value":4110},{"type":46,"tag":470,"props":24101,"children":24102},{"style":2780},[24103],{"type":51,"value":842},{"type":46,"tag":470,"props":24105,"children":24106},{"style":531},[24107],{"type":51,"value":570},{"type":46,"tag":470,"props":24109,"children":24111},{"class":472,"line":24110},127,[24112],{"type":46,"tag":470,"props":24113,"children":24114},{"emptyLinePlaceholder":577},[24115],{"type":51,"value":580},{"type":46,"tag":470,"props":24117,"children":24119},{"class":472,"line":24118},128,[24120,24124,24128,24132,24136,24140,24144,24148,24152],{"type":46,"tag":470,"props":24121,"children":24122},{"style":587},[24123],{"type":51,"value":5252},{"type":46,"tag":470,"props":24125,"children":24126},{"style":537},[24127],{"type":51,"value":11036},{"type":46,"tag":470,"props":24129,"children":24130},{"style":531},[24131],{"type":51,"value":619},{"type":46,"tag":470,"props":24133,"children":24134},{"style":525},[24135],{"type":51,"value":3443},{"type":46,"tag":470,"props":24137,"children":24138},{"style":537},[24139],{"type":51,"value":11049},{"type":46,"tag":470,"props":24141,"children":24142},{"style":531},[24143],{"type":51,"value":628},{"type":46,"tag":470,"props":24145,"children":24146},{"style":631},[24147],{"type":51,"value":898},{"type":46,"tag":470,"props":24149,"children":24150},{"style":2780},[24151],{"type":51,"value":835},{"type":46,"tag":470,"props":24153,"children":24154},{"style":531},[24155],{"type":51,"value":967},{"type":46,"tag":470,"props":24157,"children":24159},{"class":472,"line":24158},129,[24160,24164,24168,24172,24176,24180,24184,24188],{"type":46,"tag":470,"props":24161,"children":24162},{"style":2780},[24163],{"type":51,"value":20110},{"type":46,"tag":470,"props":24165,"children":24166},{"style":531},[24167],{"type":51,"value":417},{"type":46,"tag":470,"props":24169,"children":24170},{"style":537},[24171],{"type":51,"value":23918},{"type":46,"tag":470,"props":24173,"children":24174},{"style":531},[24175],{"type":51,"value":628},{"type":46,"tag":470,"props":24177,"children":24178},{"style":537},[24179],{"type":51,"value":4110},{"type":46,"tag":470,"props":24181,"children":24182},{"style":531},[24183],{"type":51,"value":628},{"type":46,"tag":470,"props":24185,"children":24186},{"style":537},[24187],{"type":51,"value":1178},{"type":46,"tag":470,"props":24189,"children":24190},{"style":531},[24191],{"type":51,"value":1007},{"type":46,"tag":470,"props":24193,"children":24195},{"class":472,"line":24194},130,[24196,24200,24204,24208,24212,24216,24220,24224],{"type":46,"tag":470,"props":24197,"children":24198},{"style":2780},[24199],{"type":51,"value":20166},{"type":46,"tag":470,"props":24201,"children":24202},{"style":531},[24203],{"type":51,"value":417},{"type":46,"tag":470,"props":24205,"children":24206},{"style":537},[24207],{"type":51,"value":23918},{"type":46,"tag":470,"props":24209,"children":24210},{"style":531},[24211],{"type":51,"value":628},{"type":46,"tag":470,"props":24213,"children":24214},{"style":537},[24215],{"type":51,"value":4110},{"type":46,"tag":470,"props":24217,"children":24218},{"style":531},[24219],{"type":51,"value":628},{"type":46,"tag":470,"props":24221,"children":24222},{"style":537},[24223],{"type":51,"value":1250},{"type":46,"tag":470,"props":24225,"children":24226},{"style":531},[24227],{"type":51,"value":1007},{"type":46,"tag":470,"props":24229,"children":24231},{"class":472,"line":24230},131,[24232,24236,24240,24244,24248,24252,24256,24260,24264,24268,24272,24276,24280,24284,24288],{"type":46,"tag":470,"props":24233,"children":24234},{"style":2780},[24235],{"type":51,"value":16753},{"type":46,"tag":470,"props":24237,"children":24238},{"style":531},[24239],{"type":51,"value":417},{"type":46,"tag":470,"props":24241,"children":24242},{"style":631},[24243],{"type":51,"value":13848},{"type":46,"tag":470,"props":24245,"children":24246},{"style":2780},[24247],{"type":51,"value":835},{"type":46,"tag":470,"props":24249,"children":24250},{"style":537},[24251],{"type":51,"value":24016},{"type":46,"tag":470,"props":24253,"children":24254},{"style":531},[24255],{"type":51,"value":628},{"type":46,"tag":470,"props":24257,"children":24258},{"style":537},[24259],{"type":51,"value":4110},{"type":46,"tag":470,"props":24261,"children":24262},{"style":531},[24263],{"type":51,"value":628},{"type":46,"tag":470,"props":24265,"children":24266},{"style":537},[24267],{"type":51,"value":1286},{"type":46,"tag":470,"props":24269,"children":24270},{"style":531},[24271],{"type":51,"value":4442},{"type":46,"tag":470,"props":24273,"children":24274},{"style":531},[24275],{"type":51,"value":555},{"type":46,"tag":470,"props":24277,"children":24278},{"style":483},[24279],{"type":51,"value":1303},{"type":46,"tag":470,"props":24281,"children":24282},{"style":531},[24283],{"type":51,"value":565},{"type":46,"tag":470,"props":24285,"children":24286},{"style":2780},[24287],{"type":51,"value":842},{"type":46,"tag":470,"props":24289,"children":24290},{"style":531},[24291],{"type":51,"value":1007},{"type":46,"tag":470,"props":24293,"children":24295},{"class":472,"line":24294},132,[24296,24300,24304],{"type":46,"tag":470,"props":24297,"children":24298},{"style":531},[24299],{"type":51,"value":5596},{"type":46,"tag":470,"props":24301,"children":24302},{"style":2780},[24303],{"type":51,"value":842},{"type":46,"tag":470,"props":24305,"children":24306},{"style":531},[24307],{"type":51,"value":570},{"type":46,"tag":470,"props":24309,"children":24311},{"class":472,"line":24310},133,[24312,24316,24320,24324,24328,24332,24336,24340,24344,24348],{"type":46,"tag":470,"props":24313,"children":24314},{"style":525},[24315],{"type":51,"value":5772},{"type":46,"tag":470,"props":24317,"children":24318},{"style":537},[24319],{"type":51,"value":10833},{"type":46,"tag":470,"props":24321,"children":24322},{"style":531},[24323],{"type":51,"value":628},{"type":46,"tag":470,"props":24325,"children":24326},{"style":631},[24327],{"type":51,"value":11208},{"type":46,"tag":470,"props":24329,"children":24330},{"style":2780},[24331],{"type":51,"value":835},{"type":46,"tag":470,"props":24333,"children":24334},{"style":531},[24335],{"type":51,"value":11217},{"type":46,"tag":470,"props":24337,"children":24338},{"style":537},[24339],{"type":51,"value":11036},{"type":46,"tag":470,"props":24341,"children":24342},{"style":531},[24343],{"type":51,"value":545},{"type":46,"tag":470,"props":24345,"children":24346},{"style":2780},[24347],{"type":51,"value":842},{"type":46,"tag":470,"props":24349,"children":24350},{"style":531},[24351],{"type":51,"value":570},{"type":46,"tag":470,"props":24353,"children":24355},{"class":472,"line":24354},134,[24356],{"type":46,"tag":470,"props":24357,"children":24358},{"style":531},[24359],{"type":51,"value":1117},{"type":46,"tag":172,"props":24361,"children":24363},{"id":24362},"smart-contract-integration-solidity",[24364],{"type":51,"value":24365},"Smart Contract Integration (Solidity)",{"type":46,"tag":397,"props":24367,"children":24369},{"className":9412,"code":24368,"language":9414,"meta":402,"style":402},"\u002F\u002F SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IUniversalRouter {\n    function execute(\n        bytes calldata commands,\n        bytes[] calldata inputs,\n        uint256 deadline\n    ) external payable;\n}\n\ninterface IERC20 {\n    function approve(address spender, uint256 amount) external returns (bool);\n}\n\ncontract SwapIntegration {\n    IUniversalRouter public immutable router;\n    address public constant PERMIT2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\n\n    constructor(address _router) {\n        router = IUniversalRouter(_router);\n    }\n\n    function swap(\n        bytes calldata commands,\n        bytes[] calldata inputs,\n        uint256 deadline\n    ) external payable {\n        router.execute{value: msg.value}(commands, inputs, deadline);\n    }\n\n    \u002F\u002F Approve token for Permit2 (one-time setup)\n    function approveToken(address token) external {\n        IERC20(token).approve(PERMIT2, type(uint256).max);\n    }\n}\n",[24370],{"type":46,"tag":80,"props":24371,"children":24372},{"__ignoreMap":402},[24373,24381,24389,24396,24404,24412,24420,24428,24436,24444,24451,24458,24466,24474,24481,24488,24496,24504,24512,24519,24527,24535,24542,24549,24557,24564,24571,24578,24586,24594,24601,24608,24616,24624,24632,24639],{"type":46,"tag":470,"props":24374,"children":24375},{"class":472,"line":473},[24376],{"type":46,"tag":470,"props":24377,"children":24378},{},[24379],{"type":51,"value":24380},"\u002F\u002F SPDX-License-Identifier: MIT\n",{"type":46,"tag":470,"props":24382,"children":24383},{"class":472,"line":573},[24384],{"type":46,"tag":470,"props":24385,"children":24386},{},[24387],{"type":51,"value":24388},"pragma solidity ^0.8.0;\n",{"type":46,"tag":470,"props":24390,"children":24391},{"class":472,"line":583},[24392],{"type":46,"tag":470,"props":24393,"children":24394},{"emptyLinePlaceholder":577},[24395],{"type":51,"value":580},{"type":46,"tag":470,"props":24397,"children":24398},{"class":472,"line":1046},[24399],{"type":46,"tag":470,"props":24400,"children":24401},{},[24402],{"type":51,"value":24403},"interface IUniversalRouter {\n",{"type":46,"tag":470,"props":24405,"children":24406},{"class":472,"line":1084},[24407],{"type":46,"tag":470,"props":24408,"children":24409},{},[24410],{"type":51,"value":24411},"    function execute(\n",{"type":46,"tag":470,"props":24413,"children":24414},{"class":472,"line":1111},[24415],{"type":46,"tag":470,"props":24416,"children":24417},{},[24418],{"type":51,"value":24419},"        bytes calldata commands,\n",{"type":46,"tag":470,"props":24421,"children":24422},{"class":472,"line":1314},[24423],{"type":46,"tag":470,"props":24424,"children":24425},{},[24426],{"type":51,"value":24427},"        bytes[] calldata inputs,\n",{"type":46,"tag":470,"props":24429,"children":24430},{"class":472,"line":1338},[24431],{"type":46,"tag":470,"props":24432,"children":24433},{},[24434],{"type":51,"value":24435},"        uint256 deadline\n",{"type":46,"tag":470,"props":24437,"children":24438},{"class":472,"line":1347},[24439],{"type":46,"tag":470,"props":24440,"children":24441},{},[24442],{"type":51,"value":24443},"    ) external payable;\n",{"type":46,"tag":470,"props":24445,"children":24446},{"class":472,"line":1705},[24447],{"type":46,"tag":470,"props":24448,"children":24449},{},[24450],{"type":51,"value":1117},{"type":46,"tag":470,"props":24452,"children":24453},{"class":472,"line":1740},[24454],{"type":46,"tag":470,"props":24455,"children":24456},{"emptyLinePlaceholder":577},[24457],{"type":51,"value":580},{"type":46,"tag":470,"props":24459,"children":24460},{"class":472,"line":2421},[24461],{"type":46,"tag":470,"props":24462,"children":24463},{},[24464],{"type":51,"value":24465},"interface IERC20 {\n",{"type":46,"tag":470,"props":24467,"children":24468},{"class":472,"line":2447},[24469],{"type":46,"tag":470,"props":24470,"children":24471},{},[24472],{"type":51,"value":24473},"    function approve(address spender, uint256 amount) external returns (bool);\n",{"type":46,"tag":470,"props":24475,"children":24476},{"class":472,"line":2877},[24477],{"type":46,"tag":470,"props":24478,"children":24479},{},[24480],{"type":51,"value":1117},{"type":46,"tag":470,"props":24482,"children":24483},{"class":472,"line":2886},[24484],{"type":46,"tag":470,"props":24485,"children":24486},{"emptyLinePlaceholder":577},[24487],{"type":51,"value":580},{"type":46,"tag":470,"props":24489,"children":24490},{"class":472,"line":2912},[24491],{"type":46,"tag":470,"props":24492,"children":24493},{},[24494],{"type":51,"value":24495},"contract SwapIntegration {\n",{"type":46,"tag":470,"props":24497,"children":24498},{"class":472,"line":2921},[24499],{"type":46,"tag":470,"props":24500,"children":24501},{},[24502],{"type":51,"value":24503},"    IUniversalRouter public immutable router;\n",{"type":46,"tag":470,"props":24505,"children":24506},{"class":472,"line":2958},[24507],{"type":46,"tag":470,"props":24508,"children":24509},{},[24510],{"type":51,"value":24511},"    address public constant PERMIT2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;\n",{"type":46,"tag":470,"props":24513,"children":24514},{"class":472,"line":2994},[24515],{"type":46,"tag":470,"props":24516,"children":24517},{"emptyLinePlaceholder":577},[24518],{"type":51,"value":580},{"type":46,"tag":470,"props":24520,"children":24521},{"class":472,"line":3031},[24522],{"type":46,"tag":470,"props":24523,"children":24524},{},[24525],{"type":51,"value":24526},"    constructor(address _router) {\n",{"type":46,"tag":470,"props":24528,"children":24529},{"class":472,"line":3064},[24530],{"type":46,"tag":470,"props":24531,"children":24532},{},[24533],{"type":51,"value":24534},"        router = IUniversalRouter(_router);\n",{"type":46,"tag":470,"props":24536,"children":24537},{"class":472,"line":3073},[24538],{"type":46,"tag":470,"props":24539,"children":24540},{},[24541],{"type":51,"value":5750},{"type":46,"tag":470,"props":24543,"children":24544},{"class":472,"line":3082},[24545],{"type":46,"tag":470,"props":24546,"children":24547},{"emptyLinePlaceholder":577},[24548],{"type":51,"value":580},{"type":46,"tag":470,"props":24550,"children":24551},{"class":472,"line":3106},[24552],{"type":46,"tag":470,"props":24553,"children":24554},{},[24555],{"type":51,"value":24556},"    function swap(\n",{"type":46,"tag":470,"props":24558,"children":24559},{"class":472,"line":3115},[24560],{"type":46,"tag":470,"props":24561,"children":24562},{},[24563],{"type":51,"value":24419},{"type":46,"tag":470,"props":24565,"children":24566},{"class":472,"line":3152},[24567],{"type":46,"tag":470,"props":24568,"children":24569},{},[24570],{"type":51,"value":24427},{"type":46,"tag":470,"props":24572,"children":24573},{"class":472,"line":3185},[24574],{"type":46,"tag":470,"props":24575,"children":24576},{},[24577],{"type":51,"value":24435},{"type":46,"tag":470,"props":24579,"children":24580},{"class":472,"line":3193},[24581],{"type":46,"tag":470,"props":24582,"children":24583},{},[24584],{"type":51,"value":24585},"    ) external payable {\n",{"type":46,"tag":470,"props":24587,"children":24588},{"class":472,"line":3287},[24589],{"type":46,"tag":470,"props":24590,"children":24591},{},[24592],{"type":51,"value":24593},"        router.execute{value: msg.value}(commands, inputs, deadline);\n",{"type":46,"tag":470,"props":24595,"children":24596},{"class":472,"line":8743},[24597],{"type":46,"tag":470,"props":24598,"children":24599},{},[24600],{"type":51,"value":5750},{"type":46,"tag":470,"props":24602,"children":24603},{"class":472,"line":8752},[24604],{"type":46,"tag":470,"props":24605,"children":24606},{"emptyLinePlaceholder":577},[24607],{"type":51,"value":580},{"type":46,"tag":470,"props":24609,"children":24610},{"class":472,"line":8773},[24611],{"type":46,"tag":470,"props":24612,"children":24613},{},[24614],{"type":51,"value":24615},"    \u002F\u002F Approve token for Permit2 (one-time setup)\n",{"type":46,"tag":470,"props":24617,"children":24618},{"class":472,"line":8794},[24619],{"type":46,"tag":470,"props":24620,"children":24621},{},[24622],{"type":51,"value":24623},"    function approveToken(address token) external {\n",{"type":46,"tag":470,"props":24625,"children":24626},{"class":472,"line":8802},[24627],{"type":46,"tag":470,"props":24628,"children":24629},{},[24630],{"type":51,"value":24631},"        IERC20(token).approve(PERMIT2, type(uint256).max);\n",{"type":46,"tag":470,"props":24633,"children":24634},{"class":472,"line":29},[24635],{"type":46,"tag":470,"props":24636,"children":24637},{},[24638],{"type":51,"value":5750},{"type":46,"tag":470,"props":24640,"children":24641},{"class":472,"line":8858},[24642],{"type":46,"tag":470,"props":24643,"children":24644},{},[24645],{"type":51,"value":1117},{"type":46,"tag":704,"props":24647,"children":24648},{},[],{"type":46,"tag":60,"props":24650,"children":24652},{"id":24651},"advanced-patterns",[24653],{"type":51,"value":24654},"Advanced Patterns",{"type":46,"tag":172,"props":24656,"children":24658},{"id":24657},"smart-account-integration-erc-4337",[24659],{"type":51,"value":24660},"Smart Account Integration (ERC-4337)",{"type":46,"tag":54,"props":24662,"children":24663},{},[24664],{"type":51,"value":24665},"Execute Trading API swaps through ERC-4337 smart accounts with delegation. The pattern:",{"type":46,"tag":10532,"props":24667,"children":24668},{},[24669,24674,24679],{"type":46,"tag":723,"props":24670,"children":24671},{},[24672],{"type":51,"value":24673},"Get swap calldata from Trading API (standard 3-step flow)",{"type":46,"tag":723,"props":24675,"children":24676},{},[24677],{"type":51,"value":24678},"Wrap the calldata in a delegation redemption execution",{"type":46,"tag":723,"props":24680,"children":24681},{},[24682,24684,24693,24695,24701],{"type":51,"value":24683},"Submit via ",{"type":46,"tag":72,"props":24685,"children":24686},{},[24687],{"type":46,"tag":80,"props":24688,"children":24690},{"className":24689},[],[24691],{"type":51,"value":24692},"bundlerClient.sendUserOperation()",{"type":51,"value":24694}," — always use the viem bundler client's\n",{"type":46,"tag":80,"props":24696,"children":24698},{"className":24697},[],[24699],{"type":51,"value":24700},"sendUserOperation",{"type":51,"value":24702}," method (not a custom wrapper function)",{"type":46,"tag":880,"props":24704,"children":24705},{},[24706],{"type":46,"tag":54,"props":24707,"children":24708},{},[24709,24713,24715,24720,24722,24728],{"type":46,"tag":72,"props":24710,"children":24711},{},[24712],{"type":51,"value":890},{"type":51,"value":24714}," The final submission step MUST use ",{"type":46,"tag":80,"props":24716,"children":24718},{"className":24717},[],[24719],{"type":51,"value":24692},{"type":51,"value":24721}," from the\nviem permissionless\u002Fbundler client. Do NOT write a custom ",{"type":46,"tag":80,"props":24723,"children":24725},{"className":24724},[],[24726],{"type":51,"value":24727},"submitUserOperation",{"type":51,"value":24729}," wrapper that\nbypasses this — the bundler client handles UserOperation construction, gas estimation, and\nsubmission automatically.",{"type":46,"tag":397,"props":24731,"children":24733},{"className":513,"code":24732,"language":515,"meta":402,"style":402},"\u002F\u002F After getting swap calldata from Trading API:\nconst { to, data, value } = swapResponse.swap;\n\n\u002F\u002F Wrap in delegation execution\nconst execution = {\n  target: to, \u002F\u002F Universal Router\n  callData: data,\n  value: BigInt(value),\n};\n\n\u002F\u002F Submit via bundler — use sendUserOperation directly\nconst userOpHash = await bundlerClient.sendUserOperation({\n  account: delegateSmartAccount,\n  calls: [\n    {\n      to: delegationManagerAddress,\n      data: encodeFunctionData({\n        abi: delegationManagerAbi,\n        functionName: 'redeemDelegations',\n        args: [[[signedDelegation]], [0], [[execution]]],\n      }),\n      value: execution.value,\n    },\n  ],\n});\n",[24734],{"type":46,"tag":80,"props":24735,"children":24736},{"__ignoreMap":402},[24737,24745,24800,24807,24815,24835,24860,24880,24903,24910,24917,24925,24966,24987,25003,25010,25031,25056,25077,25106,25152,25167,25196,25203,25214],{"type":46,"tag":470,"props":24738,"children":24739},{"class":472,"line":473},[24740],{"type":46,"tag":470,"props":24741,"children":24742},{"style":3418},[24743],{"type":51,"value":24744},"\u002F\u002F After getting swap calldata from Trading API:\n",{"type":46,"tag":470,"props":24746,"children":24747},{"class":472,"line":573},[24748,24752,24756,24760,24764,24768,24772,24776,24780,24784,24788,24792,24796],{"type":46,"tag":470,"props":24749,"children":24750},{"style":587},[24751],{"type":51,"value":590},{"type":46,"tag":470,"props":24753,"children":24754},{"style":531},[24755],{"type":51,"value":534},{"type":46,"tag":470,"props":24757,"children":24758},{"style":537},[24759],{"type":51,"value":19870},{"type":46,"tag":470,"props":24761,"children":24762},{"style":531},[24763],{"type":51,"value":604},{"type":46,"tag":470,"props":24765,"children":24766},{"style":537},[24767],{"type":51,"value":17330},{"type":46,"tag":470,"props":24769,"children":24770},{"style":531},[24771],{"type":51,"value":604},{"type":46,"tag":470,"props":24773,"children":24774},{"style":537},[24775],{"type":51,"value":609},{"type":46,"tag":470,"props":24777,"children":24778},{"style":531},[24779],{"type":51,"value":614},{"type":46,"tag":470,"props":24781,"children":24782},{"style":531},[24783],{"type":51,"value":619},{"type":46,"tag":470,"props":24785,"children":24786},{"style":537},[24787],{"type":51,"value":18806},{"type":46,"tag":470,"props":24789,"children":24790},{"style":531},[24791],{"type":51,"value":628},{"type":46,"tag":470,"props":24793,"children":24794},{"style":537},[24795],{"type":51,"value":4110},{"type":46,"tag":470,"props":24797,"children":24798},{"style":531},[24799],{"type":51,"value":570},{"type":46,"tag":470,"props":24801,"children":24802},{"class":472,"line":583},[24803],{"type":46,"tag":470,"props":24804,"children":24805},{"emptyLinePlaceholder":577},[24806],{"type":51,"value":580},{"type":46,"tag":470,"props":24808,"children":24809},{"class":472,"line":1046},[24810],{"type":46,"tag":470,"props":24811,"children":24812},{"style":3418},[24813],{"type":51,"value":24814},"\u002F\u002F Wrap in delegation execution\n",{"type":46,"tag":470,"props":24816,"children":24817},{"class":472,"line":1084},[24818,24822,24827,24831],{"type":46,"tag":470,"props":24819,"children":24820},{"style":587},[24821],{"type":51,"value":590},{"type":46,"tag":470,"props":24823,"children":24824},{"style":537},[24825],{"type":51,"value":24826}," execution ",{"type":46,"tag":470,"props":24828,"children":24829},{"style":531},[24830],{"type":51,"value":3438},{"type":46,"tag":470,"props":24832,"children":24833},{"style":531},[24834],{"type":51,"value":1165},{"type":46,"tag":470,"props":24836,"children":24837},{"class":472,"line":1111},[24838,24843,24847,24851,24855],{"type":46,"tag":470,"props":24839,"children":24840},{"style":2780},[24841],{"type":51,"value":24842},"  target",{"type":46,"tag":470,"props":24844,"children":24845},{"style":531},[24846],{"type":51,"value":417},{"type":46,"tag":470,"props":24848,"children":24849},{"style":537},[24850],{"type":51,"value":19870},{"type":46,"tag":470,"props":24852,"children":24853},{"style":531},[24854],{"type":51,"value":604},{"type":46,"tag":470,"props":24856,"children":24857},{"style":3418},[24858],{"type":51,"value":24859}," \u002F\u002F Universal Router\n",{"type":46,"tag":470,"props":24861,"children":24862},{"class":472,"line":1314},[24863,24868,24872,24876],{"type":46,"tag":470,"props":24864,"children":24865},{"style":2780},[24866],{"type":51,"value":24867},"  callData",{"type":46,"tag":470,"props":24869,"children":24870},{"style":531},[24871],{"type":51,"value":417},{"type":46,"tag":470,"props":24873,"children":24874},{"style":537},[24875],{"type":51,"value":17330},{"type":46,"tag":470,"props":24877,"children":24878},{"style":531},[24879],{"type":51,"value":1007},{"type":46,"tag":470,"props":24881,"children":24882},{"class":472,"line":1338},[24883,24887,24891,24895,24899],{"type":46,"tag":470,"props":24884,"children":24885},{"style":2780},[24886],{"type":51,"value":13839},{"type":46,"tag":470,"props":24888,"children":24889},{"style":531},[24890],{"type":51,"value":417},{"type":46,"tag":470,"props":24892,"children":24893},{"style":631},[24894],{"type":51,"value":13848},{"type":46,"tag":470,"props":24896,"children":24897},{"style":537},[24898],{"type":51,"value":13853},{"type":46,"tag":470,"props":24900,"children":24901},{"style":531},[24902],{"type":51,"value":1007},{"type":46,"tag":470,"props":24904,"children":24905},{"class":472,"line":1347},[24906],{"type":46,"tag":470,"props":24907,"children":24908},{"style":531},[24909],{"type":51,"value":3592},{"type":46,"tag":470,"props":24911,"children":24912},{"class":472,"line":1705},[24913],{"type":46,"tag":470,"props":24914,"children":24915},{"emptyLinePlaceholder":577},[24916],{"type":51,"value":580},{"type":46,"tag":470,"props":24918,"children":24919},{"class":472,"line":1740},[24920],{"type":46,"tag":470,"props":24921,"children":24922},{"style":3418},[24923],{"type":51,"value":24924},"\u002F\u002F Submit via bundler — use sendUserOperation directly\n",{"type":46,"tag":470,"props":24926,"children":24927},{"class":472,"line":2421},[24928,24932,24937,24941,24945,24950,24954,24958,24962],{"type":46,"tag":470,"props":24929,"children":24930},{"style":587},[24931],{"type":51,"value":590},{"type":46,"tag":470,"props":24933,"children":24934},{"style":537},[24935],{"type":51,"value":24936}," userOpHash ",{"type":46,"tag":470,"props":24938,"children":24939},{"style":531},[24940],{"type":51,"value":3438},{"type":46,"tag":470,"props":24942,"children":24943},{"style":525},[24944],{"type":51,"value":3443},{"type":46,"tag":470,"props":24946,"children":24947},{"style":537},[24948],{"type":51,"value":24949}," bundlerClient",{"type":46,"tag":470,"props":24951,"children":24952},{"style":531},[24953],{"type":51,"value":628},{"type":46,"tag":470,"props":24955,"children":24956},{"style":631},[24957],{"type":51,"value":24700},{"type":46,"tag":470,"props":24959,"children":24960},{"style":537},[24961],{"type":51,"value":835},{"type":46,"tag":470,"props":24963,"children":24964},{"style":531},[24965],{"type":51,"value":967},{"type":46,"tag":470,"props":24967,"children":24968},{"class":472,"line":2447},[24969,24974,24978,24983],{"type":46,"tag":470,"props":24970,"children":24971},{"style":2780},[24972],{"type":51,"value":24973},"  account",{"type":46,"tag":470,"props":24975,"children":24976},{"style":531},[24977],{"type":51,"value":417},{"type":46,"tag":470,"props":24979,"children":24980},{"style":537},[24981],{"type":51,"value":24982}," delegateSmartAccount",{"type":46,"tag":470,"props":24984,"children":24985},{"style":531},[24986],{"type":51,"value":1007},{"type":46,"tag":470,"props":24988,"children":24989},{"class":472,"line":2877},[24990,24995,24999],{"type":46,"tag":470,"props":24991,"children":24992},{"style":2780},[24993],{"type":51,"value":24994},"  calls",{"type":46,"tag":470,"props":24996,"children":24997},{"style":531},[24998],{"type":51,"value":417},{"type":46,"tag":470,"props":25000,"children":25001},{"style":537},[25002],{"type":51,"value":2909},{"type":46,"tag":470,"props":25004,"children":25005},{"class":472,"line":2886},[25006],{"type":46,"tag":470,"props":25007,"children":25008},{"style":531},[25009],{"type":51,"value":7634},{"type":46,"tag":470,"props":25011,"children":25012},{"class":472,"line":2912},[25013,25018,25022,25027],{"type":46,"tag":470,"props":25014,"children":25015},{"style":2780},[25016],{"type":51,"value":25017},"      to",{"type":46,"tag":470,"props":25019,"children":25020},{"style":531},[25021],{"type":51,"value":417},{"type":46,"tag":470,"props":25023,"children":25024},{"style":537},[25025],{"type":51,"value":25026}," delegationManagerAddress",{"type":46,"tag":470,"props":25028,"children":25029},{"style":531},[25030],{"type":51,"value":1007},{"type":46,"tag":470,"props":25032,"children":25033},{"class":472,"line":2921},[25034,25039,25043,25048,25052],{"type":46,"tag":470,"props":25035,"children":25036},{"style":2780},[25037],{"type":51,"value":25038},"      data",{"type":46,"tag":470,"props":25040,"children":25041},{"style":531},[25042],{"type":51,"value":417},{"type":46,"tag":470,"props":25044,"children":25045},{"style":631},[25046],{"type":51,"value":25047}," encodeFunctionData",{"type":46,"tag":470,"props":25049,"children":25050},{"style":537},[25051],{"type":51,"value":835},{"type":46,"tag":470,"props":25053,"children":25054},{"style":531},[25055],{"type":51,"value":967},{"type":46,"tag":470,"props":25057,"children":25058},{"class":472,"line":2958},[25059,25064,25068,25073],{"type":46,"tag":470,"props":25060,"children":25061},{"style":2780},[25062],{"type":51,"value":25063},"        abi",{"type":46,"tag":470,"props":25065,"children":25066},{"style":531},[25067],{"type":51,"value":417},{"type":46,"tag":470,"props":25069,"children":25070},{"style":537},[25071],{"type":51,"value":25072}," delegationManagerAbi",{"type":46,"tag":470,"props":25074,"children":25075},{"style":531},[25076],{"type":51,"value":1007},{"type":46,"tag":470,"props":25078,"children":25079},{"class":472,"line":2994},[25080,25085,25089,25093,25098,25102],{"type":46,"tag":470,"props":25081,"children":25082},{"style":2780},[25083],{"type":51,"value":25084},"        functionName",{"type":46,"tag":470,"props":25086,"children":25087},{"style":531},[25088],{"type":51,"value":417},{"type":46,"tag":470,"props":25090,"children":25091},{"style":531},[25092],{"type":51,"value":555},{"type":46,"tag":470,"props":25094,"children":25095},{"style":483},[25096],{"type":51,"value":25097},"redeemDelegations",{"type":46,"tag":470,"props":25099,"children":25100},{"style":531},[25101],{"type":51,"value":565},{"type":46,"tag":470,"props":25103,"children":25104},{"style":531},[25105],{"type":51,"value":1007},{"type":46,"tag":470,"props":25107,"children":25108},{"class":472,"line":3031},[25109,25114,25118,25123,25127,25131,25135,25139,25143,25148],{"type":46,"tag":470,"props":25110,"children":25111},{"style":2780},[25112],{"type":51,"value":25113},"        args",{"type":46,"tag":470,"props":25115,"children":25116},{"style":531},[25117],{"type":51,"value":417},{"type":46,"tag":470,"props":25119,"children":25120},{"style":537},[25121],{"type":51,"value":25122}," [[[signedDelegation]]",{"type":46,"tag":470,"props":25124,"children":25125},{"style":531},[25126],{"type":51,"value":604},{"type":46,"tag":470,"props":25128,"children":25129},{"style":537},[25130],{"type":51,"value":7102},{"type":46,"tag":470,"props":25132,"children":25133},{"style":1105},[25134],{"type":51,"value":1303},{"type":46,"tag":470,"props":25136,"children":25137},{"style":537},[25138],{"type":51,"value":7119},{"type":46,"tag":470,"props":25140,"children":25141},{"style":531},[25142],{"type":51,"value":604},{"type":46,"tag":470,"props":25144,"children":25145},{"style":537},[25146],{"type":51,"value":25147}," [[execution]]]",{"type":46,"tag":470,"props":25149,"children":25150},{"style":531},[25151],{"type":51,"value":1007},{"type":46,"tag":470,"props":25153,"children":25154},{"class":472,"line":3064},[25155,25159,25163],{"type":46,"tag":470,"props":25156,"children":25157},{"style":531},[25158],{"type":51,"value":17890},{"type":46,"tag":470,"props":25160,"children":25161},{"style":537},[25162],{"type":51,"value":842},{"type":46,"tag":470,"props":25164,"children":25165},{"style":531},[25166],{"type":51,"value":1007},{"type":46,"tag":470,"props":25168,"children":25169},{"class":472,"line":3073},[25170,25175,25179,25184,25188,25192],{"type":46,"tag":470,"props":25171,"children":25172},{"style":2780},[25173],{"type":51,"value":25174},"      value",{"type":46,"tag":470,"props":25176,"children":25177},{"style":531},[25178],{"type":51,"value":417},{"type":46,"tag":470,"props":25180,"children":25181},{"style":537},[25182],{"type":51,"value":25183}," execution",{"type":46,"tag":470,"props":25185,"children":25186},{"style":531},[25187],{"type":51,"value":628},{"type":46,"tag":470,"props":25189,"children":25190},{"style":537},[25191],{"type":51,"value":1286},{"type":46,"tag":470,"props":25193,"children":25194},{"style":531},[25195],{"type":51,"value":1007},{"type":46,"tag":470,"props":25197,"children":25198},{"class":472,"line":3082},[25199],{"type":46,"tag":470,"props":25200,"children":25201},{"style":531},[25202],{"type":51,"value":3112},{"type":46,"tag":470,"props":25204,"children":25205},{"class":472,"line":3106},[25206,25210],{"type":46,"tag":470,"props":25207,"children":25208},{"style":537},[25209],{"type":51,"value":12848},{"type":46,"tag":470,"props":25211,"children":25212},{"style":531},[25213],{"type":51,"value":1007},{"type":46,"tag":470,"props":25215,"children":25216},{"class":472,"line":3115},[25217,25221,25225],{"type":46,"tag":470,"props":25218,"children":25219},{"style":531},[25220],{"type":51,"value":614},{"type":46,"tag":470,"props":25222,"children":25223},{"style":537},[25224],{"type":51,"value":842},{"type":46,"tag":470,"props":25226,"children":25227},{"style":531},[25228],{"type":51,"value":570},{"type":46,"tag":54,"props":25230,"children":25231},{},[25232,25237],{"type":46,"tag":72,"props":25233,"children":25234},{},[25235],{"type":51,"value":25236},"Key considerations",{"type":51,"value":417},{"type":46,"tag":719,"props":25239,"children":25240},{},[25241,25252,25257],{"type":46,"tag":723,"props":25242,"children":25243},{},[25244,25246],{"type":51,"value":25245},"Use legacy approvals (direct to Universal Router) instead of Permit2 for smart accounts — see ",{"type":46,"tag":300,"props":25247,"children":25249},{"href":25248},"#approval-target-permit2-vs-legacy-direct-to-router",[25250],{"type":51,"value":25251},"Approval Target",{"type":46,"tag":723,"props":25253,"children":25254},{},[25255],{"type":51,"value":25256},"Add 20-30% gas buffer for bundler gas estimation",{"type":46,"tag":723,"props":25258,"children":25259},{},[25260],{"type":51,"value":25261},"Handle bundler-specific error codes separately from standard transaction errors",{"type":46,"tag":54,"props":25263,"children":25264},{},[25265,25266,25272],{"type":51,"value":298},{"type":46,"tag":300,"props":25267,"children":25269},{"href":25268},".\u002Freferences\u002Fadvanced-patterns.md#smart-account-integration-erc-4337",[25270],{"type":51,"value":25271},"Advanced Patterns Reference",{"type":51,"value":25273}," for the complete implementation with types and error handling.",{"type":46,"tag":172,"props":25275,"children":25277},{"id":25276},"weth-handling-on-l2s",[25278],{"type":51,"value":25279},"WETH Handling on L2s",{"type":46,"tag":54,"props":25281,"children":25282},{},[25283],{"type":51,"value":25284},"On L2 chains (Base, Optimism, Arbitrum), swaps outputting ETH may deliver WETH instead of native ETH. Always check and unwrap after swaps:",{"type":46,"tag":397,"props":25286,"children":25288},{"className":513,"code":25287,"language":515,"meta":402,"style":402},"import { parseAbi, type Address } from 'viem';\n\nconst WETH_ABI = parseAbi([\n  'function balanceOf(address) view returns (uint256)',\n  'function withdraw(uint256)',\n]);\n\nconst WETH_ADDRESSES: Record\u003Cnumber, Address> = {\n  1: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n  10: '0x4200000000000000000000000000000000000006',\n  8453: '0x4200000000000000000000000000000000000006',\n  42161: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',\n};\n\n\u002F\u002F After swap completes on an L2:\nconst wethAddress = WETH_ADDRESSES[chainId];\nif (wethAddress) {\n  const wethBalance = await publicClient.readContract({\n    address: wethAddress,\n    abi: WETH_ABI,\n    functionName: 'balanceOf',\n    args: [accountAddress],\n  });\n\n  if (wethBalance > 0n) {\n    const hash = await walletClient.writeContract({\n      address: wethAddress,\n      abi: WETH_ABI,\n      functionName: 'withdraw',\n      args: [wethBalance],\n    });\n    await publicClient.waitForTransactionReceipt({ hash });\n  }\n}\n",[25289],{"type":46,"tag":80,"props":25290,"children":25291},{"__ignoreMap":402},[25292,25344,25351,25376,25397,25417,25428,25435,25484,25513,25542,25570,25599,25606,25613,25621,25646,25662,25702,25722,25742,25770,25798,25813,25820,25857,25896,25916,25936,25965,25993,26008,26052,26059],{"type":46,"tag":470,"props":25293,"children":25294},{"class":472,"line":473},[25295,25299,25303,25308,25312,25316,25320,25324,25328,25332,25336,25340],{"type":46,"tag":470,"props":25296,"children":25297},{"style":525},[25298],{"type":51,"value":528},{"type":46,"tag":470,"props":25300,"children":25301},{"style":531},[25302],{"type":51,"value":534},{"type":46,"tag":470,"props":25304,"children":25305},{"style":537},[25306],{"type":51,"value":25307}," parseAbi",{"type":46,"tag":470,"props":25309,"children":25310},{"style":531},[25311],{"type":51,"value":604},{"type":46,"tag":470,"props":25313,"children":25314},{"style":525},[25315],{"type":51,"value":10714},{"type":46,"tag":470,"props":25317,"children":25318},{"style":537},[25319],{"type":51,"value":10719},{"type":46,"tag":470,"props":25321,"children":25322},{"style":531},[25323],{"type":51,"value":545},{"type":46,"tag":470,"props":25325,"children":25326},{"style":525},[25327],{"type":51,"value":550},{"type":46,"tag":470,"props":25329,"children":25330},{"style":531},[25331],{"type":51,"value":555},{"type":46,"tag":470,"props":25333,"children":25334},{"style":483},[25335],{"type":51,"value":6098},{"type":46,"tag":470,"props":25337,"children":25338},{"style":531},[25339],{"type":51,"value":565},{"type":46,"tag":470,"props":25341,"children":25342},{"style":531},[25343],{"type":51,"value":570},{"type":46,"tag":470,"props":25345,"children":25346},{"class":472,"line":573},[25347],{"type":46,"tag":470,"props":25348,"children":25349},{"emptyLinePlaceholder":577},[25350],{"type":51,"value":580},{"type":46,"tag":470,"props":25352,"children":25353},{"class":472,"line":583},[25354,25358,25363,25367,25371],{"type":46,"tag":470,"props":25355,"children":25356},{"style":587},[25357],{"type":51,"value":590},{"type":46,"tag":470,"props":25359,"children":25360},{"style":537},[25361],{"type":51,"value":25362}," WETH_ABI ",{"type":46,"tag":470,"props":25364,"children":25365},{"style":531},[25366],{"type":51,"value":3438},{"type":46,"tag":470,"props":25368,"children":25369},{"style":631},[25370],{"type":51,"value":25307},{"type":46,"tag":470,"props":25372,"children":25373},{"style":537},[25374],{"type":51,"value":25375},"([\n",{"type":46,"tag":470,"props":25377,"children":25378},{"class":472,"line":1046},[25379,25384,25389,25393],{"type":46,"tag":470,"props":25380,"children":25381},{"style":531},[25382],{"type":51,"value":25383},"  '",{"type":46,"tag":470,"props":25385,"children":25386},{"style":483},[25387],{"type":51,"value":25388},"function balanceOf(address) view returns (uint256)",{"type":46,"tag":470,"props":25390,"children":25391},{"style":531},[25392],{"type":51,"value":565},{"type":46,"tag":470,"props":25394,"children":25395},{"style":531},[25396],{"type":51,"value":1007},{"type":46,"tag":470,"props":25398,"children":25399},{"class":472,"line":1084},[25400,25404,25409,25413],{"type":46,"tag":470,"props":25401,"children":25402},{"style":531},[25403],{"type":51,"value":25383},{"type":46,"tag":470,"props":25405,"children":25406},{"style":483},[25407],{"type":51,"value":25408},"function withdraw(uint256)",{"type":46,"tag":470,"props":25410,"children":25411},{"style":531},[25412],{"type":51,"value":565},{"type":46,"tag":470,"props":25414,"children":25415},{"style":531},[25416],{"type":51,"value":1007},{"type":46,"tag":470,"props":25418,"children":25419},{"class":472,"line":1111},[25420,25424],{"type":46,"tag":470,"props":25421,"children":25422},{"style":537},[25423],{"type":51,"value":13310},{"type":46,"tag":470,"props":25425,"children":25426},{"style":531},[25427],{"type":51,"value":570},{"type":46,"tag":470,"props":25429,"children":25430},{"class":472,"line":1314},[25431],{"type":46,"tag":470,"props":25432,"children":25433},{"emptyLinePlaceholder":577},[25434],{"type":51,"value":580},{"type":46,"tag":470,"props":25436,"children":25437},{"class":472,"line":1338},[25438,25442,25447,25451,25455,25459,25464,25468,25472,25476,25480],{"type":46,"tag":470,"props":25439,"children":25440},{"style":587},[25441],{"type":51,"value":590},{"type":46,"tag":470,"props":25443,"children":25444},{"style":537},[25445],{"type":51,"value":25446}," WETH_ADDRESSES",{"type":46,"tag":470,"props":25448,"children":25449},{"style":531},[25450],{"type":51,"value":417},{"type":46,"tag":470,"props":25452,"children":25453},{"style":477},[25454],{"type":51,"value":3549},{"type":46,"tag":470,"props":25456,"children":25457},{"style":531},[25458],{"type":51,"value":856},{"type":46,"tag":470,"props":25460,"children":25461},{"style":477},[25462],{"type":51,"value":25463},"number",{"type":46,"tag":470,"props":25465,"children":25466},{"style":531},[25467],{"type":51,"value":604},{"type":46,"tag":470,"props":25469,"children":25470},{"style":477},[25471],{"type":51,"value":10719},{"type":46,"tag":470,"props":25473,"children":25474},{"style":531},[25475],{"type":51,"value":849},{"type":46,"tag":470,"props":25477,"children":25478},{"style":531},[25479],{"type":51,"value":619},{"type":46,"tag":470,"props":25481,"children":25482},{"style":531},[25483],{"type":51,"value":1165},{"type":46,"tag":470,"props":25485,"children":25486},{"class":472,"line":1347},[25487,25492,25496,25500,25505,25509],{"type":46,"tag":470,"props":25488,"children":25489},{"style":1105},[25490],{"type":51,"value":25491},"  1",{"type":46,"tag":470,"props":25493,"children":25494},{"style":531},[25495],{"type":51,"value":417},{"type":46,"tag":470,"props":25497,"children":25498},{"style":531},[25499],{"type":51,"value":555},{"type":46,"tag":470,"props":25501,"children":25502},{"style":483},[25503],{"type":51,"value":25504},"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",{"type":46,"tag":470,"props":25506,"children":25507},{"style":531},[25508],{"type":51,"value":565},{"type":46,"tag":470,"props":25510,"children":25511},{"style":531},[25512],{"type":51,"value":1007},{"type":46,"tag":470,"props":25514,"children":25515},{"class":472,"line":1705},[25516,25521,25525,25529,25534,25538],{"type":46,"tag":470,"props":25517,"children":25518},{"style":1105},[25519],{"type":51,"value":25520},"  10",{"type":46,"tag":470,"props":25522,"children":25523},{"style":531},[25524],{"type":51,"value":417},{"type":46,"tag":470,"props":25526,"children":25527},{"style":531},[25528],{"type":51,"value":555},{"type":46,"tag":470,"props":25530,"children":25531},{"style":483},[25532],{"type":51,"value":25533},"0x4200000000000000000000000000000000000006",{"type":46,"tag":470,"props":25535,"children":25536},{"style":531},[25537],{"type":51,"value":565},{"type":46,"tag":470,"props":25539,"children":25540},{"style":531},[25541],{"type":51,"value":1007},{"type":46,"tag":470,"props":25543,"children":25544},{"class":472,"line":1740},[25545,25550,25554,25558,25562,25566],{"type":46,"tag":470,"props":25546,"children":25547},{"style":1105},[25548],{"type":51,"value":25549},"  8453",{"type":46,"tag":470,"props":25551,"children":25552},{"style":531},[25553],{"type":51,"value":417},{"type":46,"tag":470,"props":25555,"children":25556},{"style":531},[25557],{"type":51,"value":555},{"type":46,"tag":470,"props":25559,"children":25560},{"style":483},[25561],{"type":51,"value":25533},{"type":46,"tag":470,"props":25563,"children":25564},{"style":531},[25565],{"type":51,"value":565},{"type":46,"tag":470,"props":25567,"children":25568},{"style":531},[25569],{"type":51,"value":1007},{"type":46,"tag":470,"props":25571,"children":25572},{"class":472,"line":2421},[25573,25578,25582,25586,25591,25595],{"type":46,"tag":470,"props":25574,"children":25575},{"style":1105},[25576],{"type":51,"value":25577},"  42161",{"type":46,"tag":470,"props":25579,"children":25580},{"style":531},[25581],{"type":51,"value":417},{"type":46,"tag":470,"props":25583,"children":25584},{"style":531},[25585],{"type":51,"value":555},{"type":46,"tag":470,"props":25587,"children":25588},{"style":483},[25589],{"type":51,"value":25590},"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",{"type":46,"tag":470,"props":25592,"children":25593},{"style":531},[25594],{"type":51,"value":565},{"type":46,"tag":470,"props":25596,"children":25597},{"style":531},[25598],{"type":51,"value":1007},{"type":46,"tag":470,"props":25600,"children":25601},{"class":472,"line":2447},[25602],{"type":46,"tag":470,"props":25603,"children":25604},{"style":531},[25605],{"type":51,"value":3592},{"type":46,"tag":470,"props":25607,"children":25608},{"class":472,"line":2877},[25609],{"type":46,"tag":470,"props":25610,"children":25611},{"emptyLinePlaceholder":577},[25612],{"type":51,"value":580},{"type":46,"tag":470,"props":25614,"children":25615},{"class":472,"line":2886},[25616],{"type":46,"tag":470,"props":25617,"children":25618},{"style":3418},[25619],{"type":51,"value":25620},"\u002F\u002F After swap completes on an L2:\n",{"type":46,"tag":470,"props":25622,"children":25623},{"class":472,"line":2912},[25624,25628,25633,25637,25642],{"type":46,"tag":470,"props":25625,"children":25626},{"style":587},[25627],{"type":51,"value":590},{"type":46,"tag":470,"props":25629,"children":25630},{"style":537},[25631],{"type":51,"value":25632}," wethAddress ",{"type":46,"tag":470,"props":25634,"children":25635},{"style":531},[25636],{"type":51,"value":3438},{"type":46,"tag":470,"props":25638,"children":25639},{"style":537},[25640],{"type":51,"value":25641}," WETH_ADDRESSES[chainId]",{"type":46,"tag":470,"props":25643,"children":25644},{"style":531},[25645],{"type":51,"value":570},{"type":46,"tag":470,"props":25647,"children":25648},{"class":472,"line":2921},[25649,25653,25658],{"type":46,"tag":470,"props":25650,"children":25651},{"style":525},[25652],{"type":51,"value":3741},{"type":46,"tag":470,"props":25654,"children":25655},{"style":537},[25656],{"type":51,"value":25657}," (wethAddress) ",{"type":46,"tag":470,"props":25659,"children":25660},{"style":531},[25661],{"type":51,"value":967},{"type":46,"tag":470,"props":25663,"children":25664},{"class":472,"line":2958},[25665,25669,25674,25678,25682,25686,25690,25694,25698],{"type":46,"tag":470,"props":25666,"children":25667},{"style":587},[25668],{"type":51,"value":5252},{"type":46,"tag":470,"props":25670,"children":25671},{"style":537},[25672],{"type":51,"value":25673}," wethBalance",{"type":46,"tag":470,"props":25675,"children":25676},{"style":531},[25677],{"type":51,"value":619},{"type":46,"tag":470,"props":25679,"children":25680},{"style":525},[25681],{"type":51,"value":3443},{"type":46,"tag":470,"props":25683,"children":25684},{"style":537},[25685],{"type":51,"value":10833},{"type":46,"tag":470,"props":25687,"children":25688},{"style":531},[25689],{"type":51,"value":628},{"type":46,"tag":470,"props":25691,"children":25692},{"style":631},[25693],{"type":51,"value":10842},{"type":46,"tag":470,"props":25695,"children":25696},{"style":2780},[25697],{"type":51,"value":835},{"type":46,"tag":470,"props":25699,"children":25700},{"style":531},[25701],{"type":51,"value":967},{"type":46,"tag":470,"props":25703,"children":25704},{"class":472,"line":2994},[25705,25709,25713,25718],{"type":46,"tag":470,"props":25706,"children":25707},{"style":2780},[25708],{"type":51,"value":11073},{"type":46,"tag":470,"props":25710,"children":25711},{"style":531},[25712],{"type":51,"value":417},{"type":46,"tag":470,"props":25714,"children":25715},{"style":537},[25716],{"type":51,"value":25717}," wethAddress",{"type":46,"tag":470,"props":25719,"children":25720},{"style":531},[25721],{"type":51,"value":1007},{"type":46,"tag":470,"props":25723,"children":25724},{"class":472,"line":3031},[25725,25729,25733,25738],{"type":46,"tag":470,"props":25726,"children":25727},{"style":2780},[25728],{"type":51,"value":11093},{"type":46,"tag":470,"props":25730,"children":25731},{"style":531},[25732],{"type":51,"value":417},{"type":46,"tag":470,"props":25734,"children":25735},{"style":537},[25736],{"type":51,"value":25737}," WETH_ABI",{"type":46,"tag":470,"props":25739,"children":25740},{"style":531},[25741],{"type":51,"value":1007},{"type":46,"tag":470,"props":25743,"children":25744},{"class":472,"line":3064},[25745,25749,25753,25757,25762,25766],{"type":46,"tag":470,"props":25746,"children":25747},{"style":2780},[25748],{"type":51,"value":11114},{"type":46,"tag":470,"props":25750,"children":25751},{"style":531},[25752],{"type":51,"value":417},{"type":46,"tag":470,"props":25754,"children":25755},{"style":531},[25756],{"type":51,"value":555},{"type":46,"tag":470,"props":25758,"children":25759},{"style":483},[25760],{"type":51,"value":25761},"balanceOf",{"type":46,"tag":470,"props":25763,"children":25764},{"style":531},[25765],{"type":51,"value":565},{"type":46,"tag":470,"props":25767,"children":25768},{"style":531},[25769],{"type":51,"value":1007},{"type":46,"tag":470,"props":25771,"children":25772},{"class":472,"line":3073},[25773,25777,25781,25785,25790,25794],{"type":46,"tag":470,"props":25774,"children":25775},{"style":2780},[25776],{"type":51,"value":11143},{"type":46,"tag":470,"props":25778,"children":25779},{"style":531},[25780],{"type":51,"value":417},{"type":46,"tag":470,"props":25782,"children":25783},{"style":2780},[25784],{"type":51,"value":7102},{"type":46,"tag":470,"props":25786,"children":25787},{"style":537},[25788],{"type":51,"value":25789},"accountAddress",{"type":46,"tag":470,"props":25791,"children":25792},{"style":2780},[25793],{"type":51,"value":7119},{"type":46,"tag":470,"props":25795,"children":25796},{"style":531},[25797],{"type":51,"value":1007},{"type":46,"tag":470,"props":25799,"children":25800},{"class":472,"line":3082},[25801,25805,25809],{"type":46,"tag":470,"props":25802,"children":25803},{"style":531},[25804],{"type":51,"value":5596},{"type":46,"tag":470,"props":25806,"children":25807},{"style":2780},[25808],{"type":51,"value":842},{"type":46,"tag":470,"props":25810,"children":25811},{"style":531},[25812],{"type":51,"value":570},{"type":46,"tag":470,"props":25814,"children":25815},{"class":472,"line":3106},[25816],{"type":46,"tag":470,"props":25817,"children":25818},{"emptyLinePlaceholder":577},[25819],{"type":51,"value":580},{"type":46,"tag":470,"props":25821,"children":25822},{"class":472,"line":3115},[25823,25827,25831,25836,25841,25845,25849,25853],{"type":46,"tag":470,"props":25824,"children":25825},{"style":525},[25826],{"type":51,"value":3766},{"type":46,"tag":470,"props":25828,"children":25829},{"style":2780},[25830],{"type":51,"value":3771},{"type":46,"tag":470,"props":25832,"children":25833},{"style":537},[25834],{"type":51,"value":25835},"wethBalance",{"type":46,"tag":470,"props":25837,"children":25838},{"style":531},[25839],{"type":51,"value":25840}," >",{"type":46,"tag":470,"props":25842,"children":25843},{"style":1105},[25844],{"type":51,"value":15673},{"type":46,"tag":470,"props":25846,"children":25847},{"style":587},[25848],{"type":51,"value":15678},{"type":46,"tag":470,"props":25850,"children":25851},{"style":2780},[25852],{"type":51,"value":3781},{"type":46,"tag":470,"props":25854,"children":25855},{"style":531},[25856],{"type":51,"value":967},{"type":46,"tag":470,"props":25858,"children":25859},{"class":472,"line":3152},[25860,25864,25868,25872,25876,25880,25884,25888,25892],{"type":46,"tag":470,"props":25861,"children":25862},{"style":587},[25863],{"type":51,"value":9184},{"type":46,"tag":470,"props":25865,"children":25866},{"style":537},[25867],{"type":51,"value":11036},{"type":46,"tag":470,"props":25869,"children":25870},{"style":531},[25871],{"type":51,"value":619},{"type":46,"tag":470,"props":25873,"children":25874},{"style":525},[25875],{"type":51,"value":3443},{"type":46,"tag":470,"props":25877,"children":25878},{"style":537},[25879],{"type":51,"value":11049},{"type":46,"tag":470,"props":25881,"children":25882},{"style":531},[25883],{"type":51,"value":628},{"type":46,"tag":470,"props":25885,"children":25886},{"style":631},[25887],{"type":51,"value":905},{"type":46,"tag":470,"props":25889,"children":25890},{"style":2780},[25891],{"type":51,"value":835},{"type":46,"tag":470,"props":25893,"children":25894},{"style":531},[25895],{"type":51,"value":967},{"type":46,"tag":470,"props":25897,"children":25898},{"class":472,"line":3185},[25899,25904,25908,25912],{"type":46,"tag":470,"props":25900,"children":25901},{"style":2780},[25902],{"type":51,"value":25903},"      address",{"type":46,"tag":470,"props":25905,"children":25906},{"style":531},[25907],{"type":51,"value":417},{"type":46,"tag":470,"props":25909,"children":25910},{"style":537},[25911],{"type":51,"value":25717},{"type":46,"tag":470,"props":25913,"children":25914},{"style":531},[25915],{"type":51,"value":1007},{"type":46,"tag":470,"props":25917,"children":25918},{"class":472,"line":3193},[25919,25924,25928,25932],{"type":46,"tag":470,"props":25920,"children":25921},{"style":2780},[25922],{"type":51,"value":25923},"      abi",{"type":46,"tag":470,"props":25925,"children":25926},{"style":531},[25927],{"type":51,"value":417},{"type":46,"tag":470,"props":25929,"children":25930},{"style":537},[25931],{"type":51,"value":25737},{"type":46,"tag":470,"props":25933,"children":25934},{"style":531},[25935],{"type":51,"value":1007},{"type":46,"tag":470,"props":25937,"children":25938},{"class":472,"line":3287},[25939,25944,25948,25952,25957,25961],{"type":46,"tag":470,"props":25940,"children":25941},{"style":2780},[25942],{"type":51,"value":25943},"      functionName",{"type":46,"tag":470,"props":25945,"children":25946},{"style":531},[25947],{"type":51,"value":417},{"type":46,"tag":470,"props":25949,"children":25950},{"style":531},[25951],{"type":51,"value":555},{"type":46,"tag":470,"props":25953,"children":25954},{"style":483},[25955],{"type":51,"value":25956},"withdraw",{"type":46,"tag":470,"props":25958,"children":25959},{"style":531},[25960],{"type":51,"value":565},{"type":46,"tag":470,"props":25962,"children":25963},{"style":531},[25964],{"type":51,"value":1007},{"type":46,"tag":470,"props":25966,"children":25967},{"class":472,"line":8743},[25968,25973,25977,25981,25985,25989],{"type":46,"tag":470,"props":25969,"children":25970},{"style":2780},[25971],{"type":51,"value":25972},"      args",{"type":46,"tag":470,"props":25974,"children":25975},{"style":531},[25976],{"type":51,"value":417},{"type":46,"tag":470,"props":25978,"children":25979},{"style":2780},[25980],{"type":51,"value":7102},{"type":46,"tag":470,"props":25982,"children":25983},{"style":537},[25984],{"type":51,"value":25835},{"type":46,"tag":470,"props":25986,"children":25987},{"style":2780},[25988],{"type":51,"value":7119},{"type":46,"tag":470,"props":25990,"children":25991},{"style":531},[25992],{"type":51,"value":1007},{"type":46,"tag":470,"props":25994,"children":25995},{"class":472,"line":8752},[25996,26000,26004],{"type":46,"tag":470,"props":25997,"children":25998},{"style":531},[25999],{"type":51,"value":18061},{"type":46,"tag":470,"props":26001,"children":26002},{"style":2780},[26003],{"type":51,"value":842},{"type":46,"tag":470,"props":26005,"children":26006},{"style":531},[26007],{"type":51,"value":570},{"type":46,"tag":470,"props":26009,"children":26010},{"class":472,"line":8773},[26011,26016,26020,26024,26028,26032,26036,26040,26044,26048],{"type":46,"tag":470,"props":26012,"children":26013},{"style":525},[26014],{"type":51,"value":26015},"    await",{"type":46,"tag":470,"props":26017,"children":26018},{"style":537},[26019],{"type":51,"value":10833},{"type":46,"tag":470,"props":26021,"children":26022},{"style":531},[26023],{"type":51,"value":628},{"type":46,"tag":470,"props":26025,"children":26026},{"style":631},[26027],{"type":51,"value":11208},{"type":46,"tag":470,"props":26029,"children":26030},{"style":2780},[26031],{"type":51,"value":835},{"type":46,"tag":470,"props":26033,"children":26034},{"style":531},[26035],{"type":51,"value":11217},{"type":46,"tag":470,"props":26037,"children":26038},{"style":537},[26039],{"type":51,"value":11036},{"type":46,"tag":470,"props":26041,"children":26042},{"style":531},[26043],{"type":51,"value":545},{"type":46,"tag":470,"props":26045,"children":26046},{"style":2780},[26047],{"type":51,"value":842},{"type":46,"tag":470,"props":26049,"children":26050},{"style":531},[26051],{"type":51,"value":570},{"type":46,"tag":470,"props":26053,"children":26054},{"class":472,"line":8794},[26055],{"type":46,"tag":470,"props":26056,"children":26057},{"style":531},[26058],{"type":51,"value":1344},{"type":46,"tag":470,"props":26060,"children":26061},{"class":472,"line":8802},[26062],{"type":46,"tag":470,"props":26063,"children":26064},{"style":531},[26065],{"type":51,"value":1117},{"type":46,"tag":54,"props":26067,"children":26068},{},[26069,26070,26075],{"type":51,"value":298},{"type":46,"tag":300,"props":26071,"children":26073},{"href":26072},".\u002Freferences\u002Fadvanced-patterns.md#weth-handling-on-l2s",[26074],{"type":51,"value":25271},{"type":51,"value":26076}," for chain-specific WETH addresses and integration details.",{"type":46,"tag":172,"props":26078,"children":26080},{"id":26079},"rate-limiting",[26081],{"type":51,"value":26082},"Rate Limiting",{"type":46,"tag":54,"props":26084,"children":26085},{},[26086],{"type":51,"value":26087},"The Trading API enforces rate limits (~10 requests\u002Fsecond per endpoint). For batch operations:",{"type":46,"tag":719,"props":26089,"children":26090},{},[26091,26103,26115],{"type":46,"tag":723,"props":26092,"children":26093},{},[26094,26096,26101],{"type":51,"value":26095},"Add ",{"type":46,"tag":72,"props":26097,"children":26098},{},[26099],{"type":51,"value":26100},"100-200ms delays",{"type":51,"value":26102}," between sequential API calls",{"type":46,"tag":723,"props":26104,"children":26105},{},[26106,26108,26113],{"type":51,"value":26107},"Implement ",{"type":46,"tag":72,"props":26109,"children":26110},{},[26111],{"type":51,"value":26112},"exponential backoff with jitter",{"type":51,"value":26114}," on 429 responses",{"type":46,"tag":723,"props":26116,"children":26117},{},[26118,26123],{"type":46,"tag":72,"props":26119,"children":26120},{},[26121],{"type":51,"value":26122},"Cache approval results",{"type":51,"value":26124}," — approvals rarely change between calls",{"type":46,"tag":397,"props":26126,"children":26128},{"className":513,"code":26127,"language":515,"meta":402,"style":402},"\u002F\u002F Exponential backoff for 429 responses\nasync function fetchWithRetry(url: string, init: RequestInit, maxRetries = 5): Promise\u003CResponse> {\n  for (let attempt = 0; attempt \u003C= maxRetries; attempt++) {\n    const response = await fetch(url, init);\n    if (response.status !== 429 && response.status \u003C 500) return response;\n    if (attempt === maxRetries) throw new Error(`Failed after ${maxRetries} retries`);\n\n    const delay = Math.min(200 * Math.pow(2, attempt) + Math.random() * 100, 10000);\n    await new Promise((resolve) => setTimeout(resolve, delay));\n  }\n  throw new Error('Unreachable');\n}\n",[26129],{"type":46,"tag":80,"props":26130,"children":26131},{"__ignoreMap":402},[26132,26140,26234,26302,26349,26425,26508,26515,26639,26705,26712,26753],{"type":46,"tag":470,"props":26133,"children":26134},{"class":472,"line":473},[26135],{"type":46,"tag":470,"props":26136,"children":26137},{"style":3418},[26138],{"type":51,"value":26139},"\u002F\u002F Exponential backoff for 429 responses\n",{"type":46,"tag":470,"props":26141,"children":26142},{"class":472,"line":573},[26143,26147,26151,26156,26160,26165,26169,26173,26177,26182,26186,26191,26195,26200,26204,26209,26213,26218,26222,26226,26230],{"type":46,"tag":470,"props":26144,"children":26145},{"style":587},[26146],{"type":51,"value":14200},{"type":46,"tag":470,"props":26148,"children":26149},{"style":587},[26150],{"type":51,"value":14205},{"type":46,"tag":470,"props":26152,"children":26153},{"style":631},[26154],{"type":51,"value":26155}," fetchWithRetry",{"type":46,"tag":470,"props":26157,"children":26158},{"style":531},[26159],{"type":51,"value":835},{"type":46,"tag":470,"props":26161,"children":26162},{"style":4374},[26163],{"type":51,"value":26164},"url",{"type":46,"tag":470,"props":26166,"children":26167},{"style":531},[26168],{"type":51,"value":417},{"type":46,"tag":470,"props":26170,"children":26171},{"style":477},[26172],{"type":51,"value":5223},{"type":46,"tag":470,"props":26174,"children":26175},{"style":531},[26176],{"type":51,"value":604},{"type":46,"tag":470,"props":26178,"children":26179},{"style":4374},[26180],{"type":51,"value":26181}," init",{"type":46,"tag":470,"props":26183,"children":26184},{"style":531},[26185],{"type":51,"value":417},{"type":46,"tag":470,"props":26187,"children":26188},{"style":477},[26189],{"type":51,"value":26190}," RequestInit",{"type":46,"tag":470,"props":26192,"children":26193},{"style":531},[26194],{"type":51,"value":604},{"type":46,"tag":470,"props":26196,"children":26197},{"style":4374},[26198],{"type":51,"value":26199}," maxRetries",{"type":46,"tag":470,"props":26201,"children":26202},{"style":531},[26203],{"type":51,"value":619},{"type":46,"tag":470,"props":26205,"children":26206},{"style":1105},[26207],{"type":51,"value":26208}," 5",{"type":46,"tag":470,"props":26210,"children":26211},{"style":531},[26212],{"type":51,"value":4391},{"type":46,"tag":470,"props":26214,"children":26215},{"style":477},[26216],{"type":51,"value":26217}," Promise",{"type":46,"tag":470,"props":26219,"children":26220},{"style":531},[26221],{"type":51,"value":856},{"type":46,"tag":470,"props":26223,"children":26224},{"style":477},[26225],{"type":51,"value":1125},{"type":46,"tag":470,"props":26227,"children":26228},{"style":531},[26229],{"type":51,"value":849},{"type":46,"tag":470,"props":26231,"children":26232},{"style":531},[26233],{"type":51,"value":1165},{"type":46,"tag":470,"props":26235,"children":26236},{"class":472,"line":583},[26237,26242,26246,26251,26256,26260,26264,26268,26272,26277,26281,26285,26289,26294,26298],{"type":46,"tag":470,"props":26238,"children":26239},{"style":525},[26240],{"type":51,"value":26241},"  for",{"type":46,"tag":470,"props":26243,"children":26244},{"style":2780},[26245],{"type":51,"value":3771},{"type":46,"tag":470,"props":26247,"children":26248},{"style":587},[26249],{"type":51,"value":26250},"let",{"type":46,"tag":470,"props":26252,"children":26253},{"style":537},[26254],{"type":51,"value":26255}," attempt",{"type":46,"tag":470,"props":26257,"children":26258},{"style":531},[26259],{"type":51,"value":619},{"type":46,"tag":470,"props":26261,"children":26262},{"style":1105},[26263],{"type":51,"value":15673},{"type":46,"tag":470,"props":26265,"children":26266},{"style":531},[26267],{"type":51,"value":799},{"type":46,"tag":470,"props":26269,"children":26270},{"style":537},[26271],{"type":51,"value":26255},{"type":46,"tag":470,"props":26273,"children":26274},{"style":531},[26275],{"type":51,"value":26276}," \u003C=",{"type":46,"tag":470,"props":26278,"children":26279},{"style":537},[26280],{"type":51,"value":26199},{"type":46,"tag":470,"props":26282,"children":26283},{"style":531},[26284],{"type":51,"value":799},{"type":46,"tag":470,"props":26286,"children":26287},{"style":537},[26288],{"type":51,"value":26255},{"type":46,"tag":470,"props":26290,"children":26291},{"style":531},[26292],{"type":51,"value":26293},"++",{"type":46,"tag":470,"props":26295,"children":26296},{"style":2780},[26297],{"type":51,"value":3781},{"type":46,"tag":470,"props":26299,"children":26300},{"style":531},[26301],{"type":51,"value":967},{"type":46,"tag":470,"props":26303,"children":26304},{"class":472,"line":1046},[26305,26309,26313,26317,26321,26325,26329,26333,26337,26341,26345],{"type":46,"tag":470,"props":26306,"children":26307},{"style":587},[26308],{"type":51,"value":9184},{"type":46,"tag":470,"props":26310,"children":26311},{"style":537},[26312],{"type":51,"value":4447},{"type":46,"tag":470,"props":26314,"children":26315},{"style":531},[26316],{"type":51,"value":619},{"type":46,"tag":470,"props":26318,"children":26319},{"style":525},[26320],{"type":51,"value":3443},{"type":46,"tag":470,"props":26322,"children":26323},{"style":631},[26324],{"type":51,"value":17652},{"type":46,"tag":470,"props":26326,"children":26327},{"style":2780},[26328],{"type":51,"value":835},{"type":46,"tag":470,"props":26330,"children":26331},{"style":537},[26332],{"type":51,"value":26164},{"type":46,"tag":470,"props":26334,"children":26335},{"style":531},[26336],{"type":51,"value":604},{"type":46,"tag":470,"props":26338,"children":26339},{"style":537},[26340],{"type":51,"value":26181},{"type":46,"tag":470,"props":26342,"children":26343},{"style":2780},[26344],{"type":51,"value":842},{"type":46,"tag":470,"props":26346,"children":26347},{"style":531},[26348],{"type":51,"value":570},{"type":46,"tag":470,"props":26350,"children":26351},{"class":472,"line":1084},[26352,26356,26360,26364,26368,26373,26377,26382,26386,26390,26394,26398,26403,26408,26412,26417,26421],{"type":46,"tag":470,"props":26353,"children":26354},{"style":525},[26355],{"type":51,"value":5551},{"type":46,"tag":470,"props":26357,"children":26358},{"style":2780},[26359],{"type":51,"value":3771},{"type":46,"tag":470,"props":26361,"children":26362},{"style":537},[26363],{"type":51,"value":4377},{"type":46,"tag":470,"props":26365,"children":26366},{"style":531},[26367],{"type":51,"value":628},{"type":46,"tag":470,"props":26369,"children":26370},{"style":537},[26371],{"type":51,"value":26372},"status",{"type":46,"tag":470,"props":26374,"children":26375},{"style":531},[26376],{"type":51,"value":22280},{"type":46,"tag":470,"props":26378,"children":26379},{"style":1105},[26380],{"type":51,"value":26381}," 429",{"type":46,"tag":470,"props":26383,"children":26384},{"style":531},[26385],{"type":51,"value":3852},{"type":46,"tag":470,"props":26387,"children":26388},{"style":537},[26389],{"type":51,"value":4447},{"type":46,"tag":470,"props":26391,"children":26392},{"style":531},[26393],{"type":51,"value":628},{"type":46,"tag":470,"props":26395,"children":26396},{"style":537},[26397],{"type":51,"value":26372},{"type":46,"tag":470,"props":26399,"children":26400},{"style":531},[26401],{"type":51,"value":26402}," \u003C",{"type":46,"tag":470,"props":26404,"children":26405},{"style":1105},[26406],{"type":51,"value":26407}," 500",{"type":46,"tag":470,"props":26409,"children":26410},{"style":2780},[26411],{"type":51,"value":3781},{"type":46,"tag":470,"props":26413,"children":26414},{"style":525},[26415],{"type":51,"value":26416},"return",{"type":46,"tag":470,"props":26418,"children":26419},{"style":537},[26420],{"type":51,"value":4447},{"type":46,"tag":470,"props":26422,"children":26423},{"style":531},[26424],{"type":51,"value":570},{"type":46,"tag":470,"props":26426,"children":26427},{"class":472,"line":1111},[26428,26432,26436,26441,26445,26449,26453,26457,26461,26465,26469,26473,26478,26482,26487,26491,26496,26500,26504],{"type":46,"tag":470,"props":26429,"children":26430},{"style":525},[26431],{"type":51,"value":5551},{"type":46,"tag":470,"props":26433,"children":26434},{"style":2780},[26435],{"type":51,"value":3771},{"type":46,"tag":470,"props":26437,"children":26438},{"style":537},[26439],{"type":51,"value":26440},"attempt",{"type":46,"tag":470,"props":26442,"children":26443},{"style":531},[26444],{"type":51,"value":3874},{"type":46,"tag":470,"props":26446,"children":26447},{"style":537},[26448],{"type":51,"value":26199},{"type":46,"tag":470,"props":26450,"children":26451},{"style":2780},[26452],{"type":51,"value":3781},{"type":46,"tag":470,"props":26454,"children":26455},{"style":525},[26456],{"type":51,"value":9268},{"type":46,"tag":470,"props":26458,"children":26459},{"style":531},[26460],{"type":51,"value":4534},{"type":46,"tag":470,"props":26462,"children":26463},{"style":631},[26464],{"type":51,"value":4539},{"type":46,"tag":470,"props":26466,"children":26467},{"style":2780},[26468],{"type":51,"value":835},{"type":46,"tag":470,"props":26470,"children":26471},{"style":531},[26472],{"type":51,"value":828},{"type":46,"tag":470,"props":26474,"children":26475},{"style":483},[26476],{"type":51,"value":26477},"Failed after ",{"type":46,"tag":470,"props":26479,"children":26480},{"style":531},[26481],{"type":51,"value":20145},{"type":46,"tag":470,"props":26483,"children":26484},{"style":537},[26485],{"type":51,"value":26486},"maxRetries",{"type":46,"tag":470,"props":26488,"children":26489},{"style":531},[26490],{"type":51,"value":614},{"type":46,"tag":470,"props":26492,"children":26493},{"style":483},[26494],{"type":51,"value":26495}," retries",{"type":46,"tag":470,"props":26497,"children":26498},{"style":531},[26499],{"type":51,"value":828},{"type":46,"tag":470,"props":26501,"children":26502},{"style":2780},[26503],{"type":51,"value":842},{"type":46,"tag":470,"props":26505,"children":26506},{"style":531},[26507],{"type":51,"value":570},{"type":46,"tag":470,"props":26509,"children":26510},{"class":472,"line":1314},[26511],{"type":46,"tag":470,"props":26512,"children":26513},{"emptyLinePlaceholder":577},[26514],{"type":51,"value":580},{"type":46,"tag":470,"props":26516,"children":26517},{"class":472,"line":1338},[26518,26522,26527,26531,26535,26539,26544,26548,26553,26558,26562,26566,26571,26575,26580,26584,26588,26592,26596,26600,26604,26609,26613,26618,26623,26627,26631,26635],{"type":46,"tag":470,"props":26519,"children":26520},{"style":587},[26521],{"type":51,"value":9184},{"type":46,"tag":470,"props":26523,"children":26524},{"style":537},[26525],{"type":51,"value":26526}," delay",{"type":46,"tag":470,"props":26528,"children":26529},{"style":531},[26530],{"type":51,"value":619},{"type":46,"tag":470,"props":26532,"children":26533},{"style":537},[26534],{"type":51,"value":10224},{"type":46,"tag":470,"props":26536,"children":26537},{"style":531},[26538],{"type":51,"value":628},{"type":46,"tag":470,"props":26540,"children":26541},{"style":631},[26542],{"type":51,"value":26543},"min",{"type":46,"tag":470,"props":26545,"children":26546},{"style":2780},[26547],{"type":51,"value":835},{"type":46,"tag":470,"props":26549,"children":26550},{"style":1105},[26551],{"type":51,"value":26552},"200",{"type":46,"tag":470,"props":26554,"children":26555},{"style":531},[26556],{"type":51,"value":26557}," *",{"type":46,"tag":470,"props":26559,"children":26560},{"style":537},[26561],{"type":51,"value":10224},{"type":46,"tag":470,"props":26563,"children":26564},{"style":531},[26565],{"type":51,"value":628},{"type":46,"tag":470,"props":26567,"children":26568},{"style":631},[26569],{"type":51,"value":26570},"pow",{"type":46,"tag":470,"props":26572,"children":26573},{"style":2780},[26574],{"type":51,"value":835},{"type":46,"tag":470,"props":26576,"children":26577},{"style":1105},[26578],{"type":51,"value":26579},"2",{"type":46,"tag":470,"props":26581,"children":26582},{"style":531},[26583],{"type":51,"value":604},{"type":46,"tag":470,"props":26585,"children":26586},{"style":537},[26587],{"type":51,"value":26255},{"type":46,"tag":470,"props":26589,"children":26590},{"style":2780},[26591],{"type":51,"value":3781},{"type":46,"tag":470,"props":26593,"children":26594},{"style":531},[26595],{"type":51,"value":10270},{"type":46,"tag":470,"props":26597,"children":26598},{"style":537},[26599],{"type":51,"value":10224},{"type":46,"tag":470,"props":26601,"children":26602},{"style":531},[26603],{"type":51,"value":628},{"type":46,"tag":470,"props":26605,"children":26606},{"style":631},[26607],{"type":51,"value":26608},"random",{"type":46,"tag":470,"props":26610,"children":26611},{"style":2780},[26612],{"type":51,"value":10252},{"type":46,"tag":470,"props":26614,"children":26615},{"style":531},[26616],{"type":51,"value":26617},"*",{"type":46,"tag":470,"props":26619,"children":26620},{"style":1105},[26621],{"type":51,"value":26622}," 100",{"type":46,"tag":470,"props":26624,"children":26625},{"style":531},[26626],{"type":51,"value":604},{"type":46,"tag":470,"props":26628,"children":26629},{"style":1105},[26630],{"type":51,"value":10174},{"type":46,"tag":470,"props":26632,"children":26633},{"style":2780},[26634],{"type":51,"value":842},{"type":46,"tag":470,"props":26636,"children":26637},{"style":531},[26638],{"type":51,"value":570},{"type":46,"tag":470,"props":26640,"children":26641},{"class":472,"line":1347},[26642,26646,26650,26654,26658,26662,26667,26671,26675,26680,26684,26688,26692,26696,26701],{"type":46,"tag":470,"props":26643,"children":26644},{"style":525},[26645],{"type":51,"value":26015},{"type":46,"tag":470,"props":26647,"children":26648},{"style":531},[26649],{"type":51,"value":4534},{"type":46,"tag":470,"props":26651,"children":26652},{"style":477},[26653],{"type":51,"value":26217},{"type":46,"tag":470,"props":26655,"children":26656},{"style":2780},[26657],{"type":51,"value":835},{"type":46,"tag":470,"props":26659,"children":26660},{"style":531},[26661],{"type":51,"value":835},{"type":46,"tag":470,"props":26663,"children":26664},{"style":4374},[26665],{"type":51,"value":26666},"resolve",{"type":46,"tag":470,"props":26668,"children":26669},{"style":531},[26670],{"type":51,"value":842},{"type":46,"tag":470,"props":26672,"children":26673},{"style":587},[26674],{"type":51,"value":7457},{"type":46,"tag":470,"props":26676,"children":26677},{"style":631},[26678],{"type":51,"value":26679}," setTimeout",{"type":46,"tag":470,"props":26681,"children":26682},{"style":2780},[26683],{"type":51,"value":835},{"type":46,"tag":470,"props":26685,"children":26686},{"style":537},[26687],{"type":51,"value":26666},{"type":46,"tag":470,"props":26689,"children":26690},{"style":531},[26691],{"type":51,"value":604},{"type":46,"tag":470,"props":26693,"children":26694},{"style":537},[26695],{"type":51,"value":26526},{"type":46,"tag":470,"props":26697,"children":26698},{"style":2780},[26699],{"type":51,"value":26700},"))",{"type":46,"tag":470,"props":26702,"children":26703},{"style":531},[26704],{"type":51,"value":570},{"type":46,"tag":470,"props":26706,"children":26707},{"class":472,"line":1705},[26708],{"type":46,"tag":470,"props":26709,"children":26710},{"style":531},[26711],{"type":51,"value":1344},{"type":46,"tag":470,"props":26713,"children":26714},{"class":472,"line":1740},[26715,26720,26724,26728,26732,26736,26741,26745,26749],{"type":46,"tag":470,"props":26716,"children":26717},{"style":525},[26718],{"type":51,"value":26719},"  throw",{"type":46,"tag":470,"props":26721,"children":26722},{"style":531},[26723],{"type":51,"value":4534},{"type":46,"tag":470,"props":26725,"children":26726},{"style":631},[26727],{"type":51,"value":4539},{"type":46,"tag":470,"props":26729,"children":26730},{"style":2780},[26731],{"type":51,"value":835},{"type":46,"tag":470,"props":26733,"children":26734},{"style":531},[26735],{"type":51,"value":565},{"type":46,"tag":470,"props":26737,"children":26738},{"style":483},[26739],{"type":51,"value":26740},"Unreachable",{"type":46,"tag":470,"props":26742,"children":26743},{"style":531},[26744],{"type":51,"value":565},{"type":46,"tag":470,"props":26746,"children":26747},{"style":2780},[26748],{"type":51,"value":842},{"type":46,"tag":470,"props":26750,"children":26751},{"style":531},[26752],{"type":51,"value":570},{"type":46,"tag":470,"props":26754,"children":26755},{"class":472,"line":2421},[26756],{"type":46,"tag":470,"props":26757,"children":26758},{"style":531},[26759],{"type":51,"value":1117},{"type":46,"tag":54,"props":26761,"children":26762},{},[26763,26764,26769],{"type":51,"value":298},{"type":46,"tag":300,"props":26765,"children":26767},{"href":26766},".\u002Freferences\u002Fadvanced-patterns.md#rate-limiting-best-practices",[26768],{"type":51,"value":25271},{"type":51,"value":26770}," for batch operation patterns and full retry implementation.",{"type":46,"tag":704,"props":26772,"children":26773},{},[],{"type":46,"tag":60,"props":26775,"children":26777},{"id":26776},"key-contract-addresses",[26778],{"type":51,"value":26779},"Key Contract Addresses",{"type":46,"tag":172,"props":26781,"children":26783},{"id":26782},"universal-router-v4",[26784],{"type":51,"value":26785},"Universal Router (v4)",{"type":46,"tag":54,"props":26787,"children":26788},{},[26789,26791,26797],{"type":51,"value":26790},"Addresses are per-chain. The legacy v1 address ",{"type":46,"tag":80,"props":26792,"children":26794},{"className":26793},[],[26795],{"type":51,"value":26796},"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",{"type":51,"value":26798}," is deprecated.",{"type":46,"tag":93,"props":26800,"children":26801},{},[26802,26823],{"type":46,"tag":97,"props":26803,"children":26804},{},[26805],{"type":46,"tag":101,"props":26806,"children":26807},{},[26808,26813,26818],{"type":46,"tag":105,"props":26809,"children":26810},{},[26811],{"type":51,"value":26812},"Chain",{"type":46,"tag":105,"props":26814,"children":26815},{},[26816],{"type":51,"value":26817},"ID",{"type":46,"tag":105,"props":26819,"children":26820},{},[26821],{"type":51,"value":26822},"Address",{"type":46,"tag":116,"props":26824,"children":26825},{},[26826,26847,26869,26891,26913,26935,26957,26979,27001,27023,27045,27067,27089,27111,27133],{"type":46,"tag":101,"props":26827,"children":26828},{},[26829,26834,26838],{"type":46,"tag":123,"props":26830,"children":26831},{},[26832],{"type":51,"value":26833},"Ethereum",{"type":46,"tag":123,"props":26835,"children":26836},{},[26837],{"type":51,"value":1556},{"type":46,"tag":123,"props":26839,"children":26840},{},[26841],{"type":46,"tag":80,"props":26842,"children":26844},{"className":26843},[],[26845],{"type":51,"value":26846},"0x66a9893cc07d91d95644aedd05d03f95e1dba8af",{"type":46,"tag":101,"props":26848,"children":26849},{},[26850,26855,26860],{"type":46,"tag":123,"props":26851,"children":26852},{},[26853],{"type":51,"value":26854},"Unichain",{"type":46,"tag":123,"props":26856,"children":26857},{},[26858],{"type":51,"value":26859},"130",{"type":46,"tag":123,"props":26861,"children":26862},{},[26863],{"type":46,"tag":80,"props":26864,"children":26866},{"className":26865},[],[26867],{"type":51,"value":26868},"0xef740bf23acae26f6492b10de645d6b98dc8eaf3",{"type":46,"tag":101,"props":26870,"children":26871},{},[26872,26877,26882],{"type":46,"tag":123,"props":26873,"children":26874},{},[26875],{"type":51,"value":26876},"Optimism",{"type":46,"tag":123,"props":26878,"children":26879},{},[26880],{"type":51,"value":26881},"10",{"type":46,"tag":123,"props":26883,"children":26884},{},[26885],{"type":46,"tag":80,"props":26886,"children":26888},{"className":26887},[],[26889],{"type":51,"value":26890},"0x851116d9223fabed8e56c0e6b8ad0c31d98b3507",{"type":46,"tag":101,"props":26892,"children":26893},{},[26894,26899,26904],{"type":46,"tag":123,"props":26895,"children":26896},{},[26897],{"type":51,"value":26898},"Base",{"type":46,"tag":123,"props":26900,"children":26901},{},[26902],{"type":51,"value":26903},"8453",{"type":46,"tag":123,"props":26905,"children":26906},{},[26907],{"type":46,"tag":80,"props":26908,"children":26910},{"className":26909},[],[26911],{"type":51,"value":26912},"0x6ff5693b99212da76ad316178a184ab56d299b43",{"type":46,"tag":101,"props":26914,"children":26915},{},[26916,26921,26926],{"type":46,"tag":123,"props":26917,"children":26918},{},[26919],{"type":51,"value":26920},"Arbitrum",{"type":46,"tag":123,"props":26922,"children":26923},{},[26924],{"type":51,"value":26925},"42161",{"type":46,"tag":123,"props":26927,"children":26928},{},[26929],{"type":46,"tag":80,"props":26930,"children":26932},{"className":26931},[],[26933],{"type":51,"value":26934},"0xa51afafe0263b40edaef0df8781ea9aa03e381a3",{"type":46,"tag":101,"props":26936,"children":26937},{},[26938,26943,26948],{"type":46,"tag":123,"props":26939,"children":26940},{},[26941],{"type":51,"value":26942},"Polygon",{"type":46,"tag":123,"props":26944,"children":26945},{},[26946],{"type":51,"value":26947},"137",{"type":46,"tag":123,"props":26949,"children":26950},{},[26951],{"type":46,"tag":80,"props":26952,"children":26954},{"className":26953},[],[26955],{"type":51,"value":26956},"0x1095692a6237d83c6a72f3f5efedb9a670c49223",{"type":46,"tag":101,"props":26958,"children":26959},{},[26960,26965,26970],{"type":46,"tag":123,"props":26961,"children":26962},{},[26963],{"type":51,"value":26964},"Blast",{"type":46,"tag":123,"props":26966,"children":26967},{},[26968],{"type":51,"value":26969},"81457",{"type":46,"tag":123,"props":26971,"children":26972},{},[26973],{"type":46,"tag":80,"props":26974,"children":26976},{"className":26975},[],[26977],{"type":51,"value":26978},"0xeabbcb3e8e415306207ef514f660a3f820025be3",{"type":46,"tag":101,"props":26980,"children":26981},{},[26982,26987,26992],{"type":46,"tag":123,"props":26983,"children":26984},{},[26985],{"type":51,"value":26986},"BNB",{"type":46,"tag":123,"props":26988,"children":26989},{},[26990],{"type":51,"value":26991},"56",{"type":46,"tag":123,"props":26993,"children":26994},{},[26995],{"type":46,"tag":80,"props":26996,"children":26998},{"className":26997},[],[26999],{"type":51,"value":27000},"0x1906c1d672b88cd1b9ac7593301ca990f94eae07",{"type":46,"tag":101,"props":27002,"children":27003},{},[27004,27009,27014],{"type":46,"tag":123,"props":27005,"children":27006},{},[27007],{"type":51,"value":27008},"Zora",{"type":46,"tag":123,"props":27010,"children":27011},{},[27012],{"type":51,"value":27013},"7777777",{"type":46,"tag":123,"props":27015,"children":27016},{},[27017],{"type":46,"tag":80,"props":27018,"children":27020},{"className":27019},[],[27021],{"type":51,"value":27022},"0x3315ef7ca28db74abadc6c44570efdf06b04b020",{"type":46,"tag":101,"props":27024,"children":27025},{},[27026,27031,27036],{"type":46,"tag":123,"props":27027,"children":27028},{},[27029],{"type":51,"value":27030},"World Chain",{"type":46,"tag":123,"props":27032,"children":27033},{},[27034],{"type":51,"value":27035},"480",{"type":46,"tag":123,"props":27037,"children":27038},{},[27039],{"type":46,"tag":80,"props":27040,"children":27042},{"className":27041},[],[27043],{"type":51,"value":27044},"0x8ac7bee993bb44dab564ea4bc9ea67bf9eb5e743",{"type":46,"tag":101,"props":27046,"children":27047},{},[27048,27053,27058],{"type":46,"tag":123,"props":27049,"children":27050},{},[27051],{"type":51,"value":27052},"Avalanche",{"type":46,"tag":123,"props":27054,"children":27055},{},[27056],{"type":51,"value":27057},"43114",{"type":46,"tag":123,"props":27059,"children":27060},{},[27061],{"type":46,"tag":80,"props":27062,"children":27064},{"className":27063},[],[27065],{"type":51,"value":27066},"0x94b75331ae8d42c1b61065089b7d48fe14aa73b7",{"type":46,"tag":101,"props":27068,"children":27069},{},[27070,27075,27080],{"type":46,"tag":123,"props":27071,"children":27072},{},[27073],{"type":51,"value":27074},"Celo",{"type":46,"tag":123,"props":27076,"children":27077},{},[27078],{"type":51,"value":27079},"42220",{"type":46,"tag":123,"props":27081,"children":27082},{},[27083],{"type":46,"tag":80,"props":27084,"children":27086},{"className":27085},[],[27087],{"type":51,"value":27088},"0xcb695bc5d3aa22cad1e6df07801b061a05a0233a",{"type":46,"tag":101,"props":27090,"children":27091},{},[27092,27097,27102],{"type":46,"tag":123,"props":27093,"children":27094},{},[27095],{"type":51,"value":27096},"Soneium",{"type":46,"tag":123,"props":27098,"children":27099},{},[27100],{"type":51,"value":27101},"1868",{"type":46,"tag":123,"props":27103,"children":27104},{},[27105],{"type":46,"tag":80,"props":27106,"children":27108},{"className":27107},[],[27109],{"type":51,"value":27110},"0x4cded7edf52c8aa5259a54ec6a3ce7c6d2a455df",{"type":46,"tag":101,"props":27112,"children":27113},{},[27114,27119,27124],{"type":46,"tag":123,"props":27115,"children":27116},{},[27117],{"type":51,"value":27118},"Ink",{"type":46,"tag":123,"props":27120,"children":27121},{},[27122],{"type":51,"value":27123},"57073",{"type":46,"tag":123,"props":27125,"children":27126},{},[27127],{"type":46,"tag":80,"props":27128,"children":27130},{"className":27129},[],[27131],{"type":51,"value":27132},"0x112908dac86e20e7241b0927479ea3bf935d1fa0",{"type":46,"tag":101,"props":27134,"children":27135},{},[27136,27141,27146],{"type":46,"tag":123,"props":27137,"children":27138},{},[27139],{"type":51,"value":27140},"Monad",{"type":46,"tag":123,"props":27142,"children":27143},{},[27144],{"type":51,"value":27145},"143",{"type":46,"tag":123,"props":27147,"children":27148},{},[27149],{"type":46,"tag":80,"props":27150,"children":27152},{"className":27151},[],[27153],{"type":51,"value":27154},"0x0d97dc33264bfc1c226207428a79b26757fb9dc3",{"type":46,"tag":54,"props":27156,"children":27157},{},[27158,27160,27167],{"type":51,"value":27159},"For testnet addresses, see ",{"type":46,"tag":300,"props":27161,"children":27164},{"href":27162,"rel":27163},"https:\u002F\u002Fdocs.uniswap.org\u002Fcontracts\u002Fv4\u002Fdeployments",[372],[27165],{"type":51,"value":27166},"Uniswap v4 Deployments",{"type":51,"value":628},{"type":46,"tag":172,"props":27169,"children":27171},{"id":27170},"permit2",[27172],{"type":51,"value":10475},{"type":46,"tag":93,"props":27174,"children":27175},{},[27176,27190],{"type":46,"tag":97,"props":27177,"children":27178},{},[27179],{"type":46,"tag":101,"props":27180,"children":27181},{},[27182,27186],{"type":46,"tag":105,"props":27183,"children":27184},{},[27185],{"type":51,"value":26812},{"type":46,"tag":105,"props":27187,"children":27188},{},[27189],{"type":51,"value":26822},{"type":46,"tag":116,"props":27191,"children":27192},{},[27193],{"type":46,"tag":101,"props":27194,"children":27195},{},[27196,27201],{"type":46,"tag":123,"props":27197,"children":27198},{},[27199],{"type":51,"value":27200},"All chains",{"type":46,"tag":123,"props":27202,"children":27203},{},[27204],{"type":46,"tag":80,"props":27205,"children":27207},{"className":27206},[],[27208],{"type":51,"value":10775},{"type":46,"tag":704,"props":27210,"children":27211},{},[],{"type":46,"tag":60,"props":27213,"children":27215},{"id":27214},"troubleshooting",[27216],{"type":51,"value":27217},"Troubleshooting",{"type":46,"tag":172,"props":27219,"children":27221},{"id":27220},"common-issues",[27222],{"type":51,"value":27223},"Common Issues",{"type":46,"tag":93,"props":27225,"children":27226},{},[27227,27243],{"type":46,"tag":97,"props":27228,"children":27229},{},[27230],{"type":46,"tag":101,"props":27231,"children":27232},{},[27233,27238],{"type":46,"tag":105,"props":27234,"children":27235},{},[27236],{"type":51,"value":27237},"Issue",{"type":46,"tag":105,"props":27239,"children":27240},{},[27241],{"type":51,"value":27242},"Solution",{"type":46,"tag":116,"props":27244,"children":27245},{},[27246,27259,27272,27285,27298,27314,27338,27361,27406,27428,27450,27473,27515,27542],{"type":46,"tag":101,"props":27247,"children":27248},{},[27249,27254],{"type":46,"tag":123,"props":27250,"children":27251},{},[27252],{"type":51,"value":27253},"\"Insufficient allowance\"",{"type":46,"tag":123,"props":27255,"children":27256},{},[27257],{"type":51,"value":27258},"Call \u002Fcheck_approval first and submit approval tx",{"type":46,"tag":101,"props":27260,"children":27261},{},[27262,27267],{"type":46,"tag":123,"props":27263,"children":27264},{},[27265],{"type":51,"value":27266},"\"Quote expired\"",{"type":46,"tag":123,"props":27268,"children":27269},{},[27270],{"type":51,"value":27271},"Increase deadline or re-fetch quote",{"type":46,"tag":101,"props":27273,"children":27274},{},[27275,27280],{"type":46,"tag":123,"props":27276,"children":27277},{},[27278],{"type":51,"value":27279},"\"Slippage exceeded\"",{"type":46,"tag":123,"props":27281,"children":27282},{},[27283],{"type":51,"value":27284},"Increase slippageTolerance or retry",{"type":46,"tag":101,"props":27286,"children":27287},{},[27288,27293],{"type":46,"tag":123,"props":27289,"children":27290},{},[27291],{"type":51,"value":27292},"\"Insufficient liquidity\"",{"type":46,"tag":123,"props":27294,"children":27295},{},[27296],{"type":51,"value":27297},"Try smaller amount or different route",{"type":46,"tag":101,"props":27299,"children":27300},{},[27301,27309],{"type":46,"tag":123,"props":27302,"children":27303},{},[27304],{"type":46,"tag":72,"props":27305,"children":27306},{},[27307],{"type":51,"value":27308},"\"Buffer is not defined\"",{"type":46,"tag":123,"props":27310,"children":27311},{},[27312],{"type":51,"value":27313},"Add Buffer polyfill (see Critical Implementation Notes)",{"type":46,"tag":101,"props":27315,"children":27316},{},[27317,27325],{"type":46,"tag":123,"props":27318,"children":27319},{},[27320],{"type":46,"tag":72,"props":27321,"children":27322},{},[27323],{"type":51,"value":27324},"On-chain revert with empty data",{"type":46,"tag":123,"props":27326,"children":27327},{},[27328,27330,27336],{"type":51,"value":27329},"Validate ",{"type":46,"tag":80,"props":27331,"children":27333},{"className":27332},[],[27334],{"type":51,"value":27335},"swap.data",{"type":51,"value":27337}," is non-empty hex before broadcasting",{"type":46,"tag":101,"props":27339,"children":27340},{},[27341,27349],{"type":46,"tag":123,"props":27342,"children":27343},{},[27344],{"type":46,"tag":72,"props":27345,"children":27346},{},[27347],{"type":51,"value":27348},"\"permitData must be of type object\"",{"type":46,"tag":123,"props":27350,"children":27351},{},[27352,27354,27359],{"type":51,"value":27353},"Strip ",{"type":46,"tag":80,"props":27355,"children":27357},{"className":27356},[],[27358],{"type":51,"value":4022},{"type":51,"value":27360}," from request - omit field entirely",{"type":46,"tag":101,"props":27362,"children":27363},{},[27364,27372],{"type":46,"tag":123,"props":27365,"children":27366},{},[27367],{"type":46,"tag":72,"props":27368,"children":27369},{},[27370],{"type":51,"value":27371},"\"quote does not match any of the allowed types\"",{"type":46,"tag":123,"props":27373,"children":27374},{},[27375,27377,27383,27385,27390,27392,27397,27399,27405],{"type":51,"value":27376},"Don't wrap quote in ",{"type":46,"tag":80,"props":27378,"children":27380},{"className":27379},[],[27381],{"type":51,"value":27382},"{quote: ...}",{"type":51,"value":27384}," — spread into request body. Also check: for UniswapX routes, ",{"type":46,"tag":80,"props":27386,"children":27388},{"className":27387},[],[27389],{"type":51,"value":2431},{"type":51,"value":27391}," must be omitted from the ",{"type":46,"tag":80,"props":27393,"children":27395},{"className":27394},[],[27396],{"type":51,"value":4066},{"type":51,"value":27398}," body (see ",{"type":46,"tag":300,"props":27400,"children":27402},{"href":27401},"#api-validation-errors-400",[27403],{"type":51,"value":27404},"API Validation Errors",{"type":51,"value":842},{"type":46,"tag":101,"props":27407,"children":27408},{},[27409,27417],{"type":46,"tag":123,"props":27410,"children":27411},{},[27412],{"type":46,"tag":72,"props":27413,"children":27414},{},[27415],{"type":51,"value":27416},"Received WETH instead of ETH on L2",{"type":46,"tag":123,"props":27418,"children":27419},{},[27420,27422,27427],{"type":51,"value":27421},"Check and unwrap WETH after swap (see ",{"type":46,"tag":300,"props":27423,"children":27425},{"href":27424},"#weth-handling-on-l2s",[27426],{"type":51,"value":25279},{"type":51,"value":842},{"type":46,"tag":101,"props":27429,"children":27430},{},[27431,27439],{"type":46,"tag":123,"props":27432,"children":27433},{},[27434],{"type":46,"tag":72,"props":27435,"children":27436},{},[27437],{"type":51,"value":27438},"429 Too Many Requests",{"type":46,"tag":123,"props":27440,"children":27441},{},[27442,27444,27449],{"type":51,"value":27443},"Implement exponential backoff and add delays between batch requests (see ",{"type":46,"tag":300,"props":27445,"children":27447},{"href":27446},"#rate-limiting",[27448],{"type":51,"value":26082},{"type":51,"value":842},{"type":46,"tag":101,"props":27451,"children":27452},{},[27453,27461],{"type":46,"tag":123,"props":27454,"children":27455},{},[27456],{"type":46,"tag":72,"props":27457,"children":27458},{},[27459],{"type":51,"value":27460},"415 on OPTIONS preflight \u002F CORS error",{"type":46,"tag":123,"props":27462,"children":27463},{},[27464,27466,27471],{"type":51,"value":27465},"Set up a CORS proxy (see ",{"type":46,"tag":300,"props":27467,"children":27469},{"href":27468},"#cors-proxy-configuration",[27470],{"type":51,"value":7237},{"type":51,"value":27472}," in Browser Environment Setup)",{"type":46,"tag":101,"props":27474,"children":27475},{},[27476,27484],{"type":46,"tag":123,"props":27477,"children":27478},{},[27479],{"type":46,"tag":72,"props":27480,"children":27481},{},[27482],{"type":51,"value":27483},"walletClient is undefined when wallet is connected",{"type":46,"tag":123,"props":27485,"children":27486},{},[27487,27488,27494,27496,27501,27503,27508,27510,27514],{"type":51,"value":11978},{"type":46,"tag":80,"props":27489,"children":27491},{"className":27490},[],[27492],{"type":51,"value":27493},"getWalletClient()",{"type":51,"value":27495}," from ",{"type":46,"tag":80,"props":27497,"children":27499},{"className":27498},[],[27500],{"type":51,"value":19670},{"type":51,"value":27502}," instead of the ",{"type":46,"tag":80,"props":27504,"children":27506},{"className":27505},[],[27507],{"type":51,"value":17129},{"type":51,"value":27509}," hook (see ",{"type":46,"tag":300,"props":27511,"children":27512},{"href":17134},[27513],{"type":51,"value":17137},{"type":51,"value":842},{"type":46,"tag":101,"props":27516,"children":27517},{},[27518,27526],{"type":46,"tag":123,"props":27519,"children":27520},{},[27521],{"type":46,"tag":72,"props":27522,"children":27523},{},[27524],{"type":51,"value":27525},"\"Please provide a chain with the chain argument\"",{"type":46,"tag":123,"props":27527,"children":27528},{},[27529,27531,27536,27537],{"type":51,"value":27530},"Pass ",{"type":46,"tag":80,"props":27532,"children":27534},{"className":27533},[],[27535],{"type":51,"value":1094},{"type":51,"value":11729},{"type":46,"tag":80,"props":27538,"children":27540},{"className":27539},[],[27541],{"type":51,"value":20513},{"type":46,"tag":101,"props":27543,"children":27544},{},[27545,27553],{"type":46,"tag":123,"props":27546,"children":27547},{},[27548],{"type":46,"tag":72,"props":27549,"children":27550},{},[27551],{"type":51,"value":27552},"Chain mismatch error on swap",{"type":46,"tag":123,"props":27554,"children":27555},{},[27556,27558,27563,27565,27570,27572,27576],{"type":51,"value":27557},"Call ",{"type":46,"tag":80,"props":27559,"children":27561},{"className":27560},[],[27562],{"type":51,"value":20524},{"type":51,"value":27564}," before ",{"type":46,"tag":80,"props":27566,"children":27568},{"className":27567},[],[27569],{"type":51,"value":27493},{"type":51,"value":27571}," (see ",{"type":46,"tag":300,"props":27573,"children":27574},{"href":17134},[27575],{"type":51,"value":17137},{"type":51,"value":842},{"type":46,"tag":172,"props":27578,"children":27580},{"id":27579},"api-validation-errors-400",[27581],{"type":51,"value":27582},"API Validation Errors (400)",{"type":46,"tag":93,"props":27584,"children":27585},{},[27586,27607],{"type":46,"tag":97,"props":27587,"children":27588},{},[27589],{"type":46,"tag":101,"props":27590,"children":27591},{},[27592,27597,27602],{"type":46,"tag":105,"props":27593,"children":27594},{},[27595],{"type":51,"value":27596},"Error Message",{"type":46,"tag":105,"props":27598,"children":27599},{},[27600],{"type":51,"value":27601},"Cause",{"type":46,"tag":105,"props":27603,"children":27604},{},[27605],{"type":51,"value":27606},"Fix",{"type":46,"tag":116,"props":27608,"children":27609},{},[27610,27637,27669,27716],{"type":46,"tag":101,"props":27611,"children":27612},{},[27613,27622,27632],{"type":46,"tag":123,"props":27614,"children":27615},{},[27616],{"type":46,"tag":80,"props":27617,"children":27619},{"className":27618},[],[27620],{"type":51,"value":27621},"\"permitData\" must be of type object",{"type":46,"tag":123,"props":27623,"children":27624},{},[27625,27627],{"type":51,"value":27626},"Sending ",{"type":46,"tag":80,"props":27628,"children":27630},{"className":27629},[],[27631],{"type":51,"value":4022},{"type":46,"tag":123,"props":27633,"children":27634},{},[27635],{"type":51,"value":27636},"Omit the field entirely when null",{"type":46,"tag":101,"props":27638,"children":27639},{},[27640,27648,27658],{"type":46,"tag":123,"props":27641,"children":27642},{},[27643],{"type":46,"tag":80,"props":27644,"children":27646},{"className":27645},[],[27647],{"type":51,"value":11869},{"type":46,"tag":123,"props":27649,"children":27650},{},[27651,27653],{"type":51,"value":27652},"Wrapping quote in ",{"type":46,"tag":80,"props":27654,"children":27656},{"className":27655},[],[27657],{"type":51,"value":3980},{"type":46,"tag":123,"props":27659,"children":27660},{},[27661,27663],{"type":51,"value":27662},"Spread quote response: ",{"type":46,"tag":80,"props":27664,"children":27666},{"className":27665},[],[27667],{"type":51,"value":27668},"{...quoteResponse}",{"type":46,"tag":101,"props":27670,"children":27671},{},[27672,27680,27699],{"type":46,"tag":123,"props":27673,"children":27674},{},[27675],{"type":46,"tag":80,"props":27676,"children":27678},{"className":27677},[],[27679],{"type":51,"value":11869},{"type":46,"tag":123,"props":27681,"children":27682},{},[27683,27685,27690,27692,27697],{"type":51,"value":27684},"Including ",{"type":46,"tag":80,"props":27686,"children":27688},{"className":27687},[],[27689],{"type":51,"value":2431},{"type":51,"value":27691}," in a UniswapX (DUTCH_V2\u002FV3\u002FPRIORITY) ",{"type":46,"tag":80,"props":27693,"children":27695},{"className":27694},[],[27696],{"type":51,"value":4066},{"type":51,"value":27698}," body",{"type":46,"tag":123,"props":27700,"children":27701},{},[27702,27704,27709,27711],{"type":51,"value":27703},"Omit ",{"type":46,"tag":80,"props":27705,"children":27707},{"className":27706},[],[27708],{"type":51,"value":2431},{"type":51,"value":27710}," for UniswapX routes — see ",{"type":46,"tag":300,"props":27712,"children":27713},{"href":4071},[27714],{"type":51,"value":27715},"Signing vs. Submission",{"type":46,"tag":101,"props":27717,"children":27718},{},[27719,27728,27733],{"type":46,"tag":123,"props":27720,"children":27721},{},[27722],{"type":46,"tag":80,"props":27723,"children":27725},{"className":27724},[],[27726],{"type":51,"value":27727},"signature and permitData must both be present",{"type":46,"tag":123,"props":27729,"children":27730},{},[27731],{"type":51,"value":27732},"Including only one Permit2 field (CLASSIC routes only)",{"type":46,"tag":123,"props":27734,"children":27735},{},[27736,27738,27743],{"type":51,"value":27737},"Include both or neither for CLASSIC; omit ",{"type":46,"tag":80,"props":27739,"children":27741},{"className":27740},[],[27742],{"type":51,"value":2431},{"type":51,"value":27744}," for UniswapX",{"type":46,"tag":172,"props":27746,"children":27748},{"id":27747},"api-error-codes",[27749],{"type":51,"value":27750},"API Error Codes",{"type":46,"tag":93,"props":27752,"children":27753},{},[27754,27769],{"type":46,"tag":97,"props":27755,"children":27756},{},[27757],{"type":46,"tag":101,"props":27758,"children":27759},{},[27760,27764],{"type":46,"tag":105,"props":27761,"children":27762},{},[27763],{"type":51,"value":9569},{"type":46,"tag":105,"props":27765,"children":27766},{},[27767],{"type":51,"value":27768},"Meaning",{"type":46,"tag":116,"props":27770,"children":27771},{},[27772,27785,27798,27811,27824],{"type":46,"tag":101,"props":27773,"children":27774},{},[27775,27780],{"type":46,"tag":123,"props":27776,"children":27777},{},[27778],{"type":51,"value":27779},"400",{"type":46,"tag":123,"props":27781,"children":27782},{},[27783],{"type":51,"value":27784},"Invalid request parameters (see validation errors above)",{"type":46,"tag":101,"props":27786,"children":27787},{},[27788,27793],{"type":46,"tag":123,"props":27789,"children":27790},{},[27791],{"type":51,"value":27792},"401",{"type":46,"tag":123,"props":27794,"children":27795},{},[27796],{"type":51,"value":27797},"Invalid or missing API key",{"type":46,"tag":101,"props":27799,"children":27800},{},[27801,27806],{"type":46,"tag":123,"props":27802,"children":27803},{},[27804],{"type":51,"value":27805},"404",{"type":46,"tag":123,"props":27807,"children":27808},{},[27809],{"type":51,"value":27810},"No route found for pair",{"type":46,"tag":101,"props":27812,"children":27813},{},[27814,27819],{"type":46,"tag":123,"props":27815,"children":27816},{},[27817],{"type":51,"value":27818},"429",{"type":46,"tag":123,"props":27820,"children":27821},{},[27822],{"type":51,"value":27823},"Rate limit exceeded",{"type":46,"tag":101,"props":27825,"children":27826},{},[27827,27831],{"type":46,"tag":123,"props":27828,"children":27829},{},[27830],{"type":51,"value":17058},{"type":46,"tag":123,"props":27832,"children":27833},{},[27834],{"type":51,"value":27835},"API error - implement exponential backoff retry",{"type":46,"tag":172,"props":27837,"children":27839},{"id":27838},"pre-broadcast-checklist",[27840],{"type":51,"value":27841},"Pre-Broadcast Checklist",{"type":46,"tag":54,"props":27843,"children":27844},{},[27845],{"type":51,"value":27846},"Before sending a swap transaction to the blockchain:",{"type":46,"tag":10532,"props":27848,"children":27849},{},[27850,27880,27905,27915,27925],{"type":46,"tag":723,"props":27851,"children":27852},{},[27853,27863,27865,27871,27873,27879],{"type":46,"tag":72,"props":27854,"children":27855},{},[27856,27858],{"type":51,"value":27857},"Verify ",{"type":46,"tag":80,"props":27859,"children":27861},{"className":27860},[],[27862],{"type":51,"value":27335},{"type":51,"value":27864}," is non-empty hex (not ",{"type":46,"tag":80,"props":27866,"children":27868},{"className":27867},[],[27869],{"type":51,"value":27870},"''",{"type":51,"value":27872},", not ",{"type":46,"tag":80,"props":27874,"children":27876},{"className":27875},[],[27877],{"type":51,"value":27878},"'0x'",{"type":51,"value":842},{"type":46,"tag":723,"props":27881,"children":27882},{},[27883,27888,27890,27896,27897,27903],{"type":46,"tag":72,"props":27884,"children":27885},{},[27886],{"type":51,"value":27887},"Verify addresses",{"type":51,"value":27889}," - ",{"type":46,"tag":80,"props":27891,"children":27893},{"className":27892},[],[27894],{"type":51,"value":27895},"swap.to",{"type":51,"value":1764},{"type":46,"tag":80,"props":27898,"children":27900},{"className":27899},[],[27901],{"type":51,"value":27902},"swap.from",{"type":51,"value":27904}," are valid",{"type":46,"tag":723,"props":27906,"children":27907},{},[27908,27913],{"type":46,"tag":72,"props":27909,"children":27910},{},[27911],{"type":51,"value":27912},"Check quote freshness",{"type":51,"value":27914}," - Re-fetch if older than 30 seconds",{"type":46,"tag":723,"props":27916,"children":27917},{},[27918,27923],{"type":46,"tag":72,"props":27919,"children":27920},{},[27921],{"type":51,"value":27922},"Validate gas",{"type":51,"value":27924}," - Apply 10-20% buffer to estimates",{"type":46,"tag":723,"props":27926,"children":27927},{},[27928,27933],{"type":46,"tag":72,"props":27929,"children":27930},{},[27931],{"type":51,"value":27932},"Confirm balance",{"type":51,"value":27934}," - User has sufficient token balance",{"type":46,"tag":704,"props":27936,"children":27937},{},[],{"type":46,"tag":60,"props":27939,"children":27941},{"id":27940},"additional-resources",[27942],{"type":51,"value":27943},"Additional Resources",{"type":46,"tag":719,"props":27945,"children":27946},{},[27947,27957,27967,27977],{"type":46,"tag":723,"props":27948,"children":27949},{},[27950],{"type":46,"tag":300,"props":27951,"children":27954},{"href":27952,"rel":27953},"https:\u002F\u002Fgithub.com\u002FUniswap\u002Funiversal-router",[372],[27955],{"type":51,"value":27956},"Universal Router GitHub",{"type":46,"tag":723,"props":27958,"children":27959},{},[27960],{"type":46,"tag":300,"props":27961,"children":27964},{"href":27962,"rel":27963},"https:\u002F\u002Fdocs.uniswap.org",[372],[27965],{"type":51,"value":27966},"Uniswap Docs",{"type":46,"tag":723,"props":27968,"children":27969},{},[27970],{"type":46,"tag":300,"props":27971,"children":27974},{"href":27972,"rel":27973},"https:\u002F\u002Fgithub.com\u002FUniswap\u002Fsdks",[372],[27975],{"type":51,"value":27976},"SDK Monorepo",{"type":46,"tag":723,"props":27978,"children":27979},{},[27980],{"type":46,"tag":300,"props":27981,"children":27984},{"href":27982,"rel":27983},"https:\u002F\u002Fgithub.com\u002Fdragonfly-xyz\u002Fuseful-solidity-patterns\u002Ftree\u002Fmain\u002Fpatterns\u002Fpermit2",[372],[27985],{"type":51,"value":27986},"Permit2 Patterns",{"type":46,"tag":27988,"props":27989,"children":27990},"style",{},[27991],{"type":51,"value":27992},"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":27994,"total":2886},[27995,28011,28024,28035,28048,28061,28073],{"slug":27996,"name":27996,"fn":27997,"description":27998,"org":27999,"tags":28000,"stars":25,"repoUrl":26,"updatedAt":28010},"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},[28001,28004,28006,28009],{"name":28002,"slug":28003,"type":15},"Configuration","configuration",{"name":26833,"slug":28005,"type":15},"ethereum",{"name":28007,"slug":28008,"type":15},"Smart Contracts","smart-contracts",{"name":13,"slug":14,"type":15},"2026-07-17T06:08:08.974641",{"slug":28012,"name":28012,"fn":28013,"description":28014,"org":28015,"tags":28016,"stars":25,"repoUrl":26,"updatedAt":28023},"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},[28017,28020,28021,28022],{"name":28018,"slug":28019,"type":15},"Automation","automation",{"name":26833,"slug":28005,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-17T06:04:21.974052",{"slug":28025,"name":28025,"fn":28026,"description":28027,"org":28028,"tags":28029,"stars":25,"repoUrl":26,"updatedAt":28034},"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},[28030,28031,28032,28033],{"name":28018,"slug":28019,"type":15},{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-17T06:05:37.160647",{"slug":28036,"name":28036,"fn":28037,"description":28038,"org":28039,"tags":28040,"stars":25,"repoUrl":26,"updatedAt":28047},"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},[28041,28044,28045,28046],{"name":28042,"slug":28043,"type":15},"Deployment","deployment",{"name":26833,"slug":28005,"type":15},{"name":28007,"slug":28008,"type":15},{"name":13,"slug":14,"type":15},"2026-07-17T06:08:09.661977",{"slug":28049,"name":28049,"fn":28050,"description":28051,"org":28052,"tags":28053,"stars":25,"repoUrl":26,"updatedAt":28060},"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},[28054,28055,28058,28059],{"name":26833,"slug":28005,"type":15},{"name":28056,"slug":28057,"type":15},"Portfolio Management","portfolio-management",{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-17T06:04:22.328253",{"slug":28062,"name":28062,"fn":28063,"description":28064,"org":28065,"tags":28066,"stars":25,"repoUrl":26,"updatedAt":28072},"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},[28067,28068,28069,28071],{"name":17,"slug":18,"type":15},{"name":26833,"slug":28005,"type":15},{"name":28070,"slug":12995,"type":15},"Liquidity",{"name":13,"slug":14,"type":15},"2026-07-17T06:08:09.315325",{"slug":28074,"name":28074,"fn":28075,"description":28076,"org":28077,"tags":28078,"stars":25,"repoUrl":26,"updatedAt":28083},"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},[28079,28080,28081,28082],{"name":23,"slug":24,"type":15},{"name":17,"slug":18,"type":15},{"name":28070,"slug":12995,"type":15},{"name":13,"slug":14,"type":15},"2026-07-17T06:08:13.704465",{"items":28085,"total":2994},[28086,28093,28100,28107,28114,28121,28128,28135,28149,28160,28167,28178],{"slug":27996,"name":27996,"fn":27997,"description":27998,"org":28087,"tags":28088,"stars":25,"repoUrl":26,"updatedAt":28010},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[28089,28090,28091,28092],{"name":28002,"slug":28003,"type":15},{"name":26833,"slug":28005,"type":15},{"name":28007,"slug":28008,"type":15},{"name":13,"slug":14,"type":15},{"slug":28012,"name":28012,"fn":28013,"description":28014,"org":28094,"tags":28095,"stars":25,"repoUrl":26,"updatedAt":28023},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[28096,28097,28098,28099],{"name":28018,"slug":28019,"type":15},{"name":26833,"slug":28005,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":28025,"name":28025,"fn":28026,"description":28027,"org":28101,"tags":28102,"stars":25,"repoUrl":26,"updatedAt":28034},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[28103,28104,28105,28106],{"name":28018,"slug":28019,"type":15},{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":28036,"name":28036,"fn":28037,"description":28038,"org":28108,"tags":28109,"stars":25,"repoUrl":26,"updatedAt":28047},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[28110,28111,28112,28113],{"name":28042,"slug":28043,"type":15},{"name":26833,"slug":28005,"type":15},{"name":28007,"slug":28008,"type":15},{"name":13,"slug":14,"type":15},{"slug":28049,"name":28049,"fn":28050,"description":28051,"org":28115,"tags":28116,"stars":25,"repoUrl":26,"updatedAt":28060},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[28117,28118,28119,28120],{"name":26833,"slug":28005,"type":15},{"name":28056,"slug":28057,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":28062,"name":28062,"fn":28063,"description":28064,"org":28122,"tags":28123,"stars":25,"repoUrl":26,"updatedAt":28072},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[28124,28125,28126,28127],{"name":17,"slug":18,"type":15},{"name":26833,"slug":28005,"type":15},{"name":28070,"slug":12995,"type":15},{"name":13,"slug":14,"type":15},{"slug":28074,"name":28074,"fn":28075,"description":28076,"org":28129,"tags":28130,"stars":25,"repoUrl":26,"updatedAt":28083},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[28131,28132,28133,28134],{"name":23,"slug":24,"type":15},{"name":17,"slug":18,"type":15},{"name":28070,"slug":12995,"type":15},{"name":13,"slug":14,"type":15},{"slug":28136,"name":28136,"fn":28137,"description":28138,"org":28139,"tags":28140,"stars":25,"repoUrl":26,"updatedAt":28148},"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},[28141,28142,28145,28146],{"name":17,"slug":18,"type":15},{"name":28143,"slug":28144,"type":15},"Payments","payments",{"name":20,"slug":21,"type":15},{"name":28147,"slug":28147,"type":15},"x402","2026-07-17T06:04:29.756086",{"slug":28150,"name":28150,"fn":28151,"description":28152,"org":28153,"tags":28154,"stars":25,"repoUrl":26,"updatedAt":28159},"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},[28155,28156,28157,28158],{"name":23,"slug":24,"type":15},{"name":28143,"slug":28144,"type":15},{"name":13,"slug":14,"type":15},{"name":28147,"slug":28147,"type":15},"2026-07-17T06:07:38.795043",{"slug":4,"name":4,"fn":5,"description":6,"org":28161,"tags":28162,"stars":25,"repoUrl":26,"updatedAt":27},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[28163,28164,28165,28166],{"name":23,"slug":24,"type":15},{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":28168,"name":28168,"fn":28169,"description":28170,"org":28171,"tags":28172,"stars":25,"repoUrl":26,"updatedAt":28177},"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},[28173,28174,28175,28176],{"name":17,"slug":18,"type":15},{"name":28070,"slug":12995,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},"2026-07-17T06:08:10.008152",{"slug":28179,"name":28179,"fn":28180,"description":28181,"org":28182,"tags":28183,"stars":25,"repoUrl":26,"updatedAt":28187},"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},[28184,28185,28186],{"name":26833,"slug":28005,"type":15},{"name":28007,"slug":28008,"type":15},{"name":13,"slug":14,"type":15},"2026-07-17T06:04:19.17669"]