SUSHISWAP - Arbitrum

Decentralized Exchange. Sushiswap-v1 connector on arbitrum triggers methods like deposit, withdraw, 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.

Deposit

Deposit Liquidity to a SushiSwap pool.

spells.add({  connector: "SUSHISWAP-A",  method: "deposit",  args: [tokenA, tokenB, amtA, unitAmt, slippage, getId, setId]});
Parameter Type Description
tokenA address The address of token A.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
tokenB address The address of token B.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
amtA uint256 The amount of A tokens to deposit.
unitAmt uint256 The unit amount of of amtB/amtA with slippage.
slippage uint256 Slippage amount.
getId uint256 ID to retrieve amtA.
setId uint256 ID stores the amount of pools tokens received.

Withdraw

Withdraw Liquidity from a SushiSwap pool.

spells.add({  connector: "SUSHISWAP-A",  method: "withdraw",  args: [tokenA, tokenB, uniAmt, unitAmtA, unitAmtB, getId, setIds]});
Parameter Type Description
tokenA address The address of token A.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
tokenB address The address of token B.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
uniAmt uint256 The amount of pool tokens to withdraw.
unitAmtA uint256 The unit amount of amtA/uniAmt with slippage.
unitAmtB uint256 The unit amount of amtB/uniAmt with slippage.
getId uint256 ID to retrieve uniAmt.
setIds uint256[] Array of IDs to store the amount tokens received.

Buy

Buy a token using a SushiSwap

spells.add({  connector: "SUSHISWAP-A",  method: "buy",  args: [buyAddr, sellAddr, buyAmt, unitAmt, getId, setId]});
Parameter Type Description
buyAddr address The address of the token to buy.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
sellAddr address The address of the token to sell.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
buyAmt uint256 The amount of tokens to buy.
unitAmt uint256 The unit amount of sellAmt/buyAmt with slippage.
getId uint256 ID to retrieve buyAmt.
setId uint256 ID to store the amount of tokens sold.

Sell

Sell a token using a SushiSwap

spells.add({  connector: "SUSHISWAP-A",  method: "sell",  args: [buyAddr, sellAddr, sellAmt, unitAmt, getId, setId]});
Parameter Type Description
buyAddr address The address of the token to buy.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
sellAddr address The address of the token to sell.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
sellAmt uint256 The amount of the token to sell.
unitAmt uint256 The unit amount of buyAmt/sellAmt with slippage.
getId uint256 ID to retrieve sellAmt.
setId uint256 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.

Table of Contents