mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
29 lines
970 B
Solidity
29 lines
970 B
Solidity
// SPDX-License-Identifier: agpl-3.0
|
|
pragma solidity 0.6.12;
|
|
|
|
interface ICreditDelegationToken {
|
|
event BorrowAllowanceDelegated(
|
|
address indexed fromUser,
|
|
address indexed toUser,
|
|
address asset,
|
|
uint256 amount
|
|
);
|
|
|
|
/**
|
|
* @dev delegates borrowing power to a user on the specific debt token
|
|
* @param delegatee the address receiving the delegated borrowing power
|
|
* @param amount the maximum amount being delegated. Delegation will still
|
|
* respect the liquidation constraints (even if delegated, a delegatee cannot
|
|
* force a delegator HF to go below 1)
|
|
**/
|
|
function approveDelegation(address delegatee, uint256 amount) external;
|
|
|
|
/**
|
|
* @dev returns the borrow allowance of the user
|
|
* @param fromUser The user to giving allowance
|
|
* @param toUser The user to give allowance to
|
|
* @return the current allowance of toUser
|
|
**/
|
|
function borrowAllowance(address fromUser, address toUser) external view returns (uint256);
|
|
}
|