How It Works
The dynamic on-chain metadata protocol allows for all Items—native and wrapped—to have all their metadata not only saved, but also regenerated at any time, by a simple call time request, 100% on-chain.
Metadata can be:
  • Images
  • Descriptions
  • Properties of in-game objects
  • Total supply information
  • Item balance amount
  • Anything else

Protocol Overview

Resolver and Renderer

The dynamic on-chain metadata protocols consists of these two contracts.
  • The DynamicUriResolver (or the Resolver for short)
The Resolver is used by all Items as well as all external protocols and applications that implement dynamic on-chain metadata. We provide the DynnamicUriResolver contract.
  • The DynamicUriRenderer (or the Renderer for short)
The Renderer is a contract that developers can customize based on what they want to render as metadata.
We provide the IDynamicUriRenderer interface. A customized Renderer must integrate this, but can otherwise be freely written.
You can use the dynamic on-chain metadata protocol to manage both traditional uri—such as an IPFS link to a generic off-chain server—as well as dynamic uri. You have the option.

uri

For traditional, the uri is a simple string that contains the relevant off-chain link:
1
var plainUri = "ipfs://ipfs/QmcZxxxxxxxxxxxx........."
Copied!
For dynamic, the uri is an encoded ABI string that contains the address of a specific DynamicUriRenderer contract, as well as a payload of bytes you can encode as you like:
1
var dynamicRendererAddress = "0xabxd..." ;
2
3
var optionalPayload = "0x" ;
4
5
var plainUri = web3.eth.abi.encodeParameters(["address", "bytes" ], [dynamicRendererAddress, optionalPayload]);
Copied!
You don’t pass a simple string for dynamic uri, but rather an engine, i.e, the Renderer address, which dynamically regenerates the data whenever it’s called, and then returns the rendered uri.
The Resolver resolves, analyzes and acts on the passed uri string.