Description
Some disclosures (PPM, K-1 templates) cannot live on-chain. Add disclosure_uri: String and disclosure_hash: BytesN<32> to offering metadata, binding off-chain documents to the contract record so investors can verify integrity.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
Revora-Contracts/src/lib.rs
- URI must be capped at 256 chars and hash exactly 32 bytes
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/encrypted-disclosure-metadata
- Implement changes
- Add fields to offering struct and to
off_reg event
- Add
update_disclosure(offering_id, uri, hash) issuer call
- Reject URI longer than 256 chars with
DisclosureUriTooLong
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- Empty URI with non-zero hash must reject
InconsistentDisclosure
- Include test output and security notes
Example commit message
feat: add disclosure_uri and disclosure_hash to offering metadata
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Some disclosures (PPM, K-1 templates) cannot live on-chain. Add
disclosure_uri: Stringanddisclosure_hash: BytesN<32>to offering metadata, binding off-chain documents to the contract record so investors can verify integrity.Requirements and context
Revora-Contracts/src/lib.rsSuggested execution
git checkout -b feat/encrypted-disclosure-metadataoff_regeventupdate_disclosure(offering_id, uri, hash)issuer callDisclosureUriTooLongTest and commit
cargo test --allInconsistentDisclosureExample commit message
feat: add disclosure_uri and disclosure_hash to offering metadataGuidelines