How to find the Quoter Contract of Sepolia Testnet?
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 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?
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 ?
same issue i am facing it always revert for this quoter contract
I get the same issue on quoteExactInputSingle
i deployed new one quote v3 0x0227628f3F023bb0B980b67D528571c95c6DaC1c with pool address 0x0227628f3F023bb0B980b67D528571c95c6DaC1c. Hopefully it works for you guys
i deployed new one quote v3
0x0227628f3F023bb0B980b67D528571c95c6DaC1cwith 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 ?
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
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
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.
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:
- UniswapV3Factory - 0x0227628f3F023bb0B980b67D528571c95c6DaC1c.
- QuoterV2 - 0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3.
- SwapRouter02 - 0x3bfa4769fb09eefc5a80d6e87c3b9c650f7ae48e.
- UniswapV3Pool - 0x6Ce0896eAE6D4BD668fDe41BB784548fb8F59b50.
The UniswapV3Pool contract referenced above is the Pool Contract for the pair
WETH/USDConly. Make sure to fetch the correctUniswapV3Poolcontract for a pair other than WETH/USDC using thegetPoolfunction of the UniswapV3Factory Contract.
Hope this tutorial helps anyone stuck with UniswapV3. :)