Contributing

CLAWING is an open-source project and welcomes contributions from the community. This guide covers how to contribute code, report issues, suggest features, and participate in the project's development.


Ways to Contribute

Contribution
Difficulty
Impact

Report bugs

Easy

High

Improve documentation

Easy

Medium

Submit feature requests

Easy

Medium

Fix open issues

Medium

High

Add test coverage

Medium

High

Implement features

Hard

High

Security research

Hard

Critical

Getting Started

1. Fork and Clone

# Fork the repository on GitHub, then:
git clone https://github.com/YOUR_USERNAME/clawing.git
cd clawing
npm install

2. Create a Branch

Branch Naming Conventions

Prefix
Use Case
Example

feat/

New features

feat/gas-estimation-improvement

fix/

Bug fixes

fix/cooldown-calculation-error

docs/

Documentation

docs/oracle-api-examples

test/

Test additions/changes

test/poaiwmint-edge-cases

refactor/

Code refactoring

refactor/oracle-client-cleanup

3. Make Changes

Write your code following the code style guidelines below. Ensure all existing tests pass and add new tests for your changes.

4. Test Your Changes

All 67 existing tests must pass. New code should include corresponding tests.

5. Commit and Push

6. Open a Pull Request

  1. Navigate to the original repository on GitHub

  2. Click "New Pull Request"

  3. Select your fork and branch

  4. Fill in the PR template with:

    • Summary: What the PR does and why

    • Changes: Specific code changes made

    • Testing: How the changes were tested

    • Related Issues: Link to any related issues


Code Style

JavaScript / Node.js

Rule
Standard

Indentation

2 spaces

Semicolons

Required

Quotes

Single quotes

Line length

100 characters max

Trailing commas

ES5 style

Example

Solidity

Rule
Standard

Compiler

Solidity ^0.8.20

Style

Solidity style guide

NatSpec

Required for all public functions

Tests

Foundry or Hardhat

Example


Testing Requirements

Before Submitting a PR

Test Structure

Writing Tests


Issue Reporting

Bug Reports

When reporting a bug, include:

  1. Description: Clear summary of the issue

  2. Steps to Reproduce: Numbered steps to trigger the bug

  3. Expected Behavior: What should happen

  4. Actual Behavior: What actually happens

  5. Environment: OS, Node.js version, npm version

  6. Logs: Relevant error messages or log output

Feature Requests

When requesting a feature, include:

  1. Problem: What problem does this solve?

  2. Proposed Solution: How should it work?

  3. Alternatives: Other approaches considered

  4. Impact: Who benefits and how?

Security Vulnerabilities

Do NOT report security vulnerabilities as public issues.

Instead:

  1. Use the GitHub security advisory feature

  2. Include detailed reproduction steps

  3. Allow time for a fix before public disclosure

See Security for the complete vulnerability disclosure process.


Pull Request Guidelines

PR Checklist

Commit Messages

Use conventional commit format:

Type
Use

feat

New feature

fix

Bug fix

docs

Documentation

test

Tests

refactor

Refactoring

chore

Maintenance

Review Process

  1. Submit your PR

  2. Automated CI runs tests and linting

  3. Maintainers review the code

  4. Address any feedback

  5. PR is merged once approved


Project Structure

License

CLAWING is open-source software. Check the repository's LICENSE file for the specific license terms. By contributing, you agree that your contributions will be licensed under the same terms.

Next Steps

Last updated