Skip to content

sdk-core: correct deployment addresses and split Quoter/QuoterV2 #659

Description

@shuhuiluo

Summary

An independent programmatic verification compared the TypeScript address inventory at upstream commit 87069f5f with the official Uniswap deployment feed and explorer metadata.

The current TypeScript inventory has one field, quoterAddress, for two different deployed contracts, and has several stale or inherited addresses. The official feed is explicit about contract identity and chain: deployments.json was generated from Uniswap/contracts commit 37936185dee7decf681360ec799c124e0e034672.

The independent verification classified 20 TypeScript quoterAddress values that are actually QuoterV2 deployments, 15 values that are V1 while a distinct QuoterV2 deployment exists, and 23 additional address mismatches involving TickLens, Celo/Alfajores, SwapRouter02 fallbacks, Optimism V3Migrator, and Zora Sepolia. The counts include historical Goerli and Polygon Mumbai entries; those sunset networks should not block a current-network cleanup.

Requested changes

1. Add a separate quoterV2Address

ChainAddresses currently has quoterAddress but no quoterV2Address (source). Please distinguish the two contracts:

  • quoterAddress should mean the V1 Quoter contract only, and should be optional when V1 is not deployed.
  • quoterV2Address should mean the V2 QuoterV2 contract.
  • Do not silently put a QuoterV2 address in quoterAddress.
  • Export a corresponding QUOTER_V2_ADDRESSES map.

The active-chain examples are below.

Chain Current TypeScript quoterAddress Correct identity
Ethereum (1) 0xb27308f9f90d607463bb33ea1bebb41c27ce5ab6 V1 Quoter; add V2 0x61ffe014ba17989e743c5f6cb21bf9697530b21e
Arbitrum One (42161) 0xb27308f9f90d607463bb33ea1bebb41c27ce5ab6 V1 Quoter; add V2 0x61ffe014ba17989e743c5f6cb21bf9697530b21e
Base (8453) 0x3d4e44eb1374240ce5f1b871ab261cd16335b76a V1 0x222ca98f00ed15b1fae10b61c277703a194cf5d2; V2 is the current value
Celo (42220) 0x82825d0554fa07f7fc52ab63c961f330fdefa8e8 V1 0x5e55c9e631fae526cd4b0526c4818d6e0a9ef0e3; V2 is the current value
Monad (143) 0x2d01411773c8c24805306e89a41f7855c3c4fe65 V1 is the current value; add V2 0x661e93cca42afacb172121ef892830ca3b70f08d
Sepolia (11155111) 0xed1f6473345f45b75f8179591dd5ba1888cf2fb3 V2; V1 is not listed
Zora Sepolia (999999999) 0xc195976fef0985886e37036e2df62bf371e12df0 V2; V1 is not listed

The official feed labels V1 records as Quoter and links Quoter.sol; V2 records are separately labeled QuoterV2 and link QuoterV2.sol. For example: Ethereum V1 Quoter, Ethereum V2 Quoter, Base V1 Quoter, and Base V2 Quoter.

Some chains have multiple historical V1 deployments in the official records. The table preserves the address currently used by the SDK where it is a verified V1; the important correction is to expose the version explicitly and avoid treating a V2 deployment as V1.

2. Correct Celo and Celo Alfajores mappings

The TypeScript map currently aliases Alfajores to the Celo mainnet object (source):

[ChainId.CELO_ALFAJORES]: CELO_ADDRESSES

This is incorrect. The official Celo v3 deployment table has separate CELO and Alfajores columns, including distinct Factory, Multicall, TickLens, NFT Position Manager, V3Migrator, QuoterV2, and SwapRouter02 addresses. The v4 Celo deployment page confirms the Celo mainnet v4 addresses.

At minimum, the TypeScript inventory needs a separate Alfajores object with:

Contract Celo (42220) Alfajores (44787)
UniswapV3Factory 0xAfE208a311B21f13EF87E33A90049fC17A7acDEc 0x229Fd76DA9062C1a10eb4193768E192bdEA99572
Multicall2 0x633987602DE5C4F337e3DbF265303A1080324204 0x692A12C7C167c44e54c3d381CA3EE91F058Dc404
TickLens 0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D 0xFdACaEfB0f85C9BE9d319023453cC85C812d7e1E
NonfungiblePositionManager 0x3d79EdAaBC0EaB6F08ED885C05Fc0B014290D95A 0x0eC9d3C06Bc0A472A80085244d897bb604548824
V3Migrator 0x3cFd4d48EDfDCC53D3f173F596f621064614C582 0x245d3F47F55c532dbE9340368855Be631B162cfd
QuoterV2 0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8 0x3c1FCF8D6f3A579E98F4AE75EB0adA6de70f5673
SwapRouter02 0x5615CDAb10dc425a742d643d949a7F474C01abc4 0x8C456F41A3883bA0ba99f810F7A2Da54D9Ea3EF0

3. Fix TickLens and router entries

  • SEPOLIA_ADDRESSES.tickLensAddress currently repeats the multicall address 0xD7F33b.... The official feed identifies Sepolia TickLens as 0x0b343475d44EC2b4b8243EBF81dc888BF0A14b36; see the official record and Etherscan code page. The multicall address is separately verified here.
  • The common TickLens deployment 0xbfd8137f7d1516D3ea5cA83523914859ec47F573 is listed by the official feed for Ethereum, Arbitrum, Optimism, and Polygon (Ethereum record, Optimism record). Add the entries that are currently omitted from DEFAULT_ADDRESSES.
  • SWAP_ROUTER_02_ADDRESSES currently returns Ethereum’s 0x68b346... fallback whenever a chain has no explicit value (source). A fallback should not imply a deployment. Return an absent value unless the address is explicitly confirmed for that chain. This affects Celo, Alfajores, and Zora Sepolia.
  • Add Zora Sepolia SwapRouter02 0x6B36d761981d82B1e07cF3c4daF4cB4615c4850a; see the official record.

4. Remove the inherited V3Migrator address on Optimism

OPTIMISM_ADDRESSES inherits v3MigratorAddress from DEFAULT_ADDRESSES (source), incorrectly exposing 0xA5644E29708357803b5A882D272c41cC0dF92B34. Optimism has no V3Migrator deployment; this address is an EOA on OP Mainnet, not a contract. Remove the inherited field from the Optimism entry. The address is valid only on chains where it is explicitly deployed, such as Arbitrum and Polygon.

Explorer proof: https://explorer.optimism.io/address/0xa5644e29708357803b5a882d272c41cc0df92b34

Why Quoter and QuoterV2 must not be conflated

These are different contracts and different ABIs, not aliases:

  • Quoter.sol returns a scalar quote such as uint256 amountOut from quoteExactInputSingle.
  • QuoterV2.sol accepts parameter structs and returns additional data: sqrtPriceX96After, initializedTicksCrossed, and gasEstimate (and arrays of those values for path quotes).

Using a V2 address where callers expect V1 can change the function selector and ABI encoding/decoding. Using V1 where callers expect V2 loses the additional return data or fails outright. A single quoterAddress field therefore cannot accurately represent both deployments. The official feed itself distinguishes the records by contract name and source file.

Please update sdks/sdk-core/src/addresses.ts and add focused address-map coverage so these distinctions remain explicit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions