Yearn V2 - Mainnet

Vaults & yield. YearnV2-v1.0 connector on mainnet triggers methods like deposit, withdraw. 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

This will deposit funds to a specific Yearn Vault.

spells.add({  connector: "YEARN-VAULT-A",  method: "deposit",  args: [vault, amt, getId, setId]});
Parameter Type Description
vault address The address of the vault to deposit funds into.
amt uint256 The amount of tokens to deposit.
getId uint256 ID to retrieve amt.
setId uint256 ID stores the amount of shares received.

Withdraw

This will withdraw the share from a specific Yearn Vault.

spells.add({  connector: "YEARN-VAULT-A",  method: "withdraw",  args: [vault, amt, getId, setId]});
Parameter Type Description
vault address The address of the vault to withdraw shares from.
amt uint256 The amount of shares to withdraw.
getId uint256 ID to retrieve amt.
setId uint256 ID stores the amount want token redeemed.

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