Contributing to Rheofi Protocol
Rheofi Protocol is open-source and welcomes contributions from the community. This guide covers how to set up your development environment, submit changes, and adhere to project coding standards.
Development Environment
- Clone the repository and install dependencies:
git clone https://github.com/rheofi/protocol-contracts.git
cd protocol-contracts
yarn install
- Compile contracts:
npx hardhat compile
- Run tests:
npx hardhat test
The project uses Hardhat as its development framework, with Solidity ^0.8.20 as the target compiler version.
Pull Request Process
- Fork the repository and create a feature branch from
develop. - Make your changes with clear, atomic commits.
- Ensure all existing tests pass and add new tests covering your changes.
- Run the linter and formatter before submitting:
yarn lint
yarn prettier:check
- Open a Pull Request against
developwith a descriptive title and summary. - A maintainer will review your PR. Address any feedback promptly.
Coding Standards
- Follow the Solidity Style Guide.
- Use NatSpec comments (
@notice,@param,@return) on all public and external functions. - Prefer
custom errorsoverrequirestrings for gas efficiency. - Keep functions short and single-purpose; extract shared logic into internal helpers.
- All state-changing functions must emit events.
- Use OpenZeppelin libraries for standard patterns (AccessControl, ReentrancyGuard, Pausable).
Reporting Issues
If you discover a bug or security vulnerability, please open an issue on GitHub using the provided templates. For critical security issues, contact the team via the responsible disclosure process outlined in the repository's SECURITY.md.