Thank you for your interest in contributing to YieldSafe smart contracts! This guide will help you get started.
- Fork the Repository: Click the "Fork" button on GitHub to create your personal copy
- Clone Your Fork:
git clone https://github.com/YOUR_USERNAME/ys-contracts.git
cd ys-contracts- Create a Feature Branch:
git checkout -b feature/your-feature-name-
Make Your Changes: Implement your contract changes or improvements
-
Test Your Changes:
forge build
forge test- Commit Your Changes:
git commit -m "Add your meaningful commit message"- Push to Your Fork:
git push origin feature/your-feature-name- Create a Pull Request: Go to the main repository and create a PR from your fork to the main branch
- Foundry (includes Forge)
- Solidity knowledge
forge build
forge test- All contracts should be well-documented with NatSpec comments
- Write comprehensive tests for all contract functionality
- Ensure all tests pass:
forge test- Follow Solidity best practices and security guidelines
- Gas optimization is encouraged but not at the cost of clarity
- All new features must include tests
- Tests should cover both happy paths and edge cases
- Maintain or improve test coverage
Smart contracts handle real value. Security is critical.
- Follow established Solidity security patterns
- Be aware of common vulnerabilities (reentrancy, overflow, etc.)
- Keep PRs focused and reasonably sized
- Write clear PR descriptions explaining the changes and rationale
- Reference any related issues
- Ensure all tests pass
- Highlight any security considerations in the PR description
- Be responsive to review feedback
Please be respectful and constructive in all interactions with other contributors.
Feel free to open an issue to ask questions or start a discussion!