Skip to content

Latest commit

 

History

History
201 lines (143 loc) · 4.99 KB

File metadata and controls

201 lines (143 loc) · 4.99 KB

Contributing to VRFCall

Thank you for your interest in contributing to VRFCall! This document provides guidelines and instructions for contributing to this project.

🤝 How to Contribute

We welcome contributions of all kinds, including:

  • 🐛 Bug reports
  • 💡 Feature requests
  • 📝 Documentation improvements
  • 🔧 Code contributions
  • 🧪 Test cases
  • 📖 Examples and tutorials

📋 Getting Started

Prerequisites

  • Go 1.22 or higher
  • Access to a VRFChain node (local or remote)
  • Basic understanding of Cosmos SDK and blockchain concepts

Setting Up the Development Environment

  1. Fork the repository on GitHub

  2. Clone your fork:

    git clone https://github.com/your-username/vrfcall.git
    cd vrfcall
  3. Add the upstream remote:

    git remote add upstream https://github.com/aakash4dev/vrfcall.git
  4. Install dependencies:

    go mod download
  5. Ensure VRFChain is running:

    • Make sure VRFChain is running on http://localhost:26657 (Tendermint RPC)
    • REST API should be available at http://localhost:1317

🔀 Development Workflow

Creating a Branch

  1. Update your main branch:

    git checkout main
    git pull upstream main
  2. Create a feature branch:

    git checkout -b feature/your-feature-name
    # or
    git checkout -b fix/your-bug-fix

Making Changes

  • Write clear, readable code following Go conventions
  • Add comments for complex logic
  • Ensure your code compiles without errors
  • Test your changes locally

Commit Messages

Follow these guidelines for commit messages:

  • Use clear, descriptive messages
  • Start with a verb in imperative mood (e.g., "Add", "Fix", "Update")
  • Keep the first line under 72 characters
  • Add more details in the body if needed

Examples:

Add support for custom RPC endpoints
Fix balance check logic for zero balance accounts
Update README with API endpoint documentation

Testing

Before submitting a pull request:

  1. Run the application:

    go run main.go
  2. Test your changes with a local VRFChain instance

  3. Check for linting errors:

    go vet ./...

📤 Submitting Changes

Pull Request Process

  1. Push your branch to your fork:

    git push origin feature/your-feature-name
  2. Create a Pull Request on GitHub:

    • Provide a clear title and description
    • Reference any related issues
    • Include screenshots or examples if applicable
  3. Wait for review:

    • Maintainers will review your PR
    • Address any feedback or requested changes
    • Be patient and responsive to comments

Pull Request Checklist

  • Code follows Go style guidelines
  • Changes are tested locally
  • Documentation is updated (if needed)
  • Commit messages are clear and descriptive
  • No unnecessary files are included
  • PR description explains the changes and motivation

🐛 Reporting Bugs

When reporting bugs, please include:

  1. Description: Clear description of the bug
  2. Steps to Reproduce: Detailed steps to reproduce the issue
  3. Expected Behavior: What you expected to happen
  4. Actual Behavior: What actually happened
  5. Environment:
    • Go version
    • Operating system
    • VRFChain version (if applicable)
  6. Logs/Errors: Any error messages or logs
  7. Screenshots: If applicable

Create an issue using the Bug Report template.

💡 Suggesting Features

Feature suggestions are welcome! When proposing a feature:

  1. Check existing issues to avoid duplicates
  2. Describe the use case and why it would be valuable
  3. Provide examples of how it would be used
  4. Consider implementation details if possible

Create an issue using the Feature Request template.

📝 Code Style Guidelines

Go Conventions

  • Follow standard Go formatting (go fmt)
  • Use gofmt or goimports for imports
  • Keep functions focused and small
  • Use meaningful variable and function names
  • Add comments for exported functions and types

Project Structure

  • Keep related code in appropriate packages
  • Chain-related operations in chain/ package
  • Configuration in config/ package
  • Main application logic in main.go

🔒 Security

If you discover a security vulnerability, please do not open a public issue. Instead:

  1. Email the maintainer directly
  2. Provide details about the vulnerability
  3. Allow time for the issue to be addressed before disclosure

❓ Questions?

If you have questions about contributing:

  • Open an issue with the question label
  • Check existing issues and discussions
  • Reach out to the maintainer

🙏 Recognition

Contributors will be recognized in:

  • The project's README (if applicable)
  • Release notes for significant contributions
  • GitHub contributors page

Thank you for contributing to VRFCall! 🎉