|
| 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