Skip to content

Add invoice metadata field for off-chain content hash (IPFS) #329

Description

@Kingsman-99

Overview

Invoice descriptions, attachments, and rich metadata cannot fit in contract storage cost-efficiently. Add a metadata_hash field to point to off-chain content (IPFS CID or SHA-256 hash) stored alongside the invoice.

Acceptance Criteria

  • InvoiceParams gains metadata_hash: Option<BytesN<32>>
  • Hash stored in per-invoice persistent storage
  • get_invoice returns metadata_hash in the invoice struct
  • update_metadata_hash(invoice_id, new_hash: BytesN<32>) callable only by the creator; emits MetadataUpdated event
  • metadata_hash is optional — existing invoices without it return None
  • Contract does NOT validate or fetch the off-chain content — hash is stored as-is
  • MetadataUpdated { invoice_id, old_hash, new_hash, ledger } event emitted on update
  • Integration tests: create with hash, create without hash, update hash, verify stored value

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highComplex feature requiring deep knowledge - 200 ptsstorageStorage layout and TTL optimisation

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