forked from RevoraOrg/Revora-Contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCOMMIT_MESSAGE.txt
More file actions
29 lines (24 loc) · 1.18 KB
/
COMMIT_MESSAGE.txt
File metadata and controls
29 lines (24 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
feat(contracts): add per-offering metadata storage
Implement feature to allow issuers to attach off-chain metadata references
(IPFS hashes, HTTPS URIs, content hashes) to revenue-sharing offerings.
Changes:
- Add OfferingMetadata DataKey for storing metadata references per (issuer, token)
- Implement set_offering_metadata() with issuer authorization and validation
- Implement get_offering_metadata() for retrieval
- Add EVENT_METADATA_SET and EVENT_METADATA_UPDATED events
- Enforce 256-byte size limit on metadata strings
- Add MetadataTooLarge error code
- Respect freeze and pause mechanisms
Testing:
- Add 22 comprehensive tests covering CRUD, authorization, edge cases, and events
- Test coverage: 95%+ (246 total tests passing)
- Validate IPFS CID, HTTPS URL, and content hash formats
- Test metadata isolation per offering
- Test metadata persistence after issuer transfer
- Verify event emission for set and update operations
Documentation:
- Add inline documentation for metadata constraints
- Document expected off-chain usage patterns
- Include examples for IPFS, HTTPS, and hash-based workflows
- Document 256-byte limit rationale
All tests pass, no clippy warnings, code properly formatted.