Description
Support fixed-point rate representation to align with 7-decimal Stellar assets and avoid float in clients.
Requirements and context
- Document scale factor in
StreamInfo or separate field.
- Migration from raw i128 rate if breaking.
Suggested execution
- Fork the repository and create a branch (example below).
- Implement the changes in the StreamPay-Contracts Soroban crate (
streampay-contracts).
- Keep the contract secure, tested, and documented; prefer small, reviewable diffs.
git checkout -b feature/fixed-point-rate-decimals
Implementation targets
lib.rs + docs/decimals.md.
- Tests with realistic decimals.
Tests and validation
-
Add or extend contract tests for this scope.
-
Cover edge cases; paste summarized test output and security notes in the PR.
-
Run cargo test in StreamPay-Contracts.
-
Cover edge cases; capture test output and short security notes in the PR description.
Guidelines
- Target minimum 95% test coverage for touched contract code (or justify gaps explicitly).
- Clear documentation (rustdoc / project docs as specified).
- Timeframe: 96 hours from assignment.
Example commit message
feat(contracts): fixed-point rate for asset decimals
Description
Support fixed-point rate representation to align with 7-decimal Stellar assets and avoid float in clients.
Requirements and context
StreamInfoor separate field.Suggested execution
streampay-contracts).Implementation targets
lib.rs+docs/decimals.md.Tests and validation
Add or extend contract tests for this scope.
Cover edge cases; paste summarized test output and security notes in the PR.
Run
cargo testinStreamPay-Contracts.Cover edge cases; capture test output and short security notes in the PR description.
Guidelines
Example commit message