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
- 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
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
src/lib.rs,README.mdSuggested execution
git checkout -b feat/iso4217-metadatacurrency_iso4217andcurrency_symbolfieldsoffering_registeredeventTest and commit
cargo test --allExample commit message
feat: add currency ISO-4217 metadata per offeringGuidelines