Deposit

Yearn Action Plugin - Deposit

Description

Deposits amount , issuing shares to recipient. If the Vault is in Emergency Shutdown, deposits will not be accepted and this call will fail.

Method

deposit(uint256, address)

Input Parameters

NamePlugin TypeDescription

to

FctAddress

yVault address

Method Parameters

NamePlugin TypeDescription

amount

FctValue

Amount deposited

recipient

FctAddress

Address to whom issue the shares

Returned Values

No values get returned

Example

Example with initParams

const deposit = new Yearn.actions.Deposit({
   chainId: 1,
   initParams: {
     to: "0xa258C4606Ca8206D8aA700cE2143D7db854D168c", // wETH yVault
     methodParams: {
       amount: "100000",
       recipient: "0x..."
     }
   }
})

Example without initParams

const deposit = new Yearn.actions.Deposit({ chainId: 1 })

deposit.input.set({
     to: "0xa258C4606Ca8206D8aA700cE2143D7db854D168c", // wETH yVault
     methodParams: {
       amount: "100000",
       recipient: "0x..."
     }
})

Learn more

Learn more about Yearn yVault deposit method here

Last updated