Dynamic On-chain Metadata Integration
The Item standard is the first token standard in the Ethereum Ecosystem to natively integrate the Dynamic on-chain Metadata protocol. The Item Main Interface can manage dynamic or traditional uri
for each Item and each Collection.
All the Collection of Items and all the Items can have dynamic on-chain Metadata. The uri
string both for Collection and Items is passed as the uri
parameter in the Header
struct:
The singleton Main Interface contract integrates some functions used to easily interact with the Dynamic on-chain Metadata protocol to generate dynamic Metadata directly from the chain.
The first one is the collectionUri
function:
It takes as input a collectionId
and internally calls the _uri
function passing:
the uri string of the Collection as the
_plainUri
parameter.the encoded
collectionId
as theadditionaldata
parameter.
The output of the function is the rendered string
.
The _uri
function provided by the DynamicMetadataCapableElement
will call the resolve
function of the Resolver and it will manage the uri calling the Renderer contract.
The second one is the uri
function:
It takes as input an itemId
and internally calls the _uri
function passing:
the uri of the Item as the
_plainUri
parameter, taking it from its Header.the encoded
collectionId
anditemId
as theadditionaldata
parameter.
The output of the function is the rendered string.
The _uri
function provided by the DynamicMetadataCapableElement
will call the resolve
function of the Resolver and it will manage the uri calling the Renderer contract.
Last updated