--- name: avax-pharaoh description: Integrate current Pharaoh CL swaps with tick-spacing ABIs, separately from xPHAR voting and DLMM. --- # Pharaoh current CL integration 1. Resolve [current docs.phar.gg deployments](https://docs.phar.gg/pages/contract-addresses), not stale docs.pharaoh.exchange results. Current xPHAR governance, legacy AMM, RamsesV3 CL and DLMM are distinct. This recipe proves current CL, not DLMM. 2. Load `examples/protocols/pharaoh/recipe.mjs` and manifest.json from the executable bundle root. Factory: 0xAE6E5c62328ade73ceefD42228528b70c8157D0d; router: 0xc8B8fCbDb5C019D7802fFb0b39603395D7d3915c; QuoterV2: 0xB7297301b7CC659BB96D51754643A0Df6eEA2138; spacing-10 WAVAX/native-USDC pool: 0xf01449C0bA930B6e2CaCA3DEF3CCBd7a3E589534. Check live state, not the list alone. 3. Call `inspect({provider,blockTag,amountIn})`. Verify chain 43114, code/proxy hashes, factory/router/quoter deployer, pool/token order/spacing/liquidity, decimals and voter module binding. Default raw amount '10000000000000000' is 0.01 WAVAX, not native AVAX value. 4. Encode exactInputSingle tuple: tokenIn, tokenOut, int24 tickSpacing, recipient, deadline, amountIn, amountOutMinimum, sqrtPriceLimitX96. QuoterV2 orders amountIn BEFORE tickSpacing. Neither uses Uniswap's uint24 fee key. Call quoteExactInputSingle.staticCall despite nonpayable ABI: eth_call is nonpersistent. A reverting quote or existing empty pool is not executable liquidity. 5. Use samplePlanInput in common.mjs and `plan(input,evidence)`: action:'swap', chainId, owner, recipient, exact tokens/raw amounts, slippageBps and deadline. The planner binds the verified route, rejects mixed/stale evidence, arbitrary spender, native value and custom partial-fill price limit; returns allowance reset, exact router approval and unsigned swap. 6. Refresh after approvals and simulate the precise call. Run tests/live/fork commands below; reconcile exact input/output deltas and consumed allowance. The fork proves minimum-output rejection and successful stateful swap; no public writes occur. ```sh node --test examples/protocols/pharaoh/recipe.test.mjs node research/parity-dexes/run-live.mjs node research/parity-dexes/fork-execution.mjs ``` ## Separate governance and claims Current Voter.vote takes a user address plus pools/weights, not a veNFT tokenId. VoteModule supplies xPHAR staking/delegation context: inspect stakingToken, balance, cooldown/delegate controls and live gauges. CL claims use NFT-position IDs and overloaded claimClGaugeRewards methods; incentives use owner/distributor/token arrays. The swap planner rejects these actions. Current documentation lists PHAR 0x13A466998Ce03Db73aBc2d4DF3bBD845Ed1f28E7 and xPHAR 0xE8164Ea89665DAb7a553e667F81F30CfDA736B9A. These identifiers do not establish tested buying, staking, voting or claiming. DLMM requires separate router/quoter and bin accounting. **Deliver:** engine/version identity; amount-sensitive quote; bounded unsigned plan; simulation; local/public label; unsupported scope. Evidence expires after 300 seconds; deadline is future and at most600 seconds. Bytecode identity is not an audit. Sources: [deployments](https://docs.phar.gg/pages/contract-addresses), [CL](https://docs.phar.gg/pages/concentrated-liquidity), [DLMM](https://docs.phar.gg/pages/dlmm), [voting](https://docs.phar.gg/pages/voting), pinned ABI provenance in manifest.json.