UNISWAP-V3-ROUTER - Polygon

DEX. UniswapV3-Auto-Router-v1 connector on polygon triggers methods like sell. You can view details like source code, ABIs on Polygonscan.

  • Use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee to indicate MATIC.
  • use -1 or dsa.maxValue for the maximum amount in function.
  • If not sure about the arguments getId and setId, pass 0.

Sell

Swap tokens from getting an optimized trade routes

spells.add({  connector: "UNISWAP-V3-ROUTER-A",  method: "sell",  args: [buyAddr, sellAddr, sellAmt, unitAmt, callData, setId]});
Parameter Type Description
buyAddr address The address of the token to buy.(For Matic: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
sellAddr address The address of the token to sell.(For Matic: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
sellAmt uint The amount of the token to sell.
unitAmt uint The amount of buyAmt/sellAmt with slippage.
callData bytes Data from Uniswap V3 auto router SDK. You can generate calldata and unitAmt using uniswap-v3-autorouter or using this API
setId uint ID stores the amount of token brought.

If you still can't find something you're looking for or have any questions, ask them at our developers community on Discord or simply send an Email.


Our team is excited about assisting you to build an application using Instadapp Developer Platform. Your questions and feedback help us make a better development environment for future developers.