-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathComptrollerInterface.sol
87 lines (77 loc) · 3.09 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.22;
abstract 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 cTokens) external virtual returns (uint256[] memory);
function exitMarket(address cToken) external virtual returns (uint256);
function checkMembership(address account, address cToken) external view virtual returns (bool);
function enterMarketForCToken(address cToken, address account) external virtual returns (uint256);
/**
* Policy Hooks **
*/
function mintAllowed(address cToken, address minter, uint256 mintAmount) external virtual returns (uint256);
function mintVerify(address cToken, address minter, uint256 mintAmount, uint256 mintTokens) external virtual;
function redeemAllowed(address cToken, address redeemer, uint256 redeemTokens) external virtual returns (uint256);
function redeemVerify(address cToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens)
external
virtual;
function borrowAllowed(address cToken, address borrower, uint256 borrowAmount) external virtual returns (uint256);
function borrowVerify(address cToken, address borrower, uint256 borrowAmount) external virtual;
function repayBorrowAllowed(address cToken, address payer, address borrower, uint256 repayAmount)
external
virtual
returns (uint256);
function repayBorrowVerify(
address cToken,
address payer,
address borrower,
uint256 repayAmount,
uint256 borrowerIndex
) external virtual;
function liquidateBorrowAllowed(
address cTokenBorrowed,
address cTokenCollateral,
address liquidator,
address borrower,
uint256 repayAmount
) external virtual returns (uint256);
function liquidateBorrowVerify(
address cTokenBorrowed,
address cTokenCollateral,
address liquidator,
address borrower,
uint256 repayAmount,
uint256 seizeTokens
) external virtual;
function seizeAllowed(
address cTokenCollateral,
address cTokenBorrowed,
address liquidator,
address borrower,
uint256 seizeTokens
) external virtual returns (uint256);
function seizeVerify(
address cTokenCollateral,
address cTokenBorrowed,
address liquidator,
address borrower,
uint256 seizeTokens
) external virtual;
function transferAllowed(address cToken, address src, address dst, uint256 transferTokens)
external
virtual
returns (uint256);
function transferVerify(address cToken, address src, address dst, uint256 transferTokens) external virtual;
/**
* Liquidity/Liquidation Calculations **
*/
function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint256 repayAmount)
external
view
virtual
returns (uint256, uint256);
}