docs icon indicating copy to clipboard operation
docs copied to clipboard

How to find the Quoter Contract of Sepolia Testnet?

Open liubin595338764 opened this issue 2 years ago • 10 comments

Hello, I am using the V3 SDK to getting a quote. It uses the 0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6 Quoter Contract on the Ethereum Mainnet for querying quotes.

However, I cannot find which Quoter Contract should be used on the Sepolia testnet?

Please kindly let me know.

// constants.ts
export const QUOTER_CONTRACT_ADDRESS =  '0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6'

// [quote.ts](https://github.com/Uniswap/examples/blob/main/v3-sdk/quoting/src/libs/quote.ts)
const quoterContract = new ethers.Contract(
  QUOTER_CONTRACT_ADDRESS,
  Quoter.abi,
  getProvider()
)

liubin595338764 avatar Jan 05 '24 08:01 liubin595338764

@liubin595338764 here's the list: https://docs.uniswap.org/contracts/v3/reference/deployments

Also, why I'm here, maybe you or anyone else knows which addresses should be used for tokens?

MetaMmodern avatar Feb 25 '24 22:02 MetaMmodern

It seems that the address for the quoter on sepolia is this 0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3 but always revert on quoteExactInputSingle function...can anyone tell me if it works ?

Valerione avatar Mar 30 '24 10:03 Valerione

same issue i am facing it always revert for this quoter contract

manavsharma136 avatar Apr 05 '24 06:04 manavsharma136

I get the same issue on quoteExactInputSingle

sajjadhs avatar Jul 22 '24 19:07 sajjadhs

i deployed new one quote v3 0x0227628f3F023bb0B980b67D528571c95c6DaC1c with pool address 0x0227628f3F023bb0B980b67D528571c95c6DaC1c. Hopefully it works for you guys

maxell1452 avatar Aug 19 '24 19:08 maxell1452

i deployed new one quote v3 0x0227628f3F023bb0B980b67D528571c95c6DaC1c with pool address 0x0227628f3F023bb0B980b67D528571c95c6DaC1c. Hopefully it works for you guys

Uhm, thanks, truly !! Forgive me for asking though, I am not sure how to quote from the mentionned contract, it really is a Factory contract, isn't it ?

tm-wong avatar Nov 18 '24 01:11 tm-wong

The address named as the Sepolia Quoter contract in the documentation is incorrect. In fact, this address does not contain a deployed contract. Therefore any attempt to call the Quoter methods will revert. I hope the Uniswap team will publish the correct address.

https://sepolia.etherscan.io/address/0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6

bazmatic avatar Nov 20 '24 08:11 bazmatic

The address named as the Sepolia Quoter contract in the documentation is incorrect. In fact, this address does not contain a deployed contract. Therefore any attempt to call the Quoter methods will revert. I hope the Uniswap team will publish the correct address.

https://sepolia.etherscan.io/address/0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6

They mentioned this contract ONLY for MAINNET, but not for Sepolia

here it is: https://docs.uniswap.org/contracts/v3/reference/deployments/ethereum-deployments - and there is only V2 Quoter avaiable for Sepolia

es-ua avatar Feb 02 '25 23:02 es-ua

Unfortunately, the Sepolia TestNet does not have the original Quoter contract deployed; it only has QuoterV2:
https://docs.uniswap.org/contracts/v3/reference/deployments/ethereum-deployments

The function quoteExactInputSingle is available in the original Quoter (v1), whereas in QuoterV2 you use quoteExactInput (for arbitrary paths) or quoteExactInputSingle but with a different interface for swap quoting.

The reason for incompatibility is that QuoterV2 is a redesigned contract with an updated API, which differs from v1. Therefore, calls written for v1 contracts will not work with v2 contracts without adaptation.

For QuoterV2, use the methods described in the official Uniswap V3 Quoter V2 documentation, for example:

  • quoteExactInput(bytes path, uint256 amountIn) — for arbitrary swap paths.
  • quoteExactOutput(bytes path, uint256 amountOut) — for reverse quoting.

Using these will allow you to correctly get the estimated amountOut before performing a swap on Sepolia.

WasonNotGit avatar May 07 '25 09:05 WasonNotGit

I came across a really nice tutorial on executing a Uniswap V3 Swap on the Ethereum Sepolia Network by QuickNode. The tutorial demonstrates the swap: WETH ---> USDC.

Notes: Make sure to copy the respective ABIs of all the contracts involved:

  1. UniswapV3Factory - 0x0227628f3F023bb0B980b67D528571c95c6DaC1c.
  2. QuoterV2 - 0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3.
  3. SwapRouter02 - 0x3bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e.
  4. UniswapV3Pool - 0x6Ce0896eAE6D4BD668fDe41BB784548fb8F59b50.

The UniswapV3Pool contract referenced above is the Pool Contract for the pair WETH/USDC only. Make sure to fetch the correct UniswapV3Pool contract for a pair other than WETH/USDC using the getPool function of the UniswapV3Factory Contract.

Hope this tutorial helps anyone stuck with UniswapV3. :)

achal-singh avatar May 28 '25 13:05 achal-singh