Description
Indexers must guess display semantics for each payment token. Add denomination_symbol: Symbol and display_decimals: u32 to offering metadata so wallets and dashboards can render consistent amounts.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
Revora-Contracts/src/lib.rs
- Display decimals must be capped at 18 and compared against payment-token decimals
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/offering-denomination-metadata
- Implement changes
- Add
denomination_symbol, display_decimals to offering struct
- Validate at register:
display_decimals <= payment_token_decimals
- Surface fields on
off_reg event
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- Setting display_decimals > 18 must reject
DisplayDecimalsOutOfRange
- Include test output and security notes
Example commit message
feat: add denomination_symbol and display_decimals metadata
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Indexers must guess display semantics for each payment token. Add
denomination_symbol: Symbolanddisplay_decimals: u32to offering metadata so wallets and dashboards can render consistent amounts.Requirements and context
Revora-Contracts/src/lib.rsSuggested execution
git checkout -b feat/offering-denomination-metadatadenomination_symbol,display_decimalsto offering structdisplay_decimals <= payment_token_decimalsoff_regeventTest and commit
cargo test --allDisplayDecimalsOutOfRangeExample commit message
feat: add denomination_symbol and display_decimals metadataGuidelines