1Inch (on-chain) - Mainnet

On-chain and off-chian DEX Aggregator. 1Proto-v1.1 connector on mainnet triggers methods like sell, sellMulti. 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.

Sell

Swap tokens from exchanges like Uniswap, Kyber etc, with calculation done off-chain.

spells.add({  connector: "1INCH-B",  method: "sell",  args: [buyAddr, sellAddr, sellAmt, unitAmt, distribution, disableDexes, 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 uint The amount of the token to sell.
unitAmt uint The amount of buyAmt/sellAmt with slippage.
distribution uint[] The distribution of swap across different DEXs.
disableDexes uint Disable a dex. (To disable none: 0)
getId uint ID to retrieve sellAmt.
setId uint ID stores the amount of token brought.

SellMulti

Swap multiple tokens from exchanges like Uniswap, Kyber etc, with calculation done off-chain.

spells.add({  connector: "1INCH-B",  method: "sellMulti",  args: [tokens, sellAmt, unitAmt, distribution, disableDexes, getId, setId]});
Parameter Type Description
tokens address[] Array of tokens.
sellAmt uint The amount of the token to sell.
unitAmt uint The amount of buyAmt/sellAmt with slippage.
distribution uint[] The distribution of swap across different DEXs.
disableDexes uint[] Disable a dex. (To disable none: 0)
getId uint ID to retrieve sellAmt.
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.

Table of Contents