Updated ILendingPool Interface

This commit is contained in:
Hadrien Charlanes 2021-04-01 14:23:31 +02:00
parent 2ae2680834
commit 566f9b1a5d

View File

@ -244,6 +244,55 @@ interface ILendingPool {
address onBehalfOf
) external returns (uint256);
/**
* @notice Deposit with transfer approval of asset to be deposited done via permit function
* see: https://eips.ethereum.org/EIPS/eip-2612 and https://eips.ethereum.org/EIPS/eip-713
* @param asset The address of the underlying asset to deposit
* @param amount The amount to be deposited
* @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user
* wants to receive them on his own wallet, or a different address if the beneficiary of aTokens
* is a different wallet
* @param referralCode Code used to register the integrator originating the operation, for potential rewards.
* 0 if the action is executed directly by the user, without any middle-man
* @param permitV V parameter of ERC712 permit sig
* @param permitR R parameter of ERC712 permit sig
* @param permitS S parameter of ERC712 permit sig
**/
function depositWithPermit(
address asset,
uint256 amount,
address onBehalfOf,
uint16 referralCode,
uint8 permitV,
bytes32 permitR,
bytes32 permitS
) external;
/**
* @notice Repay with transfer approval of asset to be repaid done via permit function
* see: https://eips.ethereum.org/EIPS/eip-2612 and https://eips.ethereum.org/EIPS/eip-713
* @param asset The address of the borrowed underlying asset previously borrowed
* @param amount The amount to repay
* - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`
* @param rateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable
* @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the
* user calling the function if he wants to reduce/remove his own debt, or the address of any other
* other borrower whose debt should be removed
* @param permitV V parameter of ERC712 permit sig
* @param permitR R parameter of ERC712 permit sig
* @param permitS S parameter of ERC712 permit sig
* @return The final amount repaid
**/
function repayWithPermit(
address asset,
uint256 amount,
uint256 rateMode,
address onBehalfOf,
uint8 permitV,
bytes32 permitR,
bytes32 permitS
) external returns (uint256);
/**
* @dev Allows a borrower to swap his debt between stable and variable mode, or viceversa
* @param asset The address of the underlying asset borrowed