Metadata
CoreMetadataModule
The CoreMetadataModule manages the core metadata for IP assets within Story. It allows setting and updating metadata attributes for IP assets, with the ability to freeze metadata to prevent further changes.
State Variables
name
Returns the name of the module.
Functions
initialize
Initializes the CoreMetadataModule contract.
Parameters:
accessManager
: The address of the protocol admin roles contract.
name
Returns the name of the module.
Returns:
string
: The name of the module.
updateNftTokenURI
Update the nftTokenURI for an IP asset by retrieving the latest TokenURI from the IP NFT to which the IP Asset is bound.
Parameters:
ipId
: The address of the IP asset.nftMetadataHash
: A bytes32 hash representing the metadata of the NFT. This metadata is associated with the IP Asset and is accessible via the NFT’s TokenURI. Use bytes32(0) to indicate that the metadata is not available.
setMetadataURI
Sets the metadataURI for an IP asset.
Parameters:
ipId
: The address of the IP asset.metadataURI
: The metadataURI to set for the IP asset.metadataHash
: The hash of metadata at metadataURI. Use bytes32(0) to indicate that the metadata is not available.
setAll
Sets all core metadata for an IP asset.
Parameters:
ipId
: The address of the IP asset.metadataURI
: The metadataURI to set for the IP asset.metadataHash
: The hash of metadata at metadataURI. Use bytes32(0) to indicate that the metadata is not available.nftMetadataHash
: A bytes32 hash representing the metadata of the NFT. This metadata is associated with the IP Asset and is accessible via the NFT’s TokenURI. Use bytes32(0) to indicate that the metadata is not available.
freezeMetadata
Makes all metadata of the IP Asset immutable.
Parameters:
ipId
: The address of the IP asset.
isMetadataFrozen
Checks if the metadata of the IP Asset is immutable.
Parameters:
ipId
: The address of the IP asset.
Returns:
bool
: True if the metadata is frozen, false otherwise.
supportsInterface
Implements the IERC165 interface.
Parameters:
interfaceId
: The interface identifier.
Returns:
bool
: True if the contract supports the interface, false otherwise.