-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add script to generate contracts documentation
- Loading branch information
1 parent
e0647f8
commit efeee6b
Showing
30 changed files
with
5,278 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,285 @@ | ||
# CTokenInterface.sol | ||
|
||
View Source: [contracts/lib/CTokenInterface.sol](../contracts/lib/CTokenInterface.sol) | ||
|
||
**CTokenInterface** | ||
|
||
## Contract Members | ||
**Constants & Variables** | ||
|
||
```js | ||
address public underlying; | ||
uint256 public initialExchangeRateMantissa; | ||
|
||
``` | ||
|
||
## Functions | ||
|
||
- [transfer(address dst, uint256 amount)](#transfer) | ||
- [transferFrom(address src, address dst, uint256 amount)](#transferfrom) | ||
- [approve(address spender, uint256 amount)](#approve) | ||
- [allowance(address owner, address spender)](#allowance) | ||
- [balanceOf(address owner)](#balanceof) | ||
- [balanceOfUnderlying(address owner)](#balanceofunderlying) | ||
- [getAccountSnapshot(address account)](#getaccountsnapshot) | ||
- [borrowRatePerBlock()](#borrowrateperblock) | ||
- [supplyRatePerBlock()](#supplyrateperblock) | ||
- [totalBorrowsCurrent()](#totalborrowscurrent) | ||
- [borrowBalanceCurrent(address account)](#borrowbalancecurrent) | ||
- [borrowBalanceStored(address account)](#borrowbalancestored) | ||
- [exchangeRateCurrent()](#exchangeratecurrent) | ||
- [exchangeRateStored()](#exchangeratestored) | ||
- [getCash()](#getcash) | ||
- [accrueInterest()](#accrueinterest) | ||
- [seize(address liquidator, address borrower, uint256 seizeTokens)](#seize) | ||
|
||
### transfer | ||
|
||
```js | ||
function transfer(address dst, uint256 amount) external nonpayable | ||
returns(bool) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
| dst | address | | | ||
| amount | uint256 | | | ||
|
||
### transferFrom | ||
|
||
```js | ||
function transferFrom(address src, address dst, uint256 amount) external nonpayable | ||
returns(bool) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
| src | address | | | ||
| dst | address | | | ||
| amount | uint256 | | | ||
|
||
### approve | ||
|
||
```js | ||
function approve(address spender, uint256 amount) external nonpayable | ||
returns(bool) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
| spender | address | | | ||
| amount | uint256 | | | ||
|
||
### allowance | ||
|
||
```js | ||
function allowance(address owner, address spender) external view | ||
returns(uint256) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
| owner | address | | | ||
| spender | address | | | ||
|
||
### balanceOf | ||
|
||
```js | ||
function balanceOf(address owner) external view | ||
returns(uint256) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
| owner | address | | | ||
|
||
### balanceOfUnderlying | ||
|
||
```js | ||
function balanceOfUnderlying(address owner) external nonpayable | ||
returns(uint256) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
| owner | address | | | ||
|
||
### getAccountSnapshot | ||
|
||
```js | ||
function getAccountSnapshot(address account) external view | ||
returns(uint256, uint256, uint256, uint256) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
| account | address | | | ||
|
||
### borrowRatePerBlock | ||
|
||
```js | ||
function borrowRatePerBlock() external view | ||
returns(uint256) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
|
||
### supplyRatePerBlock | ||
|
||
```js | ||
function supplyRatePerBlock() external view | ||
returns(uint256) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
|
||
### totalBorrowsCurrent | ||
|
||
```js | ||
function totalBorrowsCurrent() external nonpayable | ||
returns(uint256) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
|
||
### borrowBalanceCurrent | ||
|
||
```js | ||
function borrowBalanceCurrent(address account) external nonpayable | ||
returns(uint256) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
| account | address | | | ||
|
||
### borrowBalanceStored | ||
|
||
```js | ||
function borrowBalanceStored(address account) public view | ||
returns(uint256) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
| account | address | | | ||
|
||
### exchangeRateCurrent | ||
|
||
```js | ||
function exchangeRateCurrent() public nonpayable | ||
returns(uint256) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
|
||
### exchangeRateStored | ||
|
||
```js | ||
function exchangeRateStored() public view | ||
returns(uint256) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
|
||
### getCash | ||
|
||
```js | ||
function getCash() external view | ||
returns(uint256) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
|
||
### accrueInterest | ||
|
||
```js | ||
function accrueInterest() public nonpayable | ||
returns(uint256) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
|
||
### seize | ||
|
||
```js | ||
function seize(address liquidator, address borrower, uint256 seizeTokens) external nonpayable | ||
returns(uint256) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
| liquidator | address | | | ||
| borrower | address | | | ||
| seizeTokens | uint256 | | | ||
|
||
## Contracts | ||
|
||
* [CompoundOracleInterface](CompoundOracleInterface.md) | ||
* [Context](Context.md) | ||
* [CTokenInterface](CTokenInterface.md) | ||
* [Dai](Dai.md) | ||
* [ERC20](ERC20.md) | ||
* [ERC20Detailed](ERC20Detailed.md) | ||
* [ERC20Mintable](ERC20Mintable.md) | ||
* [IERC20](IERC20.md) | ||
* [IOptionsExchange](IOptionsExchange.md) | ||
* [LibNote](LibNote.md) | ||
* [Migrations](Migrations.md) | ||
* [MinterRole](MinterRole.md) | ||
* [MockCompoundOracle](MockCompoundOracle.md) | ||
* [MockUniswapFactory](MockUniswapFactory.md) | ||
* [OptionsContract](OptionsContract.md) | ||
* [OptionsExchange](OptionsExchange.md) | ||
* [OptionsFactory](OptionsFactory.md) | ||
* [OptionsUtils](OptionsUtils.md) | ||
* [Oracle](Oracle.md) | ||
* [oToken](oToken.md) | ||
* [Ownable](Ownable.md) | ||
* [Roles](Roles.md) | ||
* [SafeMath](SafeMath.md) | ||
* [StringComparator](StringComparator.md) | ||
* [TestImports](TestImports.md) | ||
* [UniswapExchangeInterface](UniswapExchangeInterface.md) | ||
* [UniswapFactoryInterface](UniswapFactoryInterface.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# CompoundOracleInterface.sol | ||
|
||
View Source: [contracts/lib/CompoundOracleInterface.sol](../contracts/lib/CompoundOracleInterface.sol) | ||
|
||
**CompoundOracleInterface** | ||
|
||
## Functions | ||
|
||
- [()](#) | ||
- [getPrice(address asset)](#getprice) | ||
- [getUnderlyingPrice(ERC20 cToken)](#getunderlyingprice) | ||
|
||
### | ||
|
||
```js | ||
function () public nonpayable | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
|
||
### getPrice | ||
|
||
retrieves price of an asset | ||
|
||
```js | ||
function getPrice(address asset) public view | ||
returns(uint256) | ||
``` | ||
|
||
**Returns** | ||
|
||
uint mantissa of asset price (scaled by 1e18) or zero if unset or contract paused | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
| asset | address | Asset for which to get the price | | ||
|
||
### getUnderlyingPrice | ||
|
||
```js | ||
function getUnderlyingPrice(ERC20 cToken) public view | ||
returns(uint256) | ||
``` | ||
|
||
**Arguments** | ||
|
||
| Name | Type | Description | | ||
| ------------- |------------- | -----| | ||
| cToken | ERC20 | | | ||
|
||
## Contracts | ||
|
||
* [CompoundOracleInterface](CompoundOracleInterface.md) | ||
* [Context](Context.md) | ||
* [CTokenInterface](CTokenInterface.md) | ||
* [Dai](Dai.md) | ||
* [ERC20](ERC20.md) | ||
* [ERC20Detailed](ERC20Detailed.md) | ||
* [ERC20Mintable](ERC20Mintable.md) | ||
* [IERC20](IERC20.md) | ||
* [IOptionsExchange](IOptionsExchange.md) | ||
* [LibNote](LibNote.md) | ||
* [Migrations](Migrations.md) | ||
* [MinterRole](MinterRole.md) | ||
* [MockCompoundOracle](MockCompoundOracle.md) | ||
* [MockUniswapFactory](MockUniswapFactory.md) | ||
* [OptionsContract](OptionsContract.md) | ||
* [OptionsExchange](OptionsExchange.md) | ||
* [OptionsFactory](OptionsFactory.md) | ||
* [OptionsUtils](OptionsUtils.md) | ||
* [Oracle](Oracle.md) | ||
* [oToken](oToken.md) | ||
* [Ownable](Ownable.md) | ||
* [Roles](Roles.md) | ||
* [SafeMath](SafeMath.md) | ||
* [StringComparator](StringComparator.md) | ||
* [TestImports](TestImports.md) | ||
* [UniswapExchangeInterface](UniswapExchangeInterface.md) | ||
* [UniswapFactoryInterface](UniswapFactoryInterface.md) |
Oops, something went wrong.