Hi @Eibriel,
Welcome to the community ![]()
The OpenZeppelin Contracts ERC1155 implementation uses a single URI for the entire contract. See the following example: Create an ERC1155.
According to the EIP (see: https://eips.ethereum.org/EIPS/eip-1155#metadata):
- Changes to the URI MUST emit the
URIevent if the change can be expressed with an event (i.e. it isn’t dynamic/programmatic).- An implementation MAY emit the
URIevent during a mint operation but it is NOT mandatory. An observer MAY fetch the metadata uri at mint time from theurifunction if it was not emitted.- The
urifunction SHOULD be used to retrieve values if no event was emitted.- The
urifunction MUST return the same value as the latest event for an_idif it was emitted.
I interpret this as changing the uri for the contract would require emitting the event for each token ID. Though I recommend reading the EIP on this detail.
event URI(string _value, uint256 indexed _id);
Do you want to use a different uri per token ID?
Under what circumstances would you want to change the uri?