Skip to content

Commit cdc648d

Browse files
committed
chore: add community health files and changelog
- CONTRIBUTING.md with setup, code standards, and commit conventions - CHANGELOG.md documenting v0.1.0 release - Issue templates: bug report, feature request - PR template with testing checklist
1 parent 9f3c81a commit cdc648d

5 files changed

Lines changed: 160 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug in the smart contract
4+
labels: bug
5+
---
6+
7+
**Describe the bug**
8+
A clear description of what the bug is.
9+
10+
**Contract method**
11+
Which function were you calling? (e.g. `create_invoice`, `pay`, `release_escrow`)
12+
13+
**To Reproduce**
14+
Steps to reproduce the behaviour.
15+
16+
**Expected behaviour**
17+
What you expected to happen.
18+
19+
**Environment**
20+
- Network: [ ] Testnet [ ] Mainnet
21+
- Stellar CLI version:
22+
- soroban-sdk version:
23+
24+
**Additional context**
25+
Add any other context, transaction hashes, or error messages.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or improvement to the contract
4+
labels: enhancement
5+
---
6+
7+
**Problem / motivation**
8+
What problem does this solve? What use case does it enable?
9+
10+
**Proposed solution**
11+
Describe the contract change or new function you'd like to see.
12+
13+
**Stellar ecosystem impact**
14+
How does this benefit the Stellar/Soroban ecosystem?
15+
16+
**Alternatives considered**
17+
Any alternative approaches you've thought about.
18+
19+
**Additional context**
20+
Any other context, references, or examples.

.github/pull_request_template.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Summary
2+
<!-- What does this PR do? -->
3+
4+
## Related Issue
5+
Closes #
6+
7+
## Changes
8+
-
9+
10+
## Testing
11+
- [ ] `cargo test` passes
12+
- [ ] `cargo build --release --target wasm32-unknown-unknown` succeeds
13+
- [ ] Tested on testnet
14+
15+
## Checklist
16+
- [ ] Code follows existing patterns
17+
- [ ] New functions have doc comments
18+
- [ ] No `unwrap()` in production paths

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Changelog
2+
3+
All notable changes to the Sharpy smart contract are documented here.
4+
5+
## [0.1.0] - 2026-06-01
6+
7+
### Added
8+
- `initialize` — set admin and treasury addresses
9+
- `create_invoice` — single invoice with split rules and escrow options
10+
- `create_batch` — create up to 10 invoices in one transaction
11+
- `create_recurring` — recurring invoice that auto-generates next invoice on release
12+
- `pay` — pay toward an invoice with token transfer
13+
- `pool_pay` — pay multiple invoices in a single call
14+
- `release_escrow` — release escrow-held invoice after delay
15+
- `release` — manual release for fully funded invoices
16+
- `refund` — refund all payers after deadline passes
17+
- `cancel_invoice` — creator cancels and refunds all payments
18+
- `get_invoice` — read invoice state
19+
- `get_audit_log` — full audit trail per invoice
20+
- `get_payer_total` — total paid by a specific address
21+
- `get_next_recurring` — get the next invoice in a recurring chain
22+
- `pause` / `unpause` — admin circuit breaker
23+
- Split rules: `Fixed`, `Percentage`, `Tiered(threshold, bps)`
24+
- Events: `created`, `payment`, `released`, `refunded`, `pyr`
25+
- CI: GitHub Actions — test + WASM build on every PR
26+
- Deployed to Stellar testnet: `CAYTIFPD6RFWVHMK5SPPUUIWWAAANHKOJB6GOAJS5SR5MBKZMEY2UODZ`
27+
28+
### Fixed
29+
- `SplitRule::Tiered` converted from named fields to tuple variant for `#[contracttype]` compatibility
30+
- `symbol_short!` length violations in event publishing
31+
- `Address::random()` replaced with `Address::generate()` for soroban-sdk v22
32+
- `testutils` feature isolated to `dev-dependencies` to allow wasm32 build

CONTRIBUTING.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Contributing to Sharpy Contracts
2+
3+
Thank you for your interest in contributing to Sharpy! This repo contains the core Soroban smart contract powering the Sharpy split payment protocol on Stellar.
4+
5+
## Getting Started
6+
7+
### Prerequisites
8+
9+
- Rust (stable)
10+
- `wasm32-unknown-unknown` target: `rustup target add wasm32-unknown-unknown`
11+
- Stellar CLI: `cargo install --locked stellar-cli --features opt`
12+
13+
### Setup
14+
15+
```bash
16+
git clone https://github.com/stellar-sharpy/sharpy-contracts.git
17+
cd sharpy-contracts
18+
cargo test
19+
```
20+
21+
## How to Contribute
22+
23+
### Reporting Bugs
24+
25+
Open an issue using the **Bug Report** template. Include:
26+
- What you expected vs what happened
27+
- Steps to reproduce
28+
- Relevant contract method and parameters
29+
30+
### Suggesting Features
31+
32+
Open an issue using the **Feature Request** template. Describe the use case and why it adds value to the Stellar ecosystem.
33+
34+
### Submitting a Pull Request
35+
36+
1. Fork the repo and create a branch from `main`
37+
2. Make your changes with clear, focused commits
38+
3. Ensure `cargo test` passes
39+
4. Ensure `cargo build --release --target wasm32-unknown-unknown` succeeds
40+
5. Open a PR against `main` with a clear description
41+
42+
## Code Standards
43+
44+
- Follow existing patterns in `lib.rs`
45+
- All public contract functions must have a doc comment
46+
- New features require at least one unit test in `test.rs`
47+
- No `unwrap()` in production paths — use `expect("descriptive message")`
48+
49+
## Commit Messages
50+
51+
Use conventional commits:
52+
- `feat:` new contract functionality
53+
- `fix:` bug fix
54+
- `test:` test additions
55+
- `docs:` documentation only
56+
- `chore:` build/config changes
57+
- `refactor:` code restructure without behaviour change
58+
59+
## Security
60+
61+
Do not open public issues for security vulnerabilities. Email the maintainers directly. See `SECURITY.md` for details.
62+
63+
## License
64+
65+
By contributing, you agree your contributions will be licensed under the MIT License.

0 commit comments

Comments
 (0)