UNISWAP-V3-SWAP-A - Mainnet

Decentralized Exchange. UniswapV3-Swap-v1 connector on mainnet triggers methods like buy, sell. You can view details like source code, ABIs on Etherscan.

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

Buy

Swap token(sellAddr) with token(buyAddr), buy token with minimum sell token

spells.add({  connector: "UNISWAP-V3-SWAP-A",  method: "buy",  args: [_buyAddr, _sellAddr, _fee, _unitAmt, _buyAmt, _getId, _setId]});
Parameter Type Description
_buyAddr address token to be bought
_sellAddr address token to be sold
_fee uint24 pool fees for buyAddr-sellAddr token pair
_unitAmt uint256 The unit amount of sellAmt/buyAmt with slippage
_buyAmt uint256 amount of token to be bought
_getId uint256 Id to get buyAmt
_setId uint256 Id to store sellAmt

Sell

Swap token(sellAddr) with token(buyAddr), buy token with minimum sell token

spells.add({  connector: "UNISWAP-V3-SWAP-A",  method: "sell",  args: [_buyAddr, _sellAddr, _fee, _unitAmt, _sellAmt, _getId, _setId]});
Parameter Type Description
_buyAddr address token to be bought
_sellAddr address token to be sold
_fee uint24 pool fees for buyAddr-sellAddr token pair
_unitAmt uint256 The unit amount of buyAmt/sellAmt with slippage
_sellAmt uint256 amount of token to be sold
_getId uint256 Id to get sellAmt
_setId uint256 Id to store buyAmt

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.

Table of Contents