We welcome contributions to the Ethereum Boilerplate Rust project! This guide will help you get started.
- Use the GitHub Issues page
- Provide clear, descriptive titles
- Include steps to reproduce
- Add relevant error messages and logs
- Specify your environment (OS, Rust version, etc.)
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Test thoroughly:
cargo test cargo clippy -- -D warnings cargo fmt --check - Commit your changes:
git commit -m "feat: add amazing feature" - Push to your fork:
git push origin feature/amazing-feature
- Create a Pull Request
- Rust 1.70+
- Node.js 18+ (for frontend tooling)
- Git
# Clone your fork
git clone https://github.com/YOUR_USERNAME/nodejs_2_rust.git
cd nodejs_2_rust
# Add upstream remote
git remote add upstream https://github.com/revitalyr/nodejs_2_rust.git
# Install dependencies
cargo build
# Run tests
cargo testcrates/
├── cli/ # CLI tools and commands
├── server/ # Axum REST API
├── frontend/ # Leptos WASM frontend
├── shared/ # Shared types and utilities
├── utils/ # Common helper functions
└── smart-contracts/ # Ethereum contract utilities
- Follow Rust API Guidelines
- Use
cargo fmtfor formatting - Use
cargo clippyfor linting - Write comprehensive tests
- Document public APIs with
///doc comments
// Good
pub fn calculate_balance(amount: U256) -> Result<U256, Error> {
// Clear, documented function
amount.checked_mul(U256::from(2))
.ok_or_else(|| Error::Overflow)
}
// Avoid
pub fn calc(a: U256) -> U256 {
a * 2 // No error handling, unclear name
}- All public functions must have documentation
- Include examples in doc comments
- Explain the "why" not just the "what"
- Use proper markdown formatting
- Unit tests: Test individual functions
- Integration tests: Test component interaction
- WASM tests: Test frontend in browser
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_function_name() {
// Arrange
let input = U256::from(100);
// Act
let result = function_under_test(input);
// Assert
assert_eq!(result, U256::from(200));
}
}# All tests
cargo test
# Specific crate
cargo test -p ethereum-boilerplate-utils
# Integration tests
cargo test --test integration
# WASM tests
wasm-pack test --headless --firefoxWe use Semantic Versioning:
- Major: Breaking changes
- Minor: New features (backward compatible)
- Patch: Bug fixes
- All tests pass
- Documentation updated
- CHANGELOG.md updated
- Version bumped in Cargo.toml
- Git tag created
- Fix crashes or incorrect behavior
- Improve error messages
- Fix memory leaks or performance issues
- New CLI commands
- Additional contract templates
- New UI components
- Enhanced API endpoints
- Improve README
- Add code examples
- Write tutorials
- Fix typos or unclear explanations
- Improve CI/CD
- Add new test types
- Optimize build process
- Enhance developer tooling
We use these labels for issues and PRs:
bug: Bug reportsenhancement: Feature requestsdocumentation: Documentation improvementsgood first issue: Good for newcomershelp wanted: Community assistance needed
- Discord: Join our community
- Discussions: GitHub Discussions
- Issues: Create an issue
Contributors are recognized in:
- README.md contributors section
- Release notes
- Annual community posts
- Special contributor badges
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to Ethereum Boilerplate — Rust Edition! 🚀