8x Protocol enables decentralised recurring payments on the Ethereum blockchain. A complete explanation of the protocol may be found in our whitepaper.
We appreciate your desire to contribute to the 8x Protocol. We strive to maintain a high standard over code quality and the security of our contracts. Please read over this contributor guide before starting.
If you would like to contribute please fork the repo, create a new branch, fix the problem, commit the work with a clear message about what was accomplished, and submit a pull request.
- When adding functionality, please also add tests and make sure they pass
- When adding a new function, make sure to add comments that adhere to the format seen throughout the project
- When fixing conflicts please use
rebase
- When updating your working branch with
upstream master
changes, pleaserebase
- Make sure there are no linter
warnings
orerrors
Please setup your editor with the following settings for this project.
- 4 space(soft) indentation
- strip trailing whitespace
- 120 char max line length
The 8x Protocol uses Solhint to maintain high security and code standards within our project. We are following the code standards set forth in the Official Solidity Style Guide and the security standards outlined in the ConsenSys Guide for Smart Contracts.
Variables passed into a function should use mixedCase
, however, they should be prefixed with an _
. This tells us that it is an immutable
value passed into the function.
Example:
function example(address _exampleAddress)
public
{
...
}
- Atom
- Sublime Text 3
- Vim
- JetBrains IDEA, WebStorm, CLion, etc
- VS Code: Solidity by Juan Blanco
- VS Code: Solidity Language Support by CodeChain.io
Set a remote url for our upstream repo so you can keep your master branch unpolluted and updated.
git remote set-url upstream https://github.com/8xprotocol/contracts.git
- Truffle ^4.1.8
- Gananche UI
- NPM
npm install
npm install -g solhint
truffle test
npm run lint
npm run test