Thank you for helping make PropChain better! This guide covers the process for reporting issues, proposing changes, and submitting pull requests.
- Code of Conduct
- Reporting Issues
- Development Workflow
- Pull Request Guidelines
- Code Style
- Testing Requirements
- Documentation Requirements
All contributors are expected to be respectful and professional. Harassment or discriminatory behaviour will not be tolerated.
- Search existing issues before opening a new one.
- Use the appropriate issue template (bug report, feature request, etc.).
- Include a minimal reproduction case for bugs.
- Tag issues with the relevant contract name (e.g.
lending,insurance).
# 1. Fork the repository and clone your fork
git clone https://github.com/<your-username>/PropChain-contract.git
cd PropChain-contract
# 2. Create a feature branch
git checkout -b feat/my-feature
# 3. Make your changes, then run the full test suite
cargo test --all-features --workspace
# 4. Check formatting and lints
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
# 5. Commit with a clear message
git commit -m "feat(lending): add amortization schedule support"
# 6. Push and open a pull request against `main`
git push -u origin feat/my-featureFor full setup instructions see DEVELOPMENT.md.
- One concern per PR — keep changes focused.
- Title format:
type(scope): short description- Types:
feat,fix,docs,chore,refactor,test - Example:
fix(lending): prevent zero-division in borrow_rate
- Types:
- Fill in the PR template completely.
- All CI checks must pass before merge:
cargo fmt --checkcargo clippy -- -D warningscargo test --all-features --workspace- ARCHITECTURE.md link check
- At least one maintainer approval is required.
- Address all review comments before requesting re-review.
- Squash commits before merge (maintainers may squash on merge).
The project uses stable rustfmt for general formatting and nightly
rustfmt with format_macro_matchers = true for ink! macro bodies.
# Format all code (stable)
cargo fmt
# Format ink! macros (nightly — required for macro-heavy files)
cargo +nightly fmtSee rustfmt.toml in the repo root for the full configuration.
All Clippy warnings are treated as errors in CI. Run locally with:
cargo clippy --all-targets --all-features -- -D warnings| Item | Convention | Example |
|---|---|---|
| Types / Traits | PascalCase |
LoanApplication |
| Functions / Methods | snake_case |
apply_for_loan |
| Constants | SCREAMING_SNAKE_CASE |
MAX_LTV_RATIO |
| Storage fields | snake_case |
loan_count |
- Every new feature must include unit tests.
- Every bug fix must include a regression test.
- Tests live alongside their module (
mod testsinsidelib.rs) or in a dedicatedtests/directory for larger suites. - See the lending test module layout for the project's three-layer test organisation pattern.
Run the test suite:
cargo test --all-features --workspace- All public
fn,struct,enum, andmoditems must have rustdoc comments (///). mod testsblocks must include a rustdoc header describing the test group's purpose and scope.- Update
ARCHITECTURE.mdif your change affects the high-level design. - Verify all links in
ARCHITECTURE.mdstill resolve after your change:
python3 scripts/verify_doc_sync.sh # or the inline CI check- Open a GitHub Discussion for questions.
- Join the PropChain Discord for real-time help.
- Email the maintainers: contracts@propchain.io