Files
smom-dbis-138/docs/governance/CONTRIBUTING.md

144 lines
2.4 KiB
Markdown
Raw Normal View History

# Contributing to DeFi Oracle Meta Mainnet
Thank you for your interest in contributing to the DeFi Oracle Meta Mainnet project!
## Getting Started
1. Fork the repository
2. Create a feature branch: `git checkout -b feature/amazing-feature`
3. Make your changes
4. Commit your changes: `git commit -m 'Add amazing feature'`
5. Push to the branch: `git push origin feature/amazing-feature`
6. Open a Pull Request
## Development Setup
### Prerequisites
- Azure CLI
- Terraform >= 1.0
- kubectl
- helm
- Besu CLI tools
- Foundry (forge, cast, anvil)
### Local Development
1. Clone the repository
2. Install dependencies
3. Set up local development environment
4. Run tests
5. Make changes
6. Test locally
7. Submit PR
## Code Style
### Solidity
- Use Solidity 0.8.19+
- Follow Solidity style guide
- Use NatSpec documentation
- Add comprehensive tests
### Python
- Use Python 3.9+
- Follow PEP 8 style guide
- Use type hints
- Add docstrings
### Shell Scripts
- Use bash
- Add error handling
- Add comments
- Use meaningful variable names
## Testing
### Smart Contracts
```bash
# Run tests
forge test
# Run with coverage
forge coverage
# Run specific test
forge test --match-test testFunctionName
```
### Python Services
```bash
# Run tests
pytest
# Run with coverage
pytest --cov
# Run specific test
pytest tests/test_specific.py
```
## Pull Request Process
1. Update documentation
2. Add tests for new features
3. Ensure all tests pass
4. Update CHANGELOG.md
5. Request review
6. Address feedback
7. Merge after approval
## Commit Messages
Follow conventional commits:
- `feat`: New feature
- `fix`: Bug fix
- `docs`: Documentation
- `style`: Code style
- `refactor`: Code refactoring
- `test`: Tests
- `chore`: Maintenance
Example: `feat: Add retry logic to oracle publisher`
## Code Review
- Be respectful
- Provide constructive feedback
- Ask questions
- Suggest improvements
- Approve when ready
## Issues
- Use GitHub Issues for bug reports
- Use GitHub Discussions for questions
- Provide detailed information
- Include reproduction steps
- Label appropriately
## Security
- Report security issues to security@d-bis.org
- Do not disclose publicly until fixed
- Follow responsible disclosure
## License
By contributing, you agree that your contributions will be licensed under the MIT License.
## Contact
- **Email**: engineering@d-bis.org
- **Discord**: [Link to Discord]
- **Twitter**: [@defioracle]
Thank you for contributing!