I’m trying to get Uniswap v3 IQuoter.quoteExactInputSingle() or IQuoterV2.quoteExactInputSingle()in Arbitrum / Base networks in my solidity contract. In both cases Remix show me that decoded output is just ‘-‘.
What can be wrong with it? All addresses are correct and token pools/pairs existed.
function verifyV3PriceV2(uint amountIn, address tokenIn, address tokenOut) external returns (uint) {
IQuoterV2.QuoteExactInputSingleParams memory params = IQuoterV2.QuoteExactInputSingleParams({
tokenIn: tokenIn,
tokenOut: tokenOut,
fee: 3000,
amountIn: amountIn,
sqrtPriceLimitX96: 0
});
uint amountOut;
(amountOut,,,) = IQuoterV2(0x61fFE014bA17989E743c5F6cB21bF9697530B21e).quoteExactInputSingle(params);
// uint amountOut = IQuoter(0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6).quoteExactInputSingle(WETH, tokenAddress, 10000, amountIn, 0);
return amountOut;
}
remix decoded output
I’ve tried different networks and tokens. On remix Ethereum fork, this code worked.
Rodion Krat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.