Withdraw

Aave V2 Action Plugin - Withdraw

Description

Withdraws amount of the underlying asset, i.e. redeems the underlying token and burns the aTokens.

Method

withdraw(address, uint256, address)

Input Parameters

No required parameters.

Method Parameters

NamePlugin TypeDescription

asset

FctAddress

Address of the underlying asset

amount

FctValue

Amount deposited

to

FctAddress

Address that will receive the asset

Returned Values

No returned values

Example

Example with initParams

const withdraw = new AaveV2.actions.Withdraw({
   chainId: 1,
   initParams: {
     methodParams: {
       asset: "0x...",
       amount: "100000000",
       to: "0x..."
     }
   }
})

Example without initParams

const withdraw = new AaveV2.actions.Withdraw({ chainId: 1 })

withdraw.input.set({
    methodParams: {
       asset: "0x...",
       amount: "100000000",
       to: "0x..."
    }
})

Learn more

Learn more about Aave V2 withdraw function here

Last updated