Basic

Deposit & Withdraw from DSA

Basic connector triggers the methods like deposit and withdraw of token in DSA. You can view details like source code, ABIs on Etherscan.


Deposit

Deposit tokens in DSA. Make sure user gave allowance to DSA.

Alternate way:- Transfer ETH / Tokens directly to DSA address.

spells.add({
  connector: "basic",
  method: "deposit",
  args: [token, amount, getId, setId]
});
ParameterTypeDescription
tokenaddressThe token address to deposit.
amountnumberThe amount of tokens to deposit. use -1 or `dsa.maxValue` to deposit 100%.
getIdnumberID fetches the amount of token to deposit.
setIdnumberID stores the amount of token deposited.

Withdraw

Withdraw tokens from DSA.

spells.add({
  connector: "basic",
  method: "withdraw",
  args: [token, amount, to, getId, setId]
});
ParameterTypeDescription
tokenaddressThe token address to withdraw.
amountnumberThe amount of tokens to withdraw. use -1 or `dsa.maxValue` to withdraw 100%.
toaddressThe `to` address to withdraw. `to` must be one of the authorities.
getIdnumberID fetches the amount of token to withdraw.
setIdnumberID stores the amount of token withdrawn.

If you still can't find something you're looking for or have any questions, ask them at our developers community on Telegram, 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.

Best way to stay connected with our progress.