Contributing to Chitin Soul Registry
February 9, 2026 · View on GitHub
Thank you for your interest in contributing to Chitin! This guide will help you get started.
Prerequisites
- Foundry (forge, cast, anvil)
- Solidity 0.8.28+
Getting Started
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/chitin-contracts.git cd chitin-contracts - Install dependencies:
forge install - Build the project:
forge build - Run the tests:
forge test -vvv
Development Workflow
- Create a feature branch from
main:git checkout -b feat/your-feature - Make your changes
- Ensure all tests pass:
forge test -vvv - Commit using Conventional Commits:
feat: add new chronicle record type fix: correct access control in validator test: add edge case tests for reincarnation docs: update deployment instructions - Push to your fork and open a Pull Request
Code Style
- Follow OpenZeppelin style conventions
- Use NatSpec comments for all public/external functions
- Internal functions prefixed with
_ - Constants in
UPPER_SNAKE_CASE - State variables in
camelCasewith_prefix for private/internal
Testing
- All new features must include tests
- All tests must pass before a PR can be merged
- Use descriptive test names:
test_Mint_RevertsWhen_CallerNotOwner - Aim for high coverage on critical paths (minting, access control, upgrades)
Pull Requests
- Keep PRs focused — one feature or fix per PR
- Include a clear description of what changed and why
- Reference related issues if applicable
- Ensure CI passes (all tests green)
Reporting Issues
- Bugs: Open a GitHub issue with reproduction steps
- Feature requests: Open a GitHub issue describing the use case
- Security vulnerabilities: See SECURITY.md — do NOT open public issues
License
By contributing, you agree that your contributions will be licensed under the MIT License.