-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Labels
area-commitment-corecommitment_core cratecommitment_core cratepriority-P2Medium priorityMedium prioritysorobanStellar Soroban smart contractsStellar Soroban smart contractstype-testingTests and test coverageTests and test coverage
Description
Description
Deliver smart-contract work for commitment_core focused on: Early exit with minimum commitment amount and dust handling.
This issue is contracts-only (Soroban / Rust workspace). Do not scope frontend, backend, or off-chain services here.
Requirements and context
- Security: Treat this as production-leaning code — validate trust boundaries, auth (
require_authwhere applicable), reentrancy, and arithmetic safety. - Quality: Changes must be reviewable, deterministic in tests, and aligned with existing patterns in this repository.
- Testing: Add or extend tests so new/changed logic is convincingly covered; capture edge cases called out in the title.
- Documentation: Use Rustdoc (
///,//!) on public contract APIs; updatedocs/when behavior is integrator-facing.
Suggested execution
Fork and branch
- Fork the repository and create a branch:
git checkout -b feature/commitment-core-early-exit-with-minimum-commitment-amount-and-dust-handling
Implement changes
- Contract / library:
contracts/commitment_core/src/lib.rs - Tests:
contracts/commitment_core/src/tests.rs - Docs: add or extend a focused page under
docs/when the change affects external integrators (e.g.docs/CONTRACT_FUNCTIONS.md, threat model, or crate-specific notes). - Comments: module and function-level Rustdoc in NatSpec style (summary, params, errors, security notes).
Validate security assumptions
- Enumerate trust boundaries (who can call what, what storage keys mutate).
- Confirm no unintended cross-contract calls or missing auth for state changes.
- For math/financial paths, list overflow/underflow and rounding assumptions (tie to
shared_utils::mathwhere used).
Test and commit
- Run tests (adjust package as needed):
cargo test -p commitment_core --target wasm32v1-none --release- or workspace:
cargo test --workspace --target wasm32v1-none --release
- Cover edge cases explicit in the issue title; attach summarized test output and short security notes in the PR description.
Guidelines
- Minimum 95% coverage on touched contract and library code (use
cargo llvm-covlocally or follow CI coverage gates if present). - Clear documentation: Rustdoc + relevant
docs/updates for integrators. - Timeframe: 96 hours from assignment to ready-for-review PR (or comment with a justified ETA).
Example commit message
feat(commitment_core): early-exit-with-minimum-commitment-amount-and-dust-handling
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-commitment-corecommitment_core cratecommitment_core cratepriority-P2Medium priorityMedium prioritysorobanStellar Soroban smart contractsStellar Soroban smart contractstype-testingTests and test coverageTests and test coverage