forked from Benqi-fi/BENQI-Smart-Contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ComptrollerInterface.sol
71 lines (58 loc) · 2.55 KB
/
ComptrollerInterface.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
pragma solidity 0.5.17;
contract ComptrollerInterface {
/// @notice Indicator that this is a Comptroller contract (for inspection)
bool public constant isComptroller = true;
/*** Assets You Are In ***/
function enterMarkets(address[] calldata qiTokens) external returns (uint[] memory);
function exitMarket(address qiToken) external returns (uint);
/*** Policy Hooks ***/
function mintAllowed(address qiToken, address minter, uint mintAmount) external returns (uint);
function mintVerify(address qiToken, address minter, uint mintAmount, uint mintTokens) external;
function redeemAllowed(address qiToken, address redeemer, uint redeemTokens) external returns (uint);
function redeemVerify(address qiToken, address redeemer, uint redeemAmount, uint redeemTokens) external;
function borrowAllowed(address qiToken, address borrower, uint borrowAmount) external returns (uint);
function borrowVerify(address qiToken, address borrower, uint borrowAmount) external;
function repayBorrowAllowed(
address qiToken,
address payer,
address borrower,
uint repayAmount) external returns (uint);
function repayBorrowVerify(
address qiToken,
address payer,
address borrower,
uint repayAmount,
uint borrowerIndex) external;
function liquidateBorrowAllowed(
address qiTokenBorrowed,
address qiTokenCollateral,
address liquidator,
address borrower,
uint repayAmount) external returns (uint);
function liquidateBorrowVerify(
address qiTokenBorrowed,
address qiTokenCollateral,
address liquidator,
address borrower,
uint repayAmount,
uint seizeTokens) external;
function seizeAllowed(
address qiTokenCollateral,
address qiTokenBorrowed,
address liquidator,
address borrower,
uint seizeTokens) external returns (uint);
function seizeVerify(
address qiTokenCollateral,
address qiTokenBorrowed,
address liquidator,
address borrower,
uint seizeTokens) external;
function transferAllowed(address qiToken, address src, address dst, uint transferTokens) external returns (uint);
function transferVerify(address qiToken, address src, address dst, uint transferTokens) external;
/*** Liquidity/Liquidation Calculations ***/
function liquidateCalculateSeizeTokens(
address qiTokenBorrowed,
address qiTokenCollateral,
uint repayAmount) external view returns (uint, uint);
}