Skip to content

Add per-offering currency-denomination metadata and decimals helper for accurate display #475

Description

@thlpkee20-wq

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
    • cargo test --all
  • 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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programcontractsdocumentationImprovements or additions to documentationenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions