此函数必须返回指向包含 IP 所需任何元数据的元数据文件的 URI,或者返回一个空字符串。每种 IP 类型可以单独实施其元数据标准。该文件必须托管在 IPFS、Arweave 或其他去中心化的内容寻址系统中,在该系统中,文件的内容在不更改 URI 的情况下不可更改。
changeMetadataURI() 函数
此函数允许更改元数据 URI 以指向元数据文件的新版本。如果成功调用此函数必须触发事件 MetadataChanged。
ledger() 函数
此函数必须返回注册表或注册商合约地址或初始化 IP 和关联版税 token 的 EOA 帐户。IP 表示可以由不同的参与者在多个地方注册以用于不同的目的。此函数使市场参与者能够发现哪个注册机制是 IP 的父级,并且可能具有管理 IP 的特殊访问权限。
// SPDX-License-Identifier: CC0-1.0
pragmasolidity^0.8.9;import'@openzeppelin/contracts/interfaces/IERC165.sol';///
/// @dev Interface for Intellectual Property Representation
/// 知识产权表示的接口
interfaceIIPRepresentationisIERC165{/// @notice Called with the new URI to an updated metadata file
/// 使用更新的元数据文件的新 URI 调用
/// @param _newUri - the URI pointing to a metadata file (file standard is up to the implementer)
/// 指向元数据文件的 URI(文件标准由实施者决定)
/// @param _newFileHash - The hash of the new metadata file for future reference and verification
/// 新元数据文件的哈希值,供将来引用和验证
functionchangeMetadataURI(stringmemory_newUri,stringmemory_newFileHash)external;/// @return array of addresses of ERC20 tokens representing royalty portion in the IP
/// 返回代表 IP 中版税份额的 ERC20 token 的地址数组
/// @dev i.e implementing ERC5501 (IRoyaltyInterestToken interface)
/// 即实现 ERC5501(IRoyaltyInterestToken 接口)
functionroyaltyPortionTokens()externalviewreturns(address[]memory);/// @return the address of the contract or EOA that initialized the IP registration
/// 返回初始化 IP 注册的合约或 EOA 的地址
/// @dev i.e., a registry or registrar, to be implemented in the future
/// 例如,注册表或注册商,将在未来实施
functionledger()externalviewreturns(address);/// @return the URI of the current metadata file for the II P
/// 返回 II P 的当前元数据文件的 URI
functionmetadataURI()externalviewreturns(stringmemory);/// @dev event to be triggered whenever metadata URI is changed
/// 元数据 URI 更改时触发的事件
/// @param byAddress the addresses that triggered this operation
/// 触发此操作的地址
/// @param oldURI the URI to the old metadata file before the change
/// 更改前旧元数据文件的 URI
/// @param oldFileHash the hash of the old metadata file before the change
/// 更改前旧元数据文件的哈希值
/// @param newURI the URI to the new metadata file
/// 新元数据文件的 URI
/// @param newFileHash the hash of the new metadata file
/// 新元数据文件的哈希值
eventMetadaDataChanged(addressbyAddress,stringoldURI,stringoldFileHash,stringnewURI,stringnewFileHash);}