Skip to content

feat: add IPFS CID metadata storage for creators - #70

Merged
elizabetheonoja-art merged 2 commits into
SubStream-Protocol:mainfrom
Manuelshub:feat/creator-ipfs-metadata
Mar 24, 2026
Merged

feat: add IPFS CID metadata storage for creators#70
elizabetheonoja-art merged 2 commits into
SubStream-Protocol:mainfrom
Manuelshub:feat/creator-ipfs-metadata

Conversation

@Manuelshub

Copy link
Copy Markdown
Contributor

Add IPFS CID Metadata Storage for Creators

Summary

Adds on-chain storage for a creator's IPFS CID, pointing to their profile, links, and subscription tier descriptions.

Changes

DataKey enum

  • Added CreatorMetadata(Address) variant for per-creator metadata storage

New contract methods

  • set_creator_metadata(creator, cid: Bytes) — stores the IPFS CID on-chain; requires creator auth so only the creator can update their own metadata
  • get_creator_metadata(creator) -> Option<Bytes> — retrieves the stored CID, returns None if not yet set

Tests

  • Added test_creator_metadata covering: initial None state, setting a CID, retrieving it, and updating to a new CID

Notes

  • The CID is stored as raw Bytes to remain encoding-agnostic (works with CIDv0 and CIDv1)
  • No migration needed — existing streams and storage keys are unaffected
  • Also cleaned up pre-existing duplicate use statements and broken code fragments in lib.rs and test.rs

Closes #20

- Add CreatorMetadata(Address) variant to DataKey enum
- Add set_creator_metadata(creator, cid: Bytes) - creator-authed
- Add get_creator_metadata(creator) -> Option<Bytes>
- Add test_creator_metadata covering set, get, and update
- Clean up duplicate imports and broken code fragments in lib.rs and test.rs
- All 23 tests passing
@drips-wave

drips-wave Bot commented Mar 24, 2026

Copy link
Copy Markdown

@Manuelshub Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@elizabetheonoja-art
elizabetheonoja-art merged commit 5cd8ad6 into SubStream-Protocol:main Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#20 Add Global_Metadata_Pointer for Creator Bios

2 participants