I want to Mint Dynamic 1155 NFTs and want to use a Mapping to store TokenURI against an ID.
// Address => token ID => TokenURI
mapping (address=>mapping(uint=>string)) TokenURI;
If i Use this Mapping then i have to introduce it in Mint function as code is attached
function _mint(
address to,
uint256 id,
uint256 amount,
bytes memory data,
string memory Tokenuri
) internal virtual {
require(to != address(0), "ERC1155: mint to the zero address");
address operator = _msgSender();
_beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data);
_balances[id][to] += amount;
TokenURI[to][id] = Tokenuri;
emit TransferSingle(operator, address(0), to, id, amount);
_doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
}
This function is getting extra parameter "Tokenuri" from Front end and now changing the Interface ID of IERC1155.
So what should i do to store TokenURI of Each ID without changing Interface ID.