Skip to content

Introducing Core Metadata Module and View Module#15

Merged
LeoHChen merged 14 commits intostoryprotocol:mainfrom
kingster-will:v1/metadata-additional
Mar 29, 2024
Merged

Introducing Core Metadata Module and View Module#15
LeoHChen merged 14 commits intostoryprotocol:mainfrom
kingster-will:v1/metadata-additional

Conversation

@kingster-will
Copy link
Copy Markdown
Collaborator

@kingster-will kingster-will commented Mar 22, 2024

This PR introduces the CoreMetadataModule and CoreMetadataViewModule to the Story Protocol. These modules enable IP asset owners to set common metadata for their IP assets post-registration. Once set, this core metadata is immutable and cannot be changed. The CoreMetadataViewModule facilitates the retrieval of this core metadata and generates a JSON metadata string representing it.

CoreMetadataModule

The CoreMetadataModule allows IP asset owners to set essential metadata attributes such as name, description, and content hash. These attributes are critical for identifying and describing the IP assets within the Story Protocol ecosystem. The module ensures that each piece of metadata can only be set once, enforcing immutability and preserving the integrity of the IP asset's core information.

Key Features

  • Immutability: IP Owner can freeze metadata, once the metadata was frozen, the core metadata attributes cannot be changed.
  • Security: Integrates with the Story Protocol's access control mechanisms to ensure that only the IP asset owner or authorized parties can set metadata.

CoreMetadataViewModule

The CoreMetadataViewModule provides functionalities to retrieve the core metadata of IP assets and generate a JSON string representing all core metadata. This module is essential for external integrations and user interfaces that require access to an IP asset's metadata in a standardized format.

Key Features

  • Metadata Retrieval: Allows fetching core metadata attributes like name, description, and content hash.
  • JSON Metadata Generation: Generates a JSON string of all core metadata for IP assets, facilitating easy integration with external systems.

@LeoHChen
Copy link
Copy Markdown

So the core metadata come from two places ? One in the IPA, another in the registry?

Copy link
Copy Markdown

@Ramarti Ramarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to replace IPAssetRegistry?
In which step will this contract be called in the registration process?

Comment thread contracts/interfaces/modules/metadata/ICoreMetadataModule.sol Outdated
Comment thread contracts/modules/metadata/CoreMetadataModule.sol
Comment thread contracts/modules/metadata/CoreMetadataViewModule.sol Outdated
Comment thread contracts/modules/metadata/CoreMetadataViewModule.sol
@jdubpark
Copy link
Copy Markdown

Noting for future PRs, for the core vs periphery division, I strongly see the view modules as periphery modules as they interact with core components (and none of our core modules interact with view modules).

@kingster-will
Copy link
Copy Markdown
Collaborator Author

So the core metadata come from two places ? One in the IPA, another in the registry?

All core metadata come from IPAccount, while just under two namespaces, one is under namespace of IPAssetRegistry.

@kingster-will
Copy link
Copy Markdown
Collaborator Author

Is this going to replace IPAssetRegistry? In which step will this contract be called in the registration process?

Nope, it is not for replacing IPAssetRegistry. This contract is supposed to be called after the IPA is registered with IPAssetRegitry.

@kingster-will
Copy link
Copy Markdown
Collaborator Author

Noting for future PRs, for the core vs periphery division, I strongly see the view modules as periphery modules as they interact with core components (and none of our core modules interact with view modules).

Agree the future View Modules will be created in the periphery repo. Only the CoreMetadtaViewModule is needed in the core repo.

@jdubpark
Copy link
Copy Markdown

All core metadata come from IPAccount, while just under two namespaces, one is under namespace of IPAssetRegistry.

What's the difference between metadata under this namespace and under IPAssetRegistry? Would it be the type of metadata stored?

Copy link
Copy Markdown

@jdubpark jdubpark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, requesting natspec comment changes

Comment thread contracts/interfaces/modules/metadata/ICoreMetadataModule.sol Outdated
Comment thread contracts/modules/metadata/CoreMetadataViewModule.sol Outdated
Comment thread contracts/interfaces/modules/metadata/ICoreMetadataModule.sol Outdated
@jdubpark jdubpark self-requested a review March 25, 2024 23:06
jdubpark
jdubpark previously approved these changes Mar 25, 2024
Comment thread contracts/modules/metadata/CoreMetadataModule.sol Outdated
@jdubpark jdubpark dismissed their stale review March 26, 2024 00:54

metadata scope

Comment thread contracts/modules/metadata/CoreMetadataViewModule.sol
Comment thread contracts/modules/metadata/CoreMetadataModule.sol
Comment thread contracts/interfaces/modules/metadata/ICoreMetadataModule.sol
Comment thread contracts/interfaces/modules/metadata/ICoreMetadataModule.sol Outdated
@jdubpark jdubpark requested a review from LeoHChen March 29, 2024 07:40
@kingster-will kingster-will force-pushed the v1/metadata-additional branch from d54311d to 336f2e9 Compare March 29, 2024 14:23
@LeoHChen LeoHChen merged commit 5832c61 into storyprotocol:main Mar 29, 2024
kingster-will added a commit to kingster-will/protocol-core-v1-dev that referenced this pull request Jan 18, 2025
Correct Calculation of Claimable Royalty for Ancestor IPs
kingster-will added a commit to kingster-will/protocol-core-v1-dev that referenced this pull request Jan 31, 2025
irfand29 pushed a commit to irfand29/protocol-core-v1 that referenced this pull request Feb 8, 2025
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.

4 participants