- Added extra natspecs

This commit is contained in:
eboado 2020-09-14 17:18:57 +02:00
parent 9d757aaa37
commit 6d96be5f42
3 changed files with 17 additions and 3 deletions

View File

@ -157,9 +157,16 @@ interface ILendingPool {
**/
function withdraw(address reserve, uint256 amount) external;
/**
* @dev Sets allowance to borrow on a certain type of debt asset for a certain user address
* @param asset The underlying asset of the debt token
* @param user The user to give allowance to
* @param interestRateMode Type of debt: 1 for stable, 2 for variable
* @param amount Allowance amount to borrow
**/
function delegateBorrowAllowance(
address user,
address asset,
address user,
uint256 interestRateMode,
uint256 amount
) external;

View File

@ -171,9 +171,16 @@ contract LendingPool is VersionedInitializable, ILendingPool {
_borrowAllowance[_reserves[asset].getDebtTokenAddress(interestRateMode)][fromUser][toUser];
}
/**
* @dev Sets allowance to borrow on a certain type of debt asset for a certain user address
* @param asset The underlying asset of the debt token
* @param user The user to give allowance to
* @param interestRateMode Type of debt: 1 for stable, 2 for variable
* @param amount Allowance amount to borrow
**/
function delegateBorrowAllowance(
address user,
address asset,
address user,
uint256 interestRateMode,
uint256 amount
) external override {

View File

@ -295,7 +295,7 @@ export const delegateBorrowAllowance = async (
const delegateAllowancePromise = pool
.connect(user.signer)
.delegateBorrowAllowance(receiver, reserve, interestRateMode, amountToDelegate.toString());
.delegateBorrowAllowance(reserve, receiver, interestRateMode, amountToDelegate.toString());
if (expectedResult === 'revert') {
await expect(delegateAllowancePromise, revertMessage).to.be.reverted;
return;