2022-03-22 15:24:40 +00:00
|
|
|
//SPDX-License-Identifier: MIT
|
2021-07-05 18:58:51 +00:00
|
|
|
pragma solidity ^0.7.0;
|
|
|
|
|
|
|
|
interface CTokenInterface {
|
|
|
|
function mint(uint mintAmount) external returns (uint);
|
|
|
|
function redeem(uint redeemTokens) external returns (uint);
|
|
|
|
function borrow(uint borrowAmount) external returns (uint);
|
|
|
|
function repayBorrow(uint repayAmount) external returns (uint);
|
|
|
|
function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint); // For ERC20
|
|
|
|
function liquidateBorrow(address borrower, uint repayAmount, address cTokenCollateral) external returns (uint);
|
|
|
|
|
|
|
|
function borrowBalanceCurrent(address account) external returns (uint);
|
|
|
|
function redeemUnderlying(uint redeemAmount) external returns (uint);
|
|
|
|
function exchangeRateCurrent() external returns (uint);
|
|
|
|
|
|
|
|
function balanceOf(address owner) external view returns (uint256 balance);
|
|
|
|
}
|
|
|
|
|
|
|
|
interface CETHInterface {
|
|
|
|
function mint() external payable;
|
|
|
|
function repayBorrow() external payable;
|
|
|
|
function repayBorrowBehalf(address borrower) external payable;
|
|
|
|
function liquidateBorrow(address borrower, address cTokenCollateral) external payable;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ComptrollerInterface {
|
|
|
|
function enterMarkets(address[] calldata cTokens) external returns (uint[] memory);
|
|
|
|
function exitMarket(address cTokenAddress) external returns (uint);
|
|
|
|
function getAssetsIn(address account) external view returns (address[] memory);
|
|
|
|
function getAccountLiquidity(address account) external view returns (uint, uint, uint);
|
|
|
|
function claimComp(address) external;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface CompoundMappingInterface {
|
|
|
|
function cTokenMapping(string calldata tokenId) external view returns (address);
|
|
|
|
function getMapping(string calldata tokenId) external view returns (address, address);
|
|
|
|
}
|
|
|
|
|
|
|
|
interface BComptrollerInterface {
|
|
|
|
function c2b(address ctoken) external view returns(address);
|
|
|
|
}
|