Skip to content

Add currency-symbol and ISO-4217 code metadata field per offering for display #815

Description

@thlpkee20-wq

Description

Front-ends need a canonical currency symbol and ISO-4217 code per offering to render amounts correctly. Add optional metadata fields validated on register_offering.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Relevant code: src/lib.rs, README.md
  • ISO-4217 must be a 3-letter uppercase ASCII code

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feat/iso4217-metadata
  • Implement changes
    • Add currency_iso4217 and currency_symbol fields
    • Validate format on register
    • Emit metadata in offering_registered event
  • Validate security and correctness assumptions

Test and commit

  • Run tests
    • cargo test --all
  • Cover edge cases
    • Lowercase code rejection and 2- or 4-letter code rejection
  • Include test output and security notes

Example commit message

feat: add currency ISO-4217 metadata per offering

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions