-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure docs generation around mkdocs
- Loading branch information
Showing
23 changed files
with
361 additions
and
526 deletions.
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
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,67 @@ | ||
# Contributing guidelines | ||
|
||
## Table of Contents | ||
|
||
- [Table of Contents](#table-of-contents) | ||
- [Coding Style](#coding-style) | ||
- [Solidity](#solidity) | ||
- [JavaScript](#javascript) | ||
- [Python](#python) | ||
- [Documentation](#documentation) | ||
- [mkdocs](#mkdocs) | ||
|
||
## Coding Style | ||
|
||
### Solidity | ||
|
||
* Solidity portions of the codebase adhere follow the official [Solidity Styleguide] | ||
|
||
### JavaScript | ||
|
||
### Python | ||
|
||
* Python portions of the codebase follow standard PEP8 best practices. | ||
* Python code must be formatted using the Black formatter using the provided settings. | ||
|
||
## Documentation | ||
|
||
New addition to the codebase must be fully documented. | ||
|
||
- JavaScript portions of the code should be annotated using JSDoc style docstrings. | ||
- Solidity portions of the code should be fully annotated using [NatSpec] and [Solidity Domain for Sphinx]. | ||
|
||
Documentation is generated using [solidity-docgen] and rendered via [mkdocs]. | ||
[solidity-docgen] parses NatSpec and outputs `.md` files inside `docs/md-build` according | ||
to an Handlebars template located at `docs/solidity-docgen-templates/contract.hbs`. | ||
|
||
**NOTE:** Each `.sol` file should contain only one `Interface` or `Contract`. | ||
|
||
To build the documentation: | ||
|
||
```console | ||
yarn docs | ||
``` | ||
|
||
To serve the documentation | ||
|
||
```console | ||
yarn docs:serve | ||
``` | ||
|
||
### mkdocs | ||
|
||
To install [mkdocs] Python must be installed in the system. | ||
|
||
``` | ||
pip install docs/requirements.in | ||
``` | ||
|
||
**NOTE:** Working inside a virtual environment is highly recommended! | ||
|
||
--- | ||
|
||
[Solidity Styleguide]: https://solidity.readthedocs.io/en/v0.7.0/style-guide.html | ||
[NatSpec]: https://solidity.readthedocs.io/en/v0.7.0/style-guide.html#natspec | ||
[Write the Docs!]: docs/source/write_the_docs.rst | ||
[solidity-docgen]: https://github.com/OpenZeppelin/solidity-docgen | ||
[mkdocs]: https://www.mkdocs.org/ |
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,3 @@ | ||
# unifi | ||
|
||
A DFO protocol powered DeFi set of tools built on top of Uniswap. |
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
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,6 @@ | ||
pragma solidity ^0.6.0; | ||
|
||
// DOCUMENT | ||
interface IDoubleProxy { | ||
function proxy() external view returns (address); | ||
} |
6 changes: 6 additions & 0 deletions
6
contracts/stableCoin/standalone/IMWDFunctionalitiesManager.sol
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,6 @@ | ||
pragma solidity ^0.6.0; | ||
|
||
// DOCUMENT | ||
interface IMVDFunctionalitiesManager { | ||
function isAuthorizedFunctionality(address functionality) external view returns (bool); | ||
} |
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,17 @@ | ||
pragma solidity ^0.6.0; | ||
|
||
// DOCUMENT | ||
interface IMVDProxy { | ||
function getToken() external view returns (address); | ||
|
||
function getMVDFunctionalitiesManagerAddress() external view returns (address); | ||
|
||
function getMVDWalletAddress() external view returns (address); | ||
|
||
function getStateHolderAddress() external view returns (address); | ||
|
||
function submit(string calldata codeName, bytes calldata data) | ||
external | ||
payable | ||
returns (bytes memory returnData); | ||
} |
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
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,8 @@ | ||
pragma solidity ^0.6.0; | ||
|
||
// DOCUMENT | ||
interface IStateHolder { | ||
function getBool(string calldata varName) external view returns (bool); | ||
|
||
function getUint256(string calldata varName) external view returns (uint256); | ||
} |
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,32 @@ | ||
pragma solidity ^0.6.0; | ||
|
||
// DOCUMENT | ||
/** | ||
* @title Uniswap V2 Pair | ||
*/ | ||
interface IUniswapV2Pair { | ||
// DOCUMENT | ||
function decimals() external pure returns (uint8); | ||
|
||
// DOCUMENT | ||
function totalSupply() external view returns (uint256); | ||
|
||
// DOCUMENT | ||
function token0() external view returns (address); | ||
|
||
// DOCUMENT | ||
function token1() external view returns (address); | ||
|
||
// DOCUMENT | ||
function balanceOf(address account) external view returns (uint256); | ||
|
||
// DOCUMENT | ||
function getReserves() | ||
external | ||
view | ||
returns ( | ||
uint112 reserve0, | ||
uint112 reserve1, | ||
uint32 blockTimestampLast | ||
); | ||
} |
Oops, something went wrong.