Closed erencelik closed 6 months ago
I'm able to use IQuoter functionalities with ethersjs however I couldn't make a successful call through my contract.
Here is the code snippet; All parameters are valid and works on v2 amountOut calculation.
(bool success, bytes memory data) = quoter.staticcall( abi.encodeWithSelector( IQuoter.quoteExactInputSingle.selector, _tokenIn, _tokenOut, _poolFee, _amount, 0 ) ); require(success, "staticcall failed on Quoter"); return abi.decode(data, (uint256));
P.S. : I also tried encoding staticcall data by using abi.encodeWithSignature but it has no effect.
nvm. it seems quoter itself obtains pool from it's own factory means it only support uniswap pools unless other defis deploy their own quoters so I'm closing this.
I'm able to use IQuoter functionalities with ethersjs however I couldn't make a successful call through my contract.
Here is the code snippet; All parameters are valid and works on v2 amountOut calculation.
P.S. : I also tried encoding staticcall data by using abi.encodeWithSignature but it has no effect.