generated from 0xDaksh/solidity-template
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathctoken.sol
66 lines (46 loc) · 2.13 KB
/
ctoken.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
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface CTokenInterface {
function mint(uint256 mintAmount) external returns (uint256);
function borrow(uint256 borrowAmount) external returns (uint256);
function repayBorrow(uint256 repayAmount) external returns (uint256);
function redeemUnderlying(uint256 redeemAmount) external returns (uint256);
function redeem(uint256 redeemTokens) external returns (uint256);
function exchangeRateCurrent() external returns (uint256);
function balanceOf(address owner) external view returns (uint256 balance);
function underlying() external view returns (address);
function approve(address, uint256) external;
function transfer(address, uint256) external returns (bool);
function balanceOfUnderlying(address owner) external returns (uint256);
function exchangeRateStored() external view returns (uint256);
function transferFrom(
address,
address,
uint256
) external returns (bool);
function getCash() external view returns (uint256);
function borrowBalanceCurrent(address account) external returns (uint256);
function totalBorrowsCurrent() external returns (uint256);
function totalSupply() external returns (uint256);
function supplyRatePerBlock() external view returns (uint256);
function borrowRatePerBlock() external view returns (uint256);
event Mint(address minter, uint256 mintAmount, uint256 mintTokens);
event Redeem(address redeemer, uint256 redeemAmount, uint256 redeemTokens);
event Borrow(address borrower, uint256 borrowAmount, uint256 accountBorrows, uint256 totalBorrows);
event RepayBorrow(
address payer,
address borrower,
uint256 repayAmount,
uint256 accountBorrows,
uint256 totalBorrows
);
event LiquidateBorrow(
address liquidator,
address borrower,
uint256 repayAmount,
address cTokenCollateral,
uint256 seizeTokens
);
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(address indexed owner, address indexed spender, uint256 amount);
}