-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program
Description
Description
Replace panics with a custom error enum where appropriate (e.g. NotInitialized, Unauthorized, InsufficientBalance, InvalidAmount) and return Result from functions or use panic with consistent error messages for Soroban.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Soroban often uses panic for revert; if using Result, document ABI impact. Alternatively standardize panic messages via an error enum and panic with same message.
- Ensure frontend/backend can parse or detect failure reasons
Suggested execution
- Fork the repo and create a branch
git checkout -b feature/vault-error-enum- Implement changes
- Define enum VaultError with variants; add helper that panics with same message per variant
- Replace assert! and panic! with these helpers
- Update tests to expect specific panic messages or error results
- Test and commit
- Run tests; document error contract
- Include test output
- Example commit message:
feat: vault custom error enum and consistent panic messages
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
- Project details: #
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program