Aave – EoaAaveWithdrawal

Withdrawal an AAVE position from an EOA.

Methods

createWithdrawTx

Creates a Transaction object that withdraws an EOA's position from Aave.

createWithdrawTx(tokenAddress, withdrawToAddress, amount)

Parameters

tokenAddress
string
Required

The address of the token to be withdrawn.

withdrawToAddress
string
Required

The address to withdraw the assets to.

amount
float
Required

The amount of tokens to withdraw from Aave.

Returns

withdrawTx
Transaction

A transaction object that withdrawal's an EOA's position from Aave.



getPreExecTxs

Gets an array of required Transaction objects that need to be deployed before the returned Transaction from createWithdrawTx can be deployed.

getPreExecTxs(tokenAddress, amount)

Parameters

tokenAddress
string
Required

Address of the token to be withdrawn from Aave.

amount
float
Required

The number of tokens to be withdraw from an Aave position.

Returns

txs
[Transaction]

Array of Transaction objects representing transactions that need to be deployed before the returned Transaction from createWithdrawTx can be deployed.



verifyRequirements

Internal method that verifies that the parameters to getPreExecTxs & createWithdrawTx are correct.

verifyRequirements(tokenAddress, amount)

Parameters

tokenAddress
string
Required

Address of the token to be withdrawn from Aave.

amount
float
Required

The number of tokens to be withdraw from an Aave position.

Returns

parametersAreCorrect
bool

Bool indicating whether the parameters to getPreExecTxs & createWithdrawTx are correct.