First off, thank you for considering contributing to Fluxora! It's people like you that make open-source software such a great community.
- Fork the repository to your own GitHub account.
- Clone the project to your local machine.
- Add the original repository as a remote ("upstream").
Always create a new branch for your work. Do not commit directly to the main branch. Please use the following prefixes for your branch names:
feature/- for new features (e.g.,feature/multi-period-attestations)fix/- for bug fixes (e.g.,fix/stream-overflow)docs/- for documentation updates (e.g.,docs/contributing)test/- for adding or updating tests (e.g.,test/cancel-from-paused)
- Write Tests: All new code must include comprehensive unit tests.
- Maintain Coverage: We enforce a strict minimum of 95% test coverage. PRs that drop coverage below this threshold will not be merged.
- Snapshot Tests: All behavior changes must update snapshot tests. See Snapshot Test Workflow.
- Run Linters: Ensure your code is properly formatted and passes all linting checks before opening a PR.
- Update Documentation: If you are adding a new feature or changing an API, please update the relevant documentation (and NatSpec comments) alongside your code.
When your changes affect contract behavior:
-
Run tests locally:
cargo test -p fluxora_stream -
If snapshot tests fail and changes are intentional:
SOROBAN_SNAPSHOT_UPDATE=1 cargo test -p fluxora_stream -
Review snapshot changes:
git diff contracts/stream/test_snapshots/
-
Commit with clear message:
git add contracts/stream/test_snapshots/ git commit -m "test: update snapshots for [specific change]" -
Document in PR: Explain why snapshots changed and what behavior changed.
See Snapshot Test Documentation for complete guidance.
- Push your changes to your fork.
- Open a Pull Request against the
mainbranch of the upstream repository. - Ensure your PR title is descriptive and follows conventional commit formatting.
- Link the PR to the relevant issue(s) it resolves.
- If snapshots changed: Use the PR template to document what changed and why.
- Wait for a maintainer to review your code.
- All new functions must have unit tests
- Edge cases must be covered
- Error conditions must be tested
- All state transitions must have snapshot coverage
- Authorization boundaries must be explicit
- Event emissions must be verified
- See Snapshot Test Authoring Guide
- Minimum 95% code coverage required
- Run coverage report:
cargo tarpaulin --features testutils -p fluxora_stream
When contributing, update:
- Code comments for complex logic
- Function documentation for public APIs
docs/files for behavior changesREADME.mdfor user-facing changes- Snapshot test documentation if test patterns change
If you find a bug or have a suggestion, please open an issue first. Be sure to check out our Issue Templates (if available) to provide all the necessary context.