Contributing to Starknet.go
Starknet.go is an open-source Go library for Starknet developed by NethermindEth. We welcome all contributions to help enrich the Starknet community.
How to Contribute
We operate using an issue and pull request model. Track the GitHub Issues section and submit Pull Requests for review by maintainers.
Ways to Contribute
Reporting Bugs
Create an issue on our GitHub repository with:
- Clear, descriptive title
- Detailed description of the issue
- Steps to reproduce the bug
- Expected vs actual behavior
- Environment details (Go version, OS, etc.)
- Code sample demonstrating the issue
Suggesting Enhancements
Submit enhancement requests with:
- Clear title and description
- Detailed explanation of proposed functionality
- Use cases and examples
- Potential implementation approach
Improving Documentation
Documentation contributions include:
- Fixing typos and clarifying content
- Adding code examples and tutorials
- Expanding technical explanations
- Improving API documentation
Code Contributions
Follow our development workflow for code changes.
Development Setup
Prerequisites
- Go 1.20 or higher
- Git
- Basic understanding of Go modules and testing
Environment Setup
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/yourusername/starknet.go.git cd starknet.go
-
Add upstream remote:
git remote add upstream https://github.com/NethermindEth/starknet.go.git
-
Install dependencies:
go mod download
Development Workflow
We recommend the following workflow for contributors:
- Find an issue to work on and use comments to communicate your intentions and ask questions
- Work in a feature branch of your personal fork (github.com/YOUR_NAME/starknet.go) of the main repository (github.com/NethermindEth/starknet.go)
- Create a pull request to merge your changes into the main repository after implementing the solution
- Wait for review by repository maintainers to ensure the issue is addressed
- Merge approval - if the issue is resolved, maintainers will merge your pull request
Linter Requirements
Starknet.go requires linter checks to pass before merging. Follow these steps:
-
Install golangci-lint:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.0
-
Run the linter:
golangci-lint run
-
Run linter on specific files:
golangci-lint run path/to/your/file.go golangci-lint run path/to/your/directory
Ensure no linter errors exist before submitting your pull request.
Project Structure
Understanding the codebase organization:
├── account/ # Account management and signing
├── client/ # High-level client interfaces
├── curve/ # Cryptographic operations
├── examples/ # Usage examples
├── rpc/ # RPC client implementation
├── utils/ # Utility functions
└── ...
Additional Resources
For a detailed guide on contributing to GitHub projects, see this contribution guide.
Getting Help
- Issues: Create GitHub Issues
- Package Documentation: Check pkg.go.dev
Review Process
- Maintainers review all pull requests
- Code review feedback should be addressed
- Approved PRs are merged by maintainers
Thank you for contributing to Starknet.go!