EIP-6239
每个合约必须实现ISemanticSBT接口
在有新的SBT产生的时候,需要发出
CreateRDF事件在更新已有SBT的RDF的时候,需要发出
UpdateRDF事件在销毁SBT的时候,需要发出
RemoveRDF事件合约需要提供
rdfOf方法
interface ISemanticSBT{
/**
* @dev This emits when minting a Semantic Soulbound Token.
* @param tokenId The identifier for the Semantic Soulbound Token.
* @param rdfStatements The RDF statements for the Semantic Soulbound Token. An RDF statement is the statement made by an RDF triple.
*/
event CreateRDF (
uint256 indexed tokenId,
string rdfStatements
);
/**
* @dev This emits when updating the RDF data of Semantic Soulbound Token. RDF data is a collection of RDF statements that are used to represent information about resources.
* @param tokenId The identifier for the Semantic Soulbound Token.
* @param rdfStatements The RDF statements for the semantic soulbound token. An RDF statement is the statement made by an RDF triple.
*/
event UpdateRDF (
uint256 indexed tokenId,
string rdfStatements
);
/**
* @dev This emits when burning or revoking Semantic Soulbound Token.
* @param tokenId The identifier for the Semantic Soulbound Token.
* @param rdfStatements The RDF statements for the Semantic Soulbound Token. An RDF statement is the statement made by an RDF triple.
*/
event RemoveRDF (
uint256 indexed tokenId,
string rdfStatements
);
/**
* @dev Returns the RDF statements of the Semantic Soulbound Token. An RDF statement is the statement made by an RDF triple.
* @param tokenId The identifier for the Semantic Soulbound Token.
*/
function rdfOf(uint256 tokenId) external view returns (string memory);
}可以选择性的实现ISemanticRDFSchema接口,用于获取描述RDF数据的Schema URI。
可以选择性的实现ISemanticSBTUpdate接口,用于更新SBT的RDF数据
可以选择性的实现ISemanticSBTPrivacy接口
Last updated