Basic

Deposit & Withdraw from DSA.

Basic-v1 connector triggers methods like deposit, withdraw.

  • 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.

Deposit

Deposit a token to DSA

spells.add({
  connector: "BASIC-A",
  method: "deposit",
  args: [token, amt, getId, setId]
});
Parameter Type Description
token address The address of the token to deposit. (For MATIC: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
amt uint256 The amount of tokens to deposit. (For max: `uint256(-1)` (Not valid for MATIC))
getId uint256 ID to retrieve amt.
setId uint256 ID stores the amount of tokens deposited.

Withdraw

Withdraw a token from DSA

spells.add({
  connector: "BASIC-A",
  method: "withdraw",
  args: [token, amt, to, getId, setId]
});
Parameter Type Description
token address The address of the token to withdraw. (For MATIC: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
amt uint The amount of tokens to withdraw. (For max: `uint256(-1)`)
to address The address to receive the token upon withdrawal
getId uint ID to retrieve amt.
setId uint ID stores the amount of tokens withdrawn.

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.