Skip to content

Commit

Permalink
Update docs to break out per file (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
venables authored Dec 8, 2022
1 parent 167e9d7 commit 4f28632
Show file tree
Hide file tree
Showing 44 changed files with 4,147 additions and 5,198 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ npx hardhat run scripts/deploy.ts
Documentation is generated by [solidity-docgen](https://github.com/OpenZeppelin/solidity-docgen)

```sh
npm run docs

# or

npx hardhat docgen
```

Expand Down Expand Up @@ -73,5 +77,5 @@ npx hardhat setPaused --help
Here is an example command to pause a hypothetical contract:

```sh
npx hardhat setPaused --address 0x5FbDB2315678afecb367f032d93F642f64180aa3 --paused true
npx hardhat setPaused --address 0x5FbDB2315678afecb367f032d93F642f64180aa3 --paused true
```
36 changes: 36 additions & 0 deletions docs/CollateralVault.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Solidity API

## CollateralVault

### _loan

```solidity
address _loan
```

### onlyLoan

```solidity
modifier onlyLoan()
```

### constructor

```solidity
constructor(address loan) public
```

### withdraw

```solidity
function withdraw(address asset, uint256 amount, address receiver) external
```

_Allows withdrawal of funds held by vault._

### withdrawERC721

```solidity
function withdrawERC721(address asset, uint256 tokenId, address receiver) external
```

30 changes: 30 additions & 0 deletions docs/FeeVault.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Solidity API

## FeeVault

### pool

```solidity
address pool
```

### onlyPoolAdmin

```solidity
modifier onlyPoolAdmin()
```

### constructor

```solidity
constructor(address pool_) public
```

### withdraw

```solidity
function withdraw(address asset, uint256 amount) external
```

_Allows withdrawal of fees held by vault._

55 changes: 55 additions & 0 deletions docs/FirstLossVault.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Solidity API

## FirstLossVault

### poolController

```solidity
address poolController
```

### _asset

```solidity
contract IERC20 _asset
```

### onlyPoolController

```solidity
modifier onlyPoolController()
```

_Modifier restricting access to pool_

### constructor

```solidity
constructor(address _poolController, address firstLossAsset) public
```

_Constructor for the vault_

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| _poolController | address | address of pool controller |
| firstLossAsset | address | asset held by vault |

### asset

```solidity
function asset() external view returns (address)
```

_Returns the asset held by the vault._

### withdraw

```solidity
function withdraw(uint256 amount, address receiver) external
```

_Allows withdrawal of funds held by vault._

47 changes: 47 additions & 0 deletions docs/FundingVault.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Solidity API

## FundingVault

### _loan

```solidity
address _loan
```

### asset

```solidity
contract IERC20 asset
```

### onlyLoan

```solidity
modifier onlyLoan()
```

_Modifier restricting access to pool_

### constructor

```solidity
constructor(address loan, address asset_) public
```

_Constructor for the vault_

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| loan | address | address of loan |
| asset_ | address | asset held by vault |

### withdraw

```solidity
function withdraw(uint256 amount, address receiver) external
```

_Allows withdrawal of funds held by vault._

Loading

0 comments on commit 4f28632

Please sign in to comment.