Contributing guidelines
Table of Contents
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.
Documentation is generated using py-solidity-docgen and rendered via mkdocs.
py-solidity-docgen parses NatSpec and outputs .md
files inside docs/md-build
according
to a pre-specified Jinja2 template.
NOTE: Each .sol
file should contain only one Interface
or Contract
.
To build the documentation:
yarn docs:build
To serve the documentation
yarn docs:serve
mkdocs
To install mkdocs and py-solidity-docgen Python must be installed in the system.
pip install docs/requirements.in
NOTE: Working inside a virtual environment is highly recommended!